Event Viewer Error - InvalidOperationException

Event Viewer Error - InvalidOperationException

am 03.11.2007 01:26:01 von ChrisP

I am building some simple Web Applications in VS 2005. I am doing some basic
DB Connection stuff. I got my aspx pages running and working fine, but I see
some errors popping up in my Event Viewer on my webserver. I just created a
simple login webform and account registration webform. My forms work it adds
an account to my DB and allows me to login using my login form.



I have a Windows 2003 webserver running IIS6.0 and SQLServer 2005. The one
critical error I copied from my event viewer is listed below. The website
folder is a virtual directory using the .NET 2.0 framework.



If you need any additional information let me know.



Thanks for your help ahead of time,

Chris



Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 11/2/2007
Time: 7:36:54 PM
User: N/A
Computer: CPSUPERSERVER
Description:
EventType clr20r3, P1 aspnet_wp.exe, P2 2.0.50727.832, P3 461ef1db, P4
mscorlib, P5 2.0.0.0, P6 461eee3d, P7 10be, P8 23, P9
system.invalidoperationexception, P10 NIL.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
0010: 20 00 61 00 73 00 70 00 .a.s.p.
0018: 6e 00 65 00 74 00 5f 00 n.e.t._.
0020: 77 00 70 00 2e 00 65 00 w.p...e.
0028: 78 00 65 00 2c 00 20 00 x.e.,. .
0030: 32 00 2e 00 30 00 2e 00 2...0...
0038: 35 00 30 00 37 00 32 00 5.0.7.2.
0040: 37 00 2e 00 38 00 33 00 7...8.3.
0048: 32 00 2c 00 20 00 34 00 2.,. .4.
0050: 36 00 31 00 65 00 66 00 6.1.e.f.
0058: 31 00 64 00 62 00 2c 00 1.d.b.,.
0060: 20 00 6d 00 73 00 63 00 .m.s.c.
0068: 6f 00 72 00 6c 00 69 00 o.r.l.i.
0070: 62 00 2c 00 20 00 32 00 b.,. .2.
0078: 2e 00 30 00 2e 00 30 00 ..0...0.
0080: 2e 00 30 00 2c 00 20 00 ..0.,. .
0088: 34 00 36 00 31 00 65 00 4.6.1.e.
0090: 65 00 65 00 33 00 64 00 e.e.3.d.
0098: 2c 00 20 00 31 00 30 00 ,. .1.0.
00a0: 62 00 65 00 2c 00 20 00 b.e.,. .
00a8: 32 00 33 00 2c 00 20 00 2.3.,. .
00b0: 73 00 79 00 73 00 74 00 s.y.s.t.
00b8: 65 00 6d 00 2e 00 69 00 e.m...i.
00c0: 6e 00 76 00 61 00 6c 00 n.v.a.l.
00c8: 69 00 64 00 6f 00 70 00 i.d.o.p.
00d0: 65 00 72 00 61 00 74 00 e.r.a.t.
00d8: 69 00 6f 00 6e 00 65 00 i.o.n.e.
00e0: 78 00 63 00 65 00 70 00 x.c.e.p.
00e8: 74 00 69 00 6f 00 6e 00 t.i.o.n.
00f0: 20 00 4e 00 49 00 4c 00 .N.I.L.
00f8: 0d 00 0a 00 ....

Re: Event Viewer Error - InvalidOperationException

am 03.11.2007 07:12:33 von David Wang

Looks like you are running IIS6 in IIS5 Compatibility Mode (i.e. no
Application Pools) because you have ASP.Net code running in
aspnet_wp.exe. Kinda unusual since you are running and building new,
modern applications and not old, legacy applications.

Unless it is a well known bug, looking at Exceptions in the Event Log
is not useful. You'll want to attach a debugger onto the worker
process that is throwing the exception and catch the stack which
throws the exception -- which will directly tell you what code is at
fault. That is usually enough to get a fix.

If you say that you're not writing any code -- just hooking together
existing code -- then I would start looking at how you are hooking the
code together.

If you see this only once, then maybe it happened earlier while you
were building your Web Application and possible entered some wrong
configuration values that have since been correted -- in which case
you don't care about the event.

If you can repeatably generate this event by running your application,
then do that while the aspnet_wp.exe is under the debugger and catch
the exception stack that causes the issue, and fix that.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//





