CreateApplicationHost & Session State, etc.

S

SDS

If you host an ASP.NET application within a Win32 assembly using
CreateApplicationHost(), does the ASP.NET code running within that host
still have access to HTTP-related members such as the Session object,
Request object, HttpContext, Form object, etc.?

I'm wondering how "1:1" the port is of an ASP.NET app running under IIS
using things like session & view state to an app hosted under
CreateApplicationHost().

Thanks!
 
B

Brock Allen

All of those things are the same and are created and managed by ASP.NET.
The big thing that's different when building your own hosting application
for ASP.NET is implementing the HttpWorkerRequest; this is the class were
you have to provide all of the information about the HTTP request. If you
use HttpListener then it's a lot easier since it does the HTTP parsing and
provides APIs to get at all that information. Your HttpWorkerRequest class
then is a simple pass-thru to the HttpListener implementation (still a lot
of pass-thrus though).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top