The Server is part of the current HttpContext, and is a member of the
HttpApplication class. So, if you're writing for the Application_OnStart
event handler, you would simply refer to it as "Server"
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
Roy Chastain said:
I can not find a Page object in .net.
I tired this but it does not work
HttpServerUtility the_server = new HttpApplication().Server;
RemotingConfiguration.Configure(the_server.MapPath("web.config"));
Here is the error
Line 5: {
Line 6: HttpServerUtility the_server = new HttpApplication().Server;
Line 7: RemotingConfiguration.Configure(the_server.MapPath("web.config"));
Source File: E:\Inetpub\wwwroot\HGSConfigObjects\global.asax Line: 7
Stack Trace:
[HttpException (0x80004005): Server operation is not available in this context.]
System.Web.HttpServerUtility.MapPath(String path) +115
ASP.Global_asax.Application_OnStart() in E:\Inetpub\wwwroot\HGSConfigObjects\global.asax:7