On Nov 2, 5:26 pm, ChrisP wrote:
> I am building some simple Web Applications in VS 2005. I am doing some basic
> DB Connection stuff. I got my aspx pages running and working fine, but I see
> some errors popping up in my Event Viewer on my webserver. I just created a
> simple login webform and account registration webform. My forms work it adds
> an account to my DB and allows me to login using my login form.
>
> I have a Windows 2003 webserver running IIS6.0 and SQLServer 2005. The one
> critical error I copied from my event viewer is listed below. The website
> folder is a virtual directory using the .NET 2.0 framework.
>
> If you need any additional information let me know.
>
> Thanks for your help ahead of time,
>
> Chris
>
> Event Type: Error
> Event Source: .NET Runtime 2.0 Error Reporting
> Event Category: None
> Event ID: 5000
> Date: 11/2/2007
> Time: 7:36:54 PM
> User: N/A
> Computer: CPSUPERSERVER
> Description:
> EventType clr20r3, P1 aspnet_wp.exe, P2 2.0.50727.832, P3 461ef1db, P4
> mscorlib, P5 2.0.0.0, P6 461eee3d, P7 10be, P8 23, P9
> system.invalidoperationexception, P10 NIL.
>
> For more information, see Help and Support Center athttp://go.microsoft.com/fwlink/events.asp.
> Data:
> 0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
> 0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
> 0010: 20 00 61 00 73 00 70 00 .a.s.p.
> 0018: 6e 00 65 00 74 00 5f 00 n.e.t._.
> 0020: 77 00 70 00 2e 00 65 00 w.p...e.
> 0028: 78 00 65 00 2c 00 20 00 x.e.,. .
> 0030: 32 00 2e 00 30 00 2e 00 2...0...
> 0038: 35 00 30 00 37 00 32 00 5.0.7.2.
> 0040: 37 00 2e 00 38 00 33 00 7...8.3.
> 0048: 32 00 2c 00 20 00 34 00 2.,. .4.
> 0050: 36 00 31 00 65 00 66 00 6.1.e.f.
> 0058: 31 00 64 00 62 00 2c 00 1.d.b.,.
> 0060: 20 00 6d 00 73 00 63 00 .m.s.c.
> 0068: 6f 00 72 00 6c 00 69 00 o.r.l.i.
> 0070: 62 00 2c 00 20 00 32 00 b.,. .2.
> 0078: 2e 00 30 00 2e 00 30 00 ..0...0.
> 0080: 2e 00 30 00 2c 00 20 00 ..0.,. .
> 0088: 34 00 36 00 31 00 65 00 4.6.1.e.
> 0090: 65 00 65 00 33 00 64 00 e.e.3.d.
> 0098: 2c 00 20 00 31 00 30 00 ,. .1.0.
> 00a0: 62 00 65 00 2c 00 20 00 b.e.,. .
> 00a8: 32 00 33 00 2c 00 20 00 2.3.,. .
> 00b0: 73 00 79 00 73 00 74 00 s.y.s.t.
> 00b8: 65 00 6d 00 2e 00 69 00 e.m...i.
> 00c0: 6e 00 76 00 61 00 6c 00 n.v.a.l.
> 00c8: 69 00 64 00 6f 00 70 00 i.d.o.p.
> 00d0: 65 00 72 00 61 00 74 00 e.r.a.t.
> 00d8: 69 00 6f 00 6e 00 65 00 i.o.n.e.
> 00e0: 78 00 63 00 65 00 70 00 x.c.e.p.
> 00e8: 74 00 69 00 6f 00 6e 00 t.i.o.n.
> 00f0: 20 00 4e 00 49 00 4c 00 .N.I.L.
> 00f8: 0d 00 0a 00 ....

Re: Event Viewer Error - InvalidOperationException

am 03.11.2007 16:39:01 von ChrisP

I found in the code where the Exception is happening and I can figure out how
to fix that codeing issue.

However, you make an interesting point about running IIS in isolation mode.
I put it in isolation mode because of everythign I read in KB and material
elsewhere say that .NET 2.0 web applications need to be in a virtual
directory and have IIS6.0 running in isolation mode.

