Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New .NET 2003 Install issues ... 2

Status
Not open for further replies.

kizmar2

Programmer
Joined
May 25, 2004
Messages
164
Location
US
I just installed .NET 2003 and I'm trying to run an ASP.NET project I started. When I hit "Start" (to run the project on my localhost), it's giving me the following error:

Code:
Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\maximizetech_time\451e5d24\bcf8fd9e" is denied. 
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.UnauthorizedAccessException: Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\maximizetech_time\451e5d24\bcf8fd9e" is denied. 

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. 

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[UnauthorizedAccessException: Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\maximizetech_time\451e5d24\bcf8fd9e" is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
   System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +632
   System.IO.Directory.CreateDirectory(String path) +195
   System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext context) +85
   System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpContext context) +97
   System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile) +29
   System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation() +91
   System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) +148
   System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() +125
   System.Web.UI.TemplateParser.GetParserCacheItem() +88
   System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser& parser) +171
   System.Web.HttpApplicationFactory.CompileApplication(HttpContext context) +43
   System.Web.HttpApplicationFactory.Init(HttpContext context) +485
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +170
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +414

KizMar
------------
 
Try setting up the relevant folder permissions for the ASPNET user on the folder shown in the error message.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Ouch. ca8msm was just a little faster!

----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
I had less to type than you [smile]


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
When I right click on the folder and go to Properties, there is no Security tab... ?

KizMar
------------
 
Have you searched google for that security tab scenario? It is quite easy to find info on and fix:



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Well... I got the Security tab to show. Gave the ASP.NET user full access to the "...framework\v1.1.4322..." folder as it says in the error... and it still isn't working.

Actually, the full path in the error doesn't even exist, when I have the project running and have the browser window up displaying the error, I explore to the location and it's not even there.

It shows: "Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\maximizetech_time\024651e3\9f126f93" is denied."

But I only have: "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\"

KizMar
------------
 
Make sure that the Temporary ASP.NET Files folder has had the permissions cascaded down to it (depending on how you added the permissions, this may not have happened).

Also, those temporary files may not show in windows explorer but they do exist.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
The ASPNET user needs full control over "Temporary ASP.NET Files". The likely reason the directory listed doesn't exist is that it's dynamically created by ASP.NET when it compiles the application to run and unless the ASPNET user has full control of the folder, it may have failed to create the directory for lack of permissions or something.

Instead of fiddling with all the necessary permissions to everything, however, I'd suggest you

1. Delete the ASPNET user.
2. Uninstall ASP.NET on the server via regiis_aspnet -u
3. Reinstall ASP.NET via regiis_aspnet -i

That should recreate the ASPNET user and give it the appropriate permissions.
 
Is "regiis_aspnet" something I use from a command prompt? If so, what directory do I have to be in to run it? I tried from c: and it says it's not recognized.

KizMar
------------
 
Go to the framework folder and try it from there


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
ca8msm's right about the location (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322) or you can also try the Visual Studio 2003 Command Prompt (found in the programs->Visual Studio whatever->Visual Studio Tools folder) which should be able to run the utility from whatever directory you're in.
 
I found it... but it's actually called "aspnet_regiis". :)

THAT WORKED!!! WOOHHOOOOOOO!!!

Thanks!

KizMar
------------
 
Oops...didn't spot that typo!


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Doh! My bad.

Good to hear you figured it out, though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top