I'm trying to use some ajax method to execute operation on the ProjectTrackerSample. I0ve notice a strange behaviour in the global.asax when calling Ajax method. The principal in the session is null so the ApplicationContext.User is reintiliazied to a null principal each time I use an ajax method.
There is a way to avoid this behaviour?
Thanks.
Edika
Edika
I assume that you are calling an ASMX webservice.
In the global.asax you must restore the authenticated principal, from session state, as Rocky shows in the Project Tracker web sample application.
Furthermore you must enable session state in the service method. For ASMX services you do this by adding EnableSession:=True to the WebMethod attribute.
[Example]
<WebMethod(EnableSession:=True)> _
Public Function DoSomething() As String
...
End Function
Hope this helps.
Cheers
/Henrik
Copyright (c) Marimer LLC