pgrimes
Aug 15th, 2002, 04:40 PM
I'm having trouble moving some code from one server to another (again) :(
I have 2 identical systems. I uploaded some code to the server, and I'm getting an error message. I run the exact same code on my other system, and it doesn't have an error.
The error only happens when I debug the code (in vs .net) on the server (If I browse to the aspx, it has no problem).
Here's the error I get:
Server Error in '/cpthandler/processUploads' Application.
--------------------------------------------------------------------------------
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.
Source Error:
Line 392: Next files
Line 393:
Line 394: mainHTML.Text = mainHTML.Text & "<br /><br /><a href='../uploadFiles/file_upload.aspx'>Click here to upload more files</a>"
Line 395: objRS = Nothing
Line 396: objConn = Nothing
Source File: G:\WebServer\cpthandler\processUploads\processUpload.aspx.vb Line: 394
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
processUploads.processUpload.Page_Load(Object sender, EventArgs e) in G:\WebServer\cpthandler\processUploads\processUpload.aspx.vb:394
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.209; ASP.NET Version:1.0.3705.0
I have this at the top of my code:
Public Class processUpload
Inherits System.Web.UI.Page
Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm
Protected WithEvents mainHTML As System.Web.UI.WebControls.Literal
And the html source for the aspx has this:
<form id="Form1" method="post" runat="server">
<asp:Literal ID="mainHTML" Runat="server" />
</form>
Everything should be okay as far as syntax goes... like I said, the exact same code works on my other system when debugged.
thx,
Paul
I have 2 identical systems. I uploaded some code to the server, and I'm getting an error message. I run the exact same code on my other system, and it doesn't have an error.
The error only happens when I debug the code (in vs .net) on the server (If I browse to the aspx, it has no problem).
Here's the error I get:
Server Error in '/cpthandler/processUploads' Application.
--------------------------------------------------------------------------------
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.
Source Error:
Line 392: Next files
Line 393:
Line 394: mainHTML.Text = mainHTML.Text & "<br /><br /><a href='../uploadFiles/file_upload.aspx'>Click here to upload more files</a>"
Line 395: objRS = Nothing
Line 396: objConn = Nothing
Source File: G:\WebServer\cpthandler\processUploads\processUpload.aspx.vb Line: 394
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
processUploads.processUpload.Page_Load(Object sender, EventArgs e) in G:\WebServer\cpthandler\processUploads\processUpload.aspx.vb:394
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.209; ASP.NET Version:1.0.3705.0
I have this at the top of my code:
Public Class processUpload
Inherits System.Web.UI.Page
Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm
Protected WithEvents mainHTML As System.Web.UI.WebControls.Literal
And the html source for the aspx has this:
<form id="Form1" method="post" runat="server">
<asp:Literal ID="mainHTML" Runat="server" />
</form>
Everything should be okay as far as syntax goes... like I said, the exact same code works on my other system when debugged.
thx,
Paul