My ASP.NET web application consumes an internal RSS feed which uses the identity of the currently logged on user to customise its content. The RSS feed is generated by a standard .ashx handler in my application.
When I call the RSS feed using XElement.Load(rssFeedUri)
, the session state is not maintained (presumably because the session ID cookie is not being sent with the request).
The RSS feed is working as intended when called directly from the browser address bar for a logged in user. I have already ensured that my handler implements IRequiresSessionState
so that if the session ID is passed to the service, I can access the session data.
Using the Visual Studio debugger, I have determined that a new session is being created when my feed is accessed via XElement.Load.
How can I load my RSS feed and ensure that session state is available to it?