468,537 Members | 2,412 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,537 developers. It's quick & easy.

moved from iis5 to iis6

Hi,

I have an asp.net webapp that works fine on my development machine,
win2k/iis5 however, when I move the site across to win2k3 / iis6 i get the
following error on postback of any page;

*------------------------------------------*
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
*------------------------------------------*

This error only ocours on postback of a page standard aspx pages with code
behind etc work fine, but on postback - bang. I assume its a setting
somewhere to tweak as it works fine on iis5.

I have tried IIS5 Issolation mode in IIS6 but it is still the same.

Any advice?

Many thanks

Terry.
Jun 6 '06 #1
5 2095
Without code and a line number it's impossible to debug. There's nothing
specific about iis 6 that jumps in my mind. NullReference errors tend to be
_very_ easy to debug though...If you deploy your pdb and get a line #,
you'll have it fixed in a couple minutes.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Terry Strachan" <te***@nospamthanksimfull.mertongroup.co.uk> wrote in
message news:O4**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have an asp.net webapp that works fine on my development machine,
win2k/iis5 however, when I move the site across to win2k3 / iis6 i get the
following error on postback of any page;

*------------------------------------------*
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
*------------------------------------------*

This error only ocours on postback of a page standard aspx pages with code
behind etc work fine, but on postback - bang. I assume its a setting
somewhere to tweak as it works fine on iis5.

I have tried IIS5 Issolation mode in IIS6 but it is still the same.

Any advice?

Many thanks

Terry.

Jun 6 '06 #2
Thanks for the reply,
I have access to the code and line number (see below), however,
I am at a loss as to why the exact same webpages run on my IIS5 machine.
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogin.Click

Dim oWebUser As cmvWebUser = New cmvWebUser
Dim oUser As cmvUser = New cmvUser

If tbUserName.Text = "" Or tbPassword.Text = "" Then
lblMissing.Text = "Please enter user ID and password"
Else
oUser = oWebUser.LogOn(tbUserName.Text, tbPassword.Text,
Session.SessionID)

Dim oRegistration As cmvRegistration = New cmvRegistration
*-->>>If oUser.Security = "ADMIN" Then

oRegistration =
oRegistration.GetRegistration(tbUserName.Text)

If oRegistration.Approved = "A" Then
Response.Redirect("/client/activation.aspx?UserID=" &
tbUserName.Text)
End If

If oRegistration.Approved = "N" Then
Response.Redirect("/client/approve.aspx")
End If

End If

End Sub
The oWebUser.LogOn method interacts with our back office system (mvbase) to
verify the login details. I have a telnet session logged on to the same
port so I can watch the transaction however, it doesnt fire.

It stops at the oUser.Security = "ADMIN" line, which the object is created
a few lines before from class cmvUser.

I am trying to set up remote debugging to see what is and isnt firing, but
windows 2000, VSNet 2003 on my development machine and Win 2003 and iis6 on
my server are giving me all sorts of problems and many hours googling... I
am at a stage now where I need to install the remote debugging components on
the server, only to find the disc isnt on site. It will have to wait till
tmrw.

Terry.

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:uR**************@TK2MSFTNGP04.phx.gbl...
Without code and a line number it's impossible to debug. There's nothing
specific about iis 6 that jumps in my mind. NullReference errors tend to be _very_ easy to debug though...If you deploy your pdb and get a line #,
you'll have it fixed in a couple minutes.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Terry Strachan" <te***@nospamthanksimfull.mertongroup.co.uk> wrote in
message news:O4**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have an asp.net webapp that works fine on my development machine,
win2k/iis5 however, when I move the site across to win2k3 / iis6 i get the following error on postback of any page;

*------------------------------------------*
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
*------------------------------------------*

This error only ocours on postback of a page standard aspx pages with code behind etc work fine, but on postback - bang. I assume its a setting
somewhere to tweak as it works fine on iis5.

I have tried IIS5 Issolation mode in IIS6 but it is still the same.

Any advice?

Many thanks

Terry.


Jun 6 '06 #3
Terry Strachan wrote:
Thanks for the reply,
I have access to the code and line number (see below), however,
I am at a loss as to why the exact same webpages run on my IIS5 machine.
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogin.Click

Dim oWebUser As cmvWebUser = New cmvWebUser
Dim oUser As cmvUser = New cmvUser

If tbUserName.Text = "" Or tbPassword.Text = "" Then
lblMissing.Text = "Please enter user ID and password"
Else
oUser = oWebUser.LogOn(tbUserName.Text, tbPassword.Text,
Session.SessionID)

Dim oRegistration As cmvRegistration = New cmvRegistration
*-->>>If oUser.Security = "ADMIN" Then
If the logon method fails wouldn't oUser be null?


oRegistration =
oRegistration.GetRegistration(tbUserName.Text)

If oRegistration.Approved = "A" Then
Response.Redirect("/client/activation.aspx?UserID=" &
tbUserName.Text)
End If

If oRegistration.Approved = "N" Then
Response.Redirect("/client/approve.aspx")
End If

End If

End Sub
The oWebUser.LogOn method interacts with our back office system (mvbase) to
verify the login details. I have a telnet session logged on to the same
port so I can watch the transaction however, it doesnt fire.

