N
NoNickname
I developed a new ASP.NET 2.0 web service on my PC (VS2005 on windows 2000)
and tested it in a development environment on a 2003 box. And the web
service works on three different 2003 servers in a QA environment.
When I moved the application dlls over to Production onto a brand new 2003
box built special to host this web service it did not work.
I'm told that there are no differences between the QA and Production boxes
but something must be different. Has anybody seen the following error
message? Or better still do you have a resolution? I googled around but
really can’t find anything meaningful.
This is the core of the error:
Exception type: TypeInitializationException
Exception message: The type initializer for 'Global' threw an exception.
------------------
In my Global.asax file I have this line:
<%@ Application Language="C#" Inherits="Global" %>
Then Global.cs is defined as:
public partial class Global : System.Web.HttpApplication
{
public static int DebugLevel = 0;
public Global()
{ }
void Application_Start(object sender, EventArgs e)
{
string temp = null
temp = ConfigurationManager.AppSettings["DebugLevel"];
if (!string.IsNullOrEmpty(temp)) DebugLevel = int.Parse(temp);
{
}
Then in my web methods I'll have a line like this:
If(Global.DebugLevel > 5) {}
------------------
I really don’t know why this will work in QA but not in Production. My guess
is that it is some sort of permissions issue but I can't seem to find it.
Thanks.
Here is the full event log entry:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 9/15/2006 4:19:23 PM
Event time (UTC): 9/15/2006 8:19:23 PM
Event ID: bf87b4e625b54a588db99e30bef86643
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1797328370/Root/P/v01_00-2-128028251635720044
Trust level: Full
Application Virtual Path: /P/v01_00
Application Path: D:\Inetpub\Svcs\P\v01_00\
Machine name: PSVCS01
Process information:
Process ID: 3116
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: TypeInitializationException
Exception message: The type initializer for 'Global' threw an exception.
Request information:
Request URL: http://PSVCS.com/P/v01_00/Pservice.asmx
Request path: /P/v01_00/Pservice.asmx
User host address: 10.1.112.61
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 7
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at Global..ctor()
at ASP.global_asax..ctor()
and tested it in a development environment on a 2003 box. And the web
service works on three different 2003 servers in a QA environment.
When I moved the application dlls over to Production onto a brand new 2003
box built special to host this web service it did not work.
I'm told that there are no differences between the QA and Production boxes
but something must be different. Has anybody seen the following error
message? Or better still do you have a resolution? I googled around but
really can’t find anything meaningful.
This is the core of the error:
Exception type: TypeInitializationException
Exception message: The type initializer for 'Global' threw an exception.
------------------
In my Global.asax file I have this line:
<%@ Application Language="C#" Inherits="Global" %>
Then Global.cs is defined as:
public partial class Global : System.Web.HttpApplication
{
public static int DebugLevel = 0;
public Global()
{ }
void Application_Start(object sender, EventArgs e)
{
string temp = null
temp = ConfigurationManager.AppSettings["DebugLevel"];
if (!string.IsNullOrEmpty(temp)) DebugLevel = int.Parse(temp);
{
}
Then in my web methods I'll have a line like this:
If(Global.DebugLevel > 5) {}
------------------
I really don’t know why this will work in QA but not in Production. My guess
is that it is some sort of permissions issue but I can't seem to find it.
Thanks.
Here is the full event log entry:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 9/15/2006 4:19:23 PM
Event time (UTC): 9/15/2006 8:19:23 PM
Event ID: bf87b4e625b54a588db99e30bef86643
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1797328370/Root/P/v01_00-2-128028251635720044
Trust level: Full
Application Virtual Path: /P/v01_00
Application Path: D:\Inetpub\Svcs\P\v01_00\
Machine name: PSVCS01
Process information:
Process ID: 3116
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: TypeInitializationException
Exception message: The type initializer for 'Global' threw an exception.
Request information:
Request URL: http://PSVCS.com/P/v01_00/Pservice.asmx
Request path: /P/v01_00/Pservice.asmx
User host address: 10.1.112.61
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 7
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at Global..ctor()
at ASP.global_asax..ctor()