Is there any benefit in not running it in isolation mode? Will it affect my
applications accessing MSQLserver 2005?

Thanks for all your time and help,
Chris

"David Wang" wrote:

> Looks like you are running IIS6 in IIS5 Compatibility Mode (i.e. no
> Application Pools) because you have ASP.Net code running in
> aspnet_wp.exe. Kinda unusual since you are running and building new,
> modern applications and not old, legacy applications.
>
> Unless it is a well known bug, looking at Exceptions in the Event Log
> is not useful. You'll want to attach a debugger onto the worker
> process that is throwing the exception and catch the stack which
> throws the exception -- which will directly tell you what code is at
> fault. That is usually enough to get a fix.
>
> If you say that you're not writing any code -- just hooking together
> existing code -- then I would start looking at how you are hooking the
> code together.
>
> If you see this only once, then maybe it happened earlier while you
> were building your Web Application and possible entered some wrong
> configuration values that have since been correted -- in which case
> you don't care about the event.
>
> If you can repeatably generate this event by running your application,
> then do that while the aspnet_wp.exe is under the debugger and catch
> the exception stack that causes the issue, and fix that.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
>
>
> On Nov 2, 5:26 pm, ChrisP wrote:
> > I am building some simple Web Applications in VS 2005. I am doing some basic
> > DB Connection stuff. I got my aspx pages running and working fine, but I see
> > some errors popping up in my Event Viewer on my webserver. I just created a
> > simple login webform and account registration webform. My forms work it adds
> > an account to my DB and allows me to login using my login form.
> >
> > I have a Windows 2003 webserver running IIS6.0 and SQLServer 2005. The one
> > critical error I copied from my event viewer is listed below. The website
> > folder is a virtual directory using the .NET 2.0 framework.
> >
> > If you need any additional information let me know.
> >
> > Thanks for your help ahead of time,
> >
> > Chris
> >
> > Event Type: Error
> > Event Source: .NET Runtime 2.0 Error Reporting
> > Event Category: None
> > Event ID: 5000
> > Date: 11/2/2007
> > Time: 7:36:54 PM
> > User: N/A
> > Computer: CPSUPERSERVER
> > Description:
> > EventType clr20r3, P1 aspnet_wp.exe, P2 2.0.50727.832, P3 461ef1db, P4
> > mscorlib, P5 2.0.0.0, P6 461eee3d, P7 10be, P8 23, P9
> > system.invalidoperationexception, P10 NIL.
> >
> > For more information, see Help and Support Center athttp://go.microsoft.com/fwlink/events.asp.
> > Data:
> > 0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
> > 0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
> > 0010: 20 00 61 00 73 00 70 00 .a.s.p.
> > 0018: 6e 00 65 00 74 00 5f 00 n.e.t._.
> > 0020: 77 00 70 00 2e 00 65 00 w.p...e.
> > 0028: 78 00 65 00 2c 00 20 00 x.e.,. .
> > 0030: 32 00 2e 00 30 00 2e 00 2...0...
> > 0038: 35 00 30 00 37 00 32 00 5.0.7.2.
> > 0040: 37 00 2e 00 38 00 33 00 7...8.3.
> > 0048: 32 00 2c 00 20 00 34 00 2.,. .4.
> > 0050: 36 00 31 00 65 00 66 00 6.1.e.f.
> > 0058: 31 00 64 00 62 00 2c 00 1.d.b.,.
> > 0060: 20 00 6d 00 73 00 63 00 .m.s.c.
> > 0068: 6f 00 72 00 6c 00 69 00 o.r.l.i.
> > 0070: 62 00 2c 00 20 00 32 00 b.,. .2.
> > 0078: 2e 00 30 00 2e 00 30 00 ..0...0.
> > 0080: 2e 00 30 00 2c 00 20 00 ..0.,. .
> > 0088: 34 00 36 00 31 00 65 00 4.6.1.e.
> > 0090: 65 00 65 00 33 00 64 00 e.e.3.d.
> > 0098: 2c 00 20 00 31 00 30 00 ,. .1.0.
> > 00a0: 62 00 65 00 2c 00 20 00 b.e.,. .
> > 00a8: 32 00 33 00 2c 00 20 00 2.3.,. .
> > 00b0: 73 00 79 00 73 00 74 00 s.y.s.t.
> > 00b8: 65 00 6d 00 2e 00 69 00 e.m...i.
> > 00c0: 6e 00 76 00 61 00 6c 00 n.v.a.l.
> > 00c8: 69 00 64 00 6f 00 70 00 i.d.o.p.
> > 00d0: 65 00 72 00 61 00 74 00 e.r.a.t.
> > 00d8: 69 00 6f 00 6e 00 65 00 i.o.n.e.
> > 00e0: 78 00 63 00 65 00 70 00 x.c.e.p.
> > 00e8: 74 00 69 00 6f 00 6e 00 t.i.o.n.
> > 00f0: 20 00 4e 00 49 00 4c 00 .N.I.L.
> > 00f8: 0d 00 0a 00 ....
>
>
>

