This project is read-only.

System crashes when trying to view the master backlog

Topics: Bug Discussion, Tackle Questions
Nov 2, 2007 at 4:46 PM
WHen trying to view the master backlog I get this error. I altered webconfig to debug so it shows where in the code it falls over. This is the message:

I have looked at the directory security and believe this is correctly configured to allow access...

Access to the path 'C:\Inetpub\wwwroot\Tackle\viewstate\MasterBacklog_if5a4155qwawwr2xwcrjwiqd.viewstate' 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:\Inetpub\wwwroot\Tackle\viewstate\MasterBacklog_if5a4155qwawwr2xwcrjwiqd.viewstate' 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 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:


Line 70: if (StoreViewStateInServer)
Line 71: {
Line 72: StreamWriter sw = new StreamWriter(GetFileName());
Line 73: f.Serialize(sw, state);
Line 74: sw.Close();


Source File: c:\Inetpub\wwwroot\Tackle\App_Code\ZipPage.cs Line: 72

Stack Trace:


UnauthorizedAccessException: Access to the path 'C:\Inetpub\wwwroot\Tackle\viewstate\MasterBacklog_if5a4155qwawwr2xwcrjwiqd.viewstate' is denied.
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014291
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +115
System.IO.StreamWriter.CreateFile(String path, Boolean append) +58
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +91
System.IO.StreamWriter..ctor(String path) +27
ZipPage.SavePageStateToPersistenceMedium(Object state) in c:\Inetpub\wwwroot\Tackle\App_Code\ZipPage.cs:72
System.Web.UI.Page.SaveAllState() +552
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1676

Nov 5, 2007 at 10:38 AM
Ok, sorry for troubling you. I have found the problem. It was permissions again! This time I checked to make sure that the IIS_WPG group was there and the user name was in that - all as per the excellent installation guide.

For some reason though, the ASP.NET account didn't have the access to the WWWroot directory! I corrected that and everything worked.

I know it's strange because I thought it would have access. Just shows that it's worth checking!
Nov 7, 2007 at 8:10 AM
I`m having the same problem you describe above.

I have followed all the steps in the installation guide. I'm trying to run the application on a Windows 2003 server.

I have already given permission for modification to the IIS_WPG group and the user name belongs to it, but still the same problem.

Probably there's some step missing in the process.

Any suggestion?

Access to the path 'C:\Inetpub\wwwroot\Tackle\viewstate\MasterBacklog_4xxqvgfh5lvjba551osugvy3.viewstate' 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:\Inetpub\wwwroot\Tackle\viewstate\MasterBacklog_4xxqvgfh5lvjba551osugvy3.viewstate' 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 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:

Line 70: if (StoreViewStateInServer)
Line 71: {
Line 72: StreamWriter sw = new StreamWriter(GetFileName());
Line 73: f.Serialize(sw, state);
Line 74: sw.Close();

Source File: c:\Inetpub\wwwroot\Tackle\App_Code\ZipPage.cs Line: 72

Stack Trace:

UnauthorizedAccessException: Access to the path 'C:\Inetpub\wwwroot\Tackle\viewstate\MasterBacklog_4xxqvgfh5lvjba551osugvy3.viewstate' is denied.
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +1971539
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +115
System.IO.StreamWriter.CreateFile(String path, Boolean append) +58
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +91
System.IO.StreamWriter..ctor(String path) +27
ZipPage.SavePageStateToPersistenceMedium(Object state) in c:\Inetpub\wwwroot\Tackle\App_Code\ZipPage.cs:72
System.Web.UI.Page.SaveAllState() +552
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1676

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
Coordinator
Nov 9, 2007 at 6:52 AM
What OS are you running Tackle on? That will change what security settings you might be missing.
Nov 12, 2007 at 8:29 AM
Thanks for your help.

We have already solved the problem.

By default, Windows 2003 Server sets in machine.config in the processModel section sets the user and password for the asp service. Microsoft recommends changing it to SYSTEM with AutoGenerate password.

However this doesn't solve the problem. Actually, our problem was that we were giving permission to a wrong user.

Thanks again