I have an application that have Login feature under domain (a1.com). I created a web serivces within this application that check if the session is created(User Logged).
This webservices will be used in another app (a2.com) to check if the session exsited in a1.com so i will not require login again.
but the session is always empty when trying to read it from (a2.com) even i logged from (a1.com).
i used "EnableSession:=True" in the web service function that read the session.
After u logged in a1.com and created session using webservices in a1.com and when u r trying to read the session value of a1.com from a2.com, be sure that a1.com created webservice is running else u vl always get null. The possibilities of getting null value
of session is 1> a1.com webservice is not running 2> a1.com webservice session value is not becoming null when exit the application or webservice 3> No one else modified ur session value
Thanks&Regards,
Prasad Maganti
Marked as answer by Angie xu - MSFT on Jan 07, 2013 11:35 PM
Moayyad.Fari...
Member
58 Points
29 Posts
Sessions & WebServices
Dec 31, 2012 10:09 AM|LINK
Dears,
I have an application that have Login feature under domain (a1.com). I created a web serivces within this application that check if the session is created(User Logged).
This webservices will be used in another app (a2.com) to check if the session exsited in a1.com so i will not require login again.
but the session is always empty when trying to read it from (a2.com) even i logged from (a1.com).
i used "EnableSession:=True" in the web service function that read the session.
please advise.
Regards,
Moayyad
Shailen0287
Member
62 Points
11 Posts
Re: Sessions & WebServices
Dec 31, 2012 10:31 AM|LINK
Please check the following link: http://weblogs.asp.net/stevewellens/archive/2009/04/05/using-session-state-in-a-web-service.aspx
Moayyad.Fari...
Member
58 Points
29 Posts
Re: Sessions & WebServices
Dec 31, 2012 11:27 AM|LINK
I tried but not worked.
I need to read already created session.
Regards,
Moayyad
sameer_khanj...
Contributor
7066 Points
1381 Posts
Re: Sessions & WebServices
Dec 31, 2012 12:07 PM|LINK
check
http://stackoverflow.com/questions/3438912/share-session-between-two-web-sites-using-asp-net-and-state-server
http://forums.asp.net/t/1483162.aspx/1
sameer.khanjit@gmail.com
View Blog
Click "Mark as Answer" on the post that helped you.
shivanand G ...
Participant
1763 Points
534 Posts
Re: Sessions & WebServices
Jan 02, 2013 09:40 AM|LINK
Hi Moayyad.Faris
Better to update the datable and use it for login into another domain. You can'nt access session of one domain to another domain.
shivanand.G.N (shivu.betta@gmail.com)
prasad.magan...
Member
681 Points
214 Posts
Re: Sessions & WebServices
Jan 02, 2013 10:20 AM|LINK
After u logged in a1.com and created session using webservices in a1.com and when u r trying to read the session value of a1.com from a2.com, be sure that a1.com created webservice is running else u vl always get null. The possibilities of getting null value of session is 1> a1.com webservice is not running 2> a1.com webservice session value is not becoming null when exit the application or webservice 3> No one else modified ur session value
Prasad Maganti