Hi Seth,
Based on your description, you are wanting to manually create a HttpContext
to with a SimpleWorkReque st object, how ever when you run the app, you
found that the SimpleWorkReque st couldn't be created correctly. Is this the
problem you encountered?
If so, I've reviewed some references on the ASP.NET runtime. In ASP.NET ,
for a client request beccome from a httprequest to a html output stream, it
need to pass through many processes. At the highest level of abstraction,
the ASP.NET worker process accomplishes one main task¡ªhanding the request
over to a chain of managed objects dubbed the HTTP pipeline. The HTTP
pipeline is activated by creating a new instance of the HttpRuntime class
and then calling its ProcessRequest method. As mentioned, in ASP.NET you
have a single worker process running all the time (except that the Web
garden model is enabled) that manages all Web applications in distinct
AppDomains. Each AppDomain has its own instance of the HttpRuntime class¡
ªthe entry point in the pipeline. The HttpRuntime object initializes a
number of internal objects that will help carry the request out. Helper
objects include the cache manager (the Cache object) and the internal file
system monitor used to detect changes in the source files that form the
application. The HttpRuntime creates the context for the request and fills
it up with any HTTP information specific to the request. The context is
represented by an instance of the HttpContext class.
For more detailed information about the ASP.NET Runtime and the pipeline,
you can visit this tech article via the following weblink:
http://msdn.microsoft.com/library/en...PNETHTTPRuntim
e.asp?frame=tru e
So if you need to generate the required internals objects for the
HttpRuntime, otherwise, the HTTP pipline can't start working since the
working enviroment is not prepared well. Also, I've found some one else's
sample for using the HttpRuntime and SimpleWorkReque st outside the IIS(in a
winform application), you can visit the link below to get the sample and
its tutorial aritcle:
http://www.codeproject.com/dotnet/usingaspruntime.asp
This article has provided a complete example for how to Using ASP.NET
Runtime in Desktop Applications(vi sit a aspx page). I think it maybe
helpful to you.
If you have any new findings please also let me know.
Merry Christmas!!
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)