Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi every one.

i have a project that has included two different project.that works depending upon the user seletion during login.when user logged in then a session is start with some information that are needed in project to check current project selection and
we change the database as project selection.
now the problem is we have been written many webservice.we need to pass session information to webservice then they will work properly for seprate project.


Thanks,
Posted

Yes you can pass the session value to web service methods as long as the methods accept any parameters.
 
Share this answer
 
Comments
thatraja 4-Dec-11 14:26pm    
5!
Wonde Tadesse 4-Dec-11 14:27pm    
Thanks
Yes you can easily pass session information to Web Service. Please go through the following links:
Using ASP.NET Session State in a Web Service
Using Session State in a Web Service
WebMethodAttribute.EnableSession Property
Using ASP.NET Session State in a Web Service

Please feel free to contact if you need further information.
Enjoy :)
 
Share this answer
 
Comments
thatraja 4-Dec-11 14:26pm    
5!
Monjurul Habib 4-Dec-11 15:10pm    
thank you, Raja :)
The below link will best answer your questions:

http://devpinoy.org/blogs/willydavidjr/archive/2008/06/13/using-asp-net-session-state-in-a-web-service.aspx[^]

Please mark as answer and vote 5 if this solved your problem

Regards,
Eduard
 
Share this answer
 
Comments
thatraja 4-Dec-11 14:26pm    
5!
[no name] 4-Dec-11 20:26pm    
thanks

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