In Application_Start event in global.asax.cs, I have added some initialization code. This code is run in a spawned thread (created using new Thread()). The initialization code uses Server.MapPath to get the physical path of a file. However many times I get an error in the log files : Server Operation is not available in this context In any case I am catching the exception. The initialization is not critical since even if it does not succeed, it will not be a problem for me. My question is:
- Why am I getting the Server not available error?
- Can the handled exception cause any problems like Invalid Viewstate during normal execution of the application. We noticed a lot of these - Invalid Viewstate later in the logs. I believe it cannot. Please correct me if I am wrong.
Thanks
Vikas