Cant Login - NEED HELP NOW PLEASE

Topics: Developer Forum, User Forum
May 16, 2008 at 12:42 AM
Hi I finally finished developing my page locally and loaded it on to our web server and as soon as I tried logging in with my administrator user name and password I got the following error.  I need to get on so I can make some changes, please help.

 

Server Error in '/' Application.

Access to the path 'd:\hosting\mrmeyer4cac\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\mrmeyer4cac\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 514:            lock (_path)
Line 515:            {
Line 516: _users.WriteXml(_path, XmlWriteMode.WriteSchema);Line 517:            }
Line 518:        }

Source File: d:\hosting\mrmeyer4cac\App_Code\Providers\CustomXmlMembershipProvider.cs    Line: 516

Stack Trace:

[UnauthorizedAccessException: Access to the path 'd:\hosting\mrmeyer4cac\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
   MyWebPagesStarterKit.Providers.CustomXmlMembershipProvider.save() in d:\hosting\mrmeyer4cac\App_Code\Providers\CustomXmlMembershipProvider.cs:516
   MyWebPagesStarterKit.Providers.CustomXmlMembershipProvider.ValidateUser(String username, String password) in d:\hosting\mrmeyer4cac\App_Code\Providers\CustomXmlMembershipProvider.cs:477
   System.Web.Security.Membership.ValidateUser(String username, String password) +43
   NLogin.AuthUser(Object sender, AuthenticateEventArgs e) in d:\hosting\mrmeyer4cac\Login.aspx.cs:82
   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +106
   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
<!-- [UnauthorizedAccessException]: Access to the path 'd:\hosting\mrmeyer4cac\App_Data\Users.config' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at 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) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) at System.Data.DataTable.WriteXml(String fileName, XmlWriteMode mode, Boolean writeHierarchy) at System.Data.DataTable.WriteXml(String fileName, XmlWriteMode mode) at MyWebPagesStarterKit.Providers.CustomXmlMembershipProvider.save() in d:\hosting\mrmeyer4cac\App_Code\Providers\CustomXmlMembershipProvider.cs:line 516 at MyWebPagesStarterKit.Providers.CustomXmlMembershipProvider.ValidateUser(String username, String password) in d:\hosting\mrmeyer4cac\App_Code\Providers\CustomXmlMembershipProvider.cs:line 477 at System.Web.Security.Membership.ValidateUser(String username, String password) at NLogin.AuthUser(Object sender, AuthenticateEventArgs e) in d:\hosting\mrmeyer4cac\Login.aspx.cs:line 82 at System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) at System.Web.UI.WebControls.Login.AttemptLogin() at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.login_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\eb370e03\d21faacc\App_Web_eig5p2ho.10.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
May 16, 2008 at 10:46 AM
Hi!

Perhaps you only forgot to grant write access for the ASPNET-User to the App_Data directory (?), which leads to an error, when the mwpsk is trying to write xml-Data to the filesystem.

Alex.
May 16, 2008 at 3:29 PM


Allinger wrote:
Hi!

Perhaps you only forgot to grant write access for the ASPNET-User to the App_Data directory (?), which leads to an error, when the mwpsk is trying to write xml-Data to the filesystem.

Alex.


If your refering to the directory on my GoDaddy hosting plan, then no I went in and changed the permissions to read write with their technical service rep, and that didnt work.  If I have to change the security permissions in the file itself on my computer before I FTP it to the web server, I am not sure how to do that.  I followed the instructions in the above error message and it's not coming up as it is supposed to, or I am simply missing something.
May 16, 2008 at 3:52 PM
Edited May 16, 2008 at 3:53 PM


Allinger wrote:
Hi!

Perhaps you only forgot to grant write access for the ASPNET-User to the App_Data directory (?), which leads to an error, when the mwpsk is trying to write xml-Data to the filesystem.

Alex.


Okay so I figured out how to set the security permissions for the user.config file and it still didnt work when I reloaded the file to the web server, I got the same error message.  You will see below that I set the permissions for the file, does anyone else have any ideas as to why I cant log on to my pages or how I can fix this?

ASP.NET Machine Account (JASON\ASPNET)
May 16, 2008 at 4:09 PM


mrmeyer4irm wrote:


Allinger wrote:
Hi!

Perhaps you only forgot to grant write access for the ASPNET-User to the App_Data directory (?), which leads to an error, when the mwpsk is trying to write xml-Data to the filesystem.

Alex.


Okay so I figured out how to set the security permissions for the user.config file and it still didnt work when I reloaded the file to the web server, I got the same error message.  You will see below that I set the permissions for the file, does anyone else have any ideas as to why I cant log on to my pages or how I can fix this?

ASP.NET Machine Account (JASON\ASPNET)



Problem fixed, I reset the permissions from my root directory down to allow write capabilities and that fixed the problem.