It stops at the oUser.Security = "ADMIN" line, which the object is created
a few lines before from class cmvUser.

I am trying to set up remote debugging to see what is and isnt firing, but
windows 2000, VSNet 2003 on my development machine and Win 2003 and iis6 on
my server are giving me all sorts of problems and many hours googling... I
am at a stage now where I need to install the remote debugging components on
the server, only to find the disc isnt on site. It will have to wait till
tmrw.

Terry.

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:uR**************@TK2MSFTNGP04.phx.gbl...
Without code and a line number it's impossible to debug. There's nothing
specific about iis 6 that jumps in my mind. NullReference errors tend to

be
_very_ easy to debug though...If you deploy your pdb and get a line #,
you'll have it fixed in a couple minutes.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Terry Strachan" <te***@nospamthanksimfull.mertongroup.co.uk> wrote in
message news:O4**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have an asp.net webapp that works fine on my development machine,
win2k/iis5 however, when I move the site across to win2k3 / iis6 i get the following error on postback of any page;

*------------------------------------------*
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
*------------------------------------------*

This error only ocours on postback of a page standard aspx pages with code behind etc work fine, but on postback - bang. I assume its a setting
somewhere to tweak as it works fine on iis5.

I have tried IIS5 Issolation mode in IIS6 but it is still the same.

Any advice?

Many thanks

Terry.


Jun 6 '06 #4
Ya, again, I'm not sure what it is about IIS6..but your oWebUser.LogOn is
obviously returning null. I can't offer much more help other than suggest
that you look into that method and figure out under what circumstances it'd
be null...

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Terry Strachan" <te***@nospamthanksimfull.mertongroup.co.uk> wrote in
message news:%2****************@TK2MSFTNGP05.phx.gbl...
Thanks for the reply,
I have access to the code and line number (see below), however,
I am at a loss as to why the exact same webpages run on my IIS5 machine.
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogin.Click

Dim oWebUser As cmvWebUser = New cmvWebUser
Dim oUser As cmvUser = New cmvUser

If tbUserName.Text = "" Or tbPassword.Text = "" Then
lblMissing.Text = "Please enter user ID and password"
Else
oUser = oWebUser.LogOn(tbUserName.Text, tbPassword.Text,
Session.SessionID)

Dim oRegistration As cmvRegistration = New cmvRegistration
*-->>>If oUser.Security = "ADMIN" Then

oRegistration =
oRegistration.GetRegistration(tbUserName.Text)

If oRegistration.Approved = "A" Then
Response.Redirect("/client/activation.aspx?UserID=" &
tbUserName.Text)
End If

If oRegistration.Approved = "N" Then
Response.Redirect("/client/approve.aspx")
End If

End If

End Sub
The oWebUser.LogOn method interacts with our back office system (mvbase)
to
verify the login details. I have a telnet session logged on to the same
port so I can watch the transaction however, it doesnt fire.

It stops at the oUser.Security = "ADMIN" line, which the object is
created
a few lines before from class cmvUser.

I am trying to set up remote debugging to see what is and isnt firing, but
windows 2000, VSNet 2003 on my development machine and Win 2003 and iis6
on
my server are giving me all sorts of problems and many hours googling...
I
am at a stage now where I need to install the remote debugging components
on
the server, only to find the disc isnt on site. It will have to wait till
tmrw.

Terry.

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:uR**************@TK2MSFTNGP04.phx.gbl...
Without code and a line number it's impossible to debug. There's nothing
specific about iis 6 that jumps in my mind. NullReference errors tend to

be
_very_ easy to debug though...If you deploy your pdb and get a line #,
you'll have it fixed in a couple minutes.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Terry Strachan" <te***@nospamthanksimfull.mertongroup.co.uk> wrote in
message news:O4**************@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I have an asp.net webapp that works fine on my development machine,
> win2k/iis5 however, when I move the site across to win2k3 / iis6 i get the > following error on postback of any page;
>
> *------------------------------------------*
> Object reference not set to an instance of an object.
> Description: An unhandled exception occurred during the execution of
> the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
> Exception Details: System.NullReferenceException: Object reference not set > to an instance of an object.
> *------------------------------------------*
>
> This error only ocours on postback of a page standard aspx pages with code > behind etc work fine, but on postback - bang. I assume its a setting
> somewhere to tweak as it works fine on iis5.
>
> I have tried IIS5 Issolation mode in IIS6 but it is still the same.
>
> Any advice?
>
> Many thanks
>
> Terry.
>
>



Jun 6 '06 #5
I now have remote debugging set up and working and you were both right - the
logon method was returning a null. The problem had nothing to do with IIS,
or the OS, or VS... My error trapping wasn't very good.

The problem lay with the third party database connection software (mv.net) I
had configured it slightly wrong on the server but right on my test machine.

Ooops

Thanks for your help.

Terry.

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:uF**************@TK2MSFTNGP03.phx.gbl...
Ya, again, I'm not sure what it is about IIS6..but your oWebUser.LogOn is
obviously returning null. I can't offer much more help other than suggest
that you look into that method and figure out under what circumstances it'd be null...

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/

<snip>

Jun 7 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Areid_philombios | last post: by
1 post views Thread by Brian Henry | last post: by
1 post views Thread by eccsolutions | last post: by
reply views Thread by Brian | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.