System.NullReferenceException.

mhsueh001

Freshman
Joined
Dec 31, 1969
Messages
41
I'm coding in ASP.NET with code behinds done in VB.NET. THe ASP.NET program works fine on my local server. However when I try to upload the files to the hosting server my default.aspx page loads fine, but any link buttons that I have that reference any of my pages stopped working. I can't access them using the Response.Redirect(Request.ApplicationPath & "\login.aspx")
It keeps saying it can't find the page. I tried hard coding in the full path and it still gives me the error.


If I try to access the login.aspx page directly it gives me this error:
System.NullReferenceException: Object reference not set to an instance of an object

Help!!
:confused:
 
PlausiblyDamp said:
Does Response.Redirect("login.aspx") work

Hi, no it does not work. I wrote a simple aspx page with only that one line of code and it didn't work. I'm confused. Do you have any clues?

Thanks.
 
MorningZ said:
does "doesn't work" mean:
- Gave an error
- Just didn't do anything?


care to post some extensive code?

Sorry, I should have been more explainatory. I just though since he/she suggested the error he/she would have and idea.

I tried simply <% response.redirect "Login.aspx" %>
where Login.aspx is in my webroot directory.

Looking at the stack trace I noticed it's looking for a sub folder:
c:\inetpub\wwwroot\Messages\Login.aspx.vb

where Messages was the name of my original project. Is this a namespace issue?

I tried setting up a directory on my host server called Messages and placing Login.aspx there, but I'm still getting the same error as before.


I'm getting the following error:

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.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
JobCenter.frmLogin.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Messages\Login.aspx.vb:33
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +742



Thank you for any further insite you can provide.
 
Last edited:
Back
Top