This project is read-only.

Site breaks after upload to

Topics: Developer Forum
Jul 15, 2008 at 6:01 PM
I have free hosting via for testing. Well every time I upload the site to godaddy it messes up the layout and login. The Page layout is off a little the menu is pushed over, my news list is in the middle of the page not at the top where it should be. Also when I go to login to edit I get this error...

Server Error in '/' Application.

Access to the path 'd:\hosting\XXXXXXXXX713\App_Data\Users.config' 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 'd:\hosting\XXXXXXXXXXX713\App_Data\Users.config' 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 511:            lock (_path)
Line 512: {
Line 513: _users.WriteXml(_path, XmlWriteMode.WriteSchema);
Line 514: }
Line 515: }

Source File: d:\hosting\jXXXXXXXXXXX713\App_Code\Providers\CustomXmlMembershipProvider.cs    Line: 513

Stack Trace:

[UnauthorizedAccessException: Access to the path 'd:\hosting\XXXXXXXXXXXX713\App_Data\Users.config' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +651
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) +1038
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +114
System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) +38
System.Data.DataTable.WriteXml(String fileName, XmlWriteMode mode, Boolean writeHierarchy) +76
System.Data.DataTable.WriteXml(String fileName, XmlWriteMode mode) +10 in d:\hosting\XXXXXXXXXXXX713\App_Code\Providers\CustomXmlMembershipProvider.cs:513
MyWebPagesStarterKit.Providers.CustomXmlMembershipProvider.ValidateUser(String username, String password) in d:\hosting\XXXXXXXXXXXX713\App_Code\Providers\CustomXmlMembershipProvider.cs:474
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
System.Web.UI.WebControls.Login.AttemptLogin() +105
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

 Has anyone had this happen if so how did you fix it? Is this an error from godaddy or something I messed up in the code?

Jul 19, 2008 at 2:35 PM
You need to set the write permission on the App_Data folder.