G
Guest
Hi all
I am having problem in ASP.NET and I hope I can find solution in here
While studying the "MCAD/MCSD Training Kit—Developing Web Applications with Microsoft Visual Basic .NET and Microsoft Visual C# .NET" Training kit I get an error. Here is the error
--------------------------------------------------------------------------------------------------------------------------------------------
Error: Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object
Source Error:
Line 36:
Line 37: ' Get path
Line 38: strPath = Session("C:\Inetpub\wwwroot\ASPNETEXAMPLES\Chapter-04c").ToString(
Line 39: ' If this is not a post-back event
Line 40: If Not IsPostBack The
Source File: c:\inetpub\wwwroot\ASPNETEXAMPLES\Chapter-04c\FileManager.aspx.vb Line: 38
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.
Chapter_04c.FileManager.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\ASPNETEXAMPLES\Chapter-04c\FileManager.aspx.vb:3
System.Web.UI.Control.OnLoad(EventArgs e) +6
System.Web.UI.Control.LoadRecursive() +3
System.Web.UI.Page.ProcessRequestMain() +73
---------------------------------------------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
-------------------------------------------------------------------------------------------------------------------------------------------
I also have this information in my hand:-
--------------------------------------------
IMPORTANT
To create and delete files, the ASPNET user account must have write and modify privileges in the application’s root folder. By default, the ASPNET user account has only read and execute privileges. See Chapter 9, “Building and Deploying Web Applications,†for information about how to assign security privileges in the application folder
---------------------------------------------
Currently I am accesing with VS Studion.Net account so ASPNET account is not a problem
My problem is how to get the path in ASP.NET. And this is not a PostBack event
Line 37: ' Get path
Line 38: strPath = Session("C:\Inetpub\wwwroot\ASPNETEXAMPLES\Chapter-04c").ToString(
Line 39: ' If this is not a post-back event
Line 40: If Not IsPostBack The
Can anyone tell me where I can find information to correct the problem. But I am more than happy to write the correct code that if anyone knows the answer
I thank you in advance
Rgds
GC
I am having problem in ASP.NET and I hope I can find solution in here
While studying the "MCAD/MCSD Training Kit—Developing Web Applications with Microsoft Visual Basic .NET and Microsoft Visual C# .NET" Training kit I get an error. Here is the error
--------------------------------------------------------------------------------------------------------------------------------------------
Error: Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object
Source Error:
Line 36:
Line 37: ' Get path
Line 38: strPath = Session("C:\Inetpub\wwwroot\ASPNETEXAMPLES\Chapter-04c").ToString(
Line 39: ' If this is not a post-back event
Line 40: If Not IsPostBack The
Source File: c:\inetpub\wwwroot\ASPNETEXAMPLES\Chapter-04c\FileManager.aspx.vb Line: 38
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.
Chapter_04c.FileManager.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\ASPNETEXAMPLES\Chapter-04c\FileManager.aspx.vb:3
System.Web.UI.Control.OnLoad(EventArgs e) +6
System.Web.UI.Control.LoadRecursive() +3
System.Web.UI.Page.ProcessRequestMain() +73
---------------------------------------------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
-------------------------------------------------------------------------------------------------------------------------------------------
I also have this information in my hand:-
--------------------------------------------
IMPORTANT
To create and delete files, the ASPNET user account must have write and modify privileges in the application’s root folder. By default, the ASPNET user account has only read and execute privileges. See Chapter 9, “Building and Deploying Web Applications,†for information about how to assign security privileges in the application folder
---------------------------------------------
Currently I am accesing with VS Studion.Net account so ASPNET account is not a problem
My problem is how to get the path in ASP.NET. And this is not a PostBack event
Line 37: ' Get path
Line 38: strPath = Session("C:\Inetpub\wwwroot\ASPNETEXAMPLES\Chapter-04c").ToString(
Line 39: ' If this is not a post-back event
Line 40: If Not IsPostBack The
Can anyone tell me where I can find information to correct the problem. But I am more than happy to write the correct code that if anyone knows the answer
I thank you in advance
Rgds
GC