Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Need some help with sessioning-problem within web-Service: I created a web-Service (VB.NET - asmx.project, published via IIS) and also a web-client (also VB.NET - asp-project, service-reference added to Project). Web-Client requests web-service successfully as well in debug-mode as in runtime-mode. Current task is to enable some sort of session-pooling, i.e web-Service needs to know unique session-id of each session requesting it (Cookie-Usage enabled in IIS).
Funny effect here is: Whenever web-Service is running in Debug-mode everything works fine: Either browser-based requests and also asp-client requests transmit their unique session-Id. Problem starts when requesting web-Service in runtime mode, i.e. as IIS-web-Service: Each request creates a new session-Id. In global.asax web-service references httpContext-Object in order to initialize it (hint from net-research), but this didn't solve the problem.
As I'm not very familiar which all the web-Technology, some advice would be helpful

What I have tried:

- Added reference in Global.asax to initialize HttpContext-object
- In IIS (Internet Information Service) set some session-settings:
In-process, use Cookies
Posted
Comments
F-ES Sitecore 19-Mar-18 6:47am    
If you're getting a new session with each request that might indicate your not sending the right session cookie with your request, so the site thinks you are a new visitor rather than a returning one.
MaReBo 19-Mar-18 7:56am    
Hi, F-ES-Sitecore,
thx for your comment. This might probably be causing this behaviour. I'm not quite sure, which side is responsible for creating and sending as session-ID. As I understand, client should send it's session-ID within it's Cookie to web-Service. In Client sourcecode, all I'm doing is create an instand of web-Service reference ("Dim myWeb as new localhost.myWebService") followed by a request ("Dim sResponse as string = myWeb.TestFunction ("TestData")"). No idea where to Control a cookie

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900