Re: Event Viewer Error - InvalidOperationException

am 03.11.2007 23:07:54 von David Wang

I doubt anything which says ".NET 2.0 web applications need to be in a
virtual directory and have IIS 6.0 running in IIS5 Compatibility
Mode".

If you install .NET 2.0 on IIS6, it will not change IIS6 to run in
IIS5 Compatibility Mode, so it definitely is not a necessary
requirement.

This mean that for your statement to be correct, either the setup that
everyone uses is broken, or the documentation is mistaken. I think the
documentation is mistaken or interpreted incorrectly/out-of-context.

> Is there any benefit in not running it in isolation mode? Will it affect my
> applications accessing MSQLserver 2005?

ASP.Net running on IIS6 in its native Worker Process Isolation mode
offers a superset of behaviors than your current situation. However,
default settings and behaviors are different between the modes, so you
can't just change IIS6 modes and expect identical behavior.

In other words, switching modes may/not affect your applications
accessing SQL 2005. However, if it *does* affect your applications, it
is possible to find and change IIS6 configuration such that things
work again. Usually, in the default case, things just work by flipping
the switch.

People with forward-looking perspective tend to write ASP.Net
applications running on IIS6 with its native worker process isolation
mode because they know that IIS5 Compatibility Mode will not be
supported by IIS or ASP.Net in the future.

Thus, since Native Worker Process Isolation Mode offers a super set of
behaviors AND is forward looking, most people choose the easier route
of writing something that can work in the future instead of something
guaranteed to not work in the future.

What can be confusing with using native worker process isolation mode
with ASP.Net is that the ASP.Net settings are meant for
IIS5 (and IIS6 in IIS5 Compatibility Mode); they are not active in
IIS6 Worker Process Isolation Mode. Thus, when you see people changing
those process model settings in machine.config, you have to translate
it to the appropriate IIS6 Application Pool settings. It's not hard,
but it can be mysterious when people are not aware of it.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//





On Nov 3, 8:39 am, ChrisP wrote:
> I found in the code where the Exception is happening and I can figure out how
> to fix that codeing issue.
>
> However, you make an interesting point about running IIS in isolation mode.
> I put it in isolation mode because of everythign I read in KB and material
> elsewhere say that .NET 2.0 web applications need to be in a virtual
> directory and have IIS6.0 running in isolation mode.
>
> Is there any benefit in not running it in isolation mode? Will it affect my
> applications accessing MSQLserver 2005?
>
> Thanks for all your time and help,
> Chris
>
>
>
> "David Wang" wrote:
> > Looks like you are running IIS6 in IIS5 Compatibility Mode (i.e. no
> > Application Pools) because you have ASP.Net code running in
> > aspnet_wp.exe. Kinda unusual since you are running and building new,
> > modern applications and not old, legacy applications.
>
> > Unless it is a well known bug, looking at Exceptions in the Event Log
> > is not useful. You'll want to attach a debugger onto the worker
> > process that is throwing the exception and catch the stack which
> > throws the exception -- which will directly tell you what code is at
> > fault. That is usually enough to get a fix.
>
> > If you say that you're not writing any code -- just hooking together
> > existing code -- then I would start looking at how you are hooking the
> > code together.
>
> > If you see this only once, then maybe it happened earlier while you
> > were building your Web Application and possible entered some wrong
> > configuration values that have since been correted -- in which case
> > you don't care about the event.
>
> > If you can repeatably generate this event by running your application,
> > then do that while the aspnet_wp.exe is under the debugger and catch
> > the exception stack that causes the issue, and fix that.
>
> > //David
> >http://w3-4u.blogspot.com
> >http://blogs.msdn.com/David.Wang
> > //
>
> > On Nov 2, 5:26 pm, ChrisP wrote:
> > > I am building some simple Web Applications in VS 2005. I am doing some basic
> > > DB Connection stuff. I got my aspx pages running and working fine, but I see
> > > some errors popping up in my Event Viewer on my webserver. I just created a
> > > simple login webform and account registration webform. My forms work it adds
> > > an account to my DB and allows me to login using my login form.
>
> > > I have a Windows 2003 webserver running IIS6.0 and SQLServer 2005. The one
> > > critical error I copied from my event viewer is listed below. The website
> > > folder is a virtual directory using the .NET 2.0 framework.
>
> > > If you need any additional information let me know.
>
> > > Thanks for your help ahead of time,
>
> > > Chris
>
> > > Event Type: Error
> > > Event Source: .NET Runtime 2.0 Error Reporting
> > > Event Category: None
> > > Event ID: 5000
> > > Date: 11/2/2007
> > > Time: 7:36:54 PM
> > > User: N/A
> > > Computer: CPSUPERSERVER
> > > Description:
> > > EventType clr20r3, P1 aspnet_wp.exe, P2 2.0.50727.832, P3 461ef1db, P4
> > > mscorlib, P5 2.0.0.0, P6 461eee3d, P7 10be, P8 23, P9
> > > system.invalidoperationexception, P10 NIL.
>
> > > For more information, see Help and Support Center athttp://go.microsoft.com/fwlink/events.asp.
> > > Data:
> > > 0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
> > > 0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
> > > 0010: 20 00 61 00 73 00 70 00 .a.s.p.
> > > 0018: 6e 00 65 00 74 00 5f 00 n.e.t._.
> > > 0020: 77 00 70 00 2e 00 65 00 w.p...e.
> > > 0028: 78 00 65 00 2c 00 20 00 x.e.,. .
> > > 0030: 32 00 2e 00 30 00 2e 00 2...0...
> > > 0038: 35 00 30 00 37 00 32 00 5.0.7.2.
> > > 0040: 37 00 2e 00 38 00 33 00 7...8.3.
> > > 0048: 32 00 2c 00 20 00 34 00 2.,. .4.
> > > 0050: 36 00 31 00 65 00 66 00 6.1.e.f.
> > > 0058: 31 00 64 00 62 00 2c 00 1.d.b.,.
> > > 0060: 20 00 6d 00 73 00 63 00 .m.s.c.
> > > 0068: 6f 00 72 00 6c 00 69 00 o.r.l.i.
> > > 0070: 62 00 2c 00 20 00 32 00 b.,. .2.
> > > 0078: 2e 00 30 00 2e 00 30 00 ..0...0.
> > > 0080: 2e 00 30 00 2c 00 20 00 ..0.,. .
> > > 0088: 34 00 36 00 31 00 65 00 4.6.1.e.
> > > 0090: 65 00 65 00 33 00 64 00 e.e.3.d.
> > > 0098: 2c 00 20 00 31 00 30 00 ,. .1.0.
> > > 00a0: 62 00 65 00 2c 00 20 00 b.e.,. .
> > > 00a8: 32 00 33 00 2c 00 20 00 2.3.,. .
> > > 00b0: 73 00 79 00 73 00 74 00 s.y.s.t.
> > > 00b8: 65 00 6d 00 2e 00 69 00 e.m...i.
> > > 00c0: 6e 00 76 00 61 00 6c 00 n.v.a.l.
> > > 00c8: 69 00 64 00 6f 00 70 00 i.d.o.p.
> > > 00d0: 65 00 72 00 61 00 74 00 e.r.a.t.
> > > 00d8: 69 00 6f 00 6e 00 65 00 i.o.n.e.
> > > 00e0: 78 00 63 00 65 00 70 00 x.c.e.p.
> > > 00e8: 74 00 69 00 6f 00 6e 00 t.i.o.n.
> > > 00f0: 20 00 4e 00 49 00 4c 00 .N.I.L.
> > > 00f8: 0d 00 0a 00 .... - Hide quoted text -
>
> - Show quoted text -