UnauthorizedAccessException

Discussion in 'ASP.NET / ASP.NET Core' started by timhebel, Jul 11, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi, When I try to use the Admin section of my .Net starter kit app, I get the folloing error. How can I set the permission properly?

    Thanks,
    Tim

    Access to the path "E:\web\tsedigitalc\htdocs\PortalCSVS\PortalCfg.xml" is denied. </o:p>
    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 "E:\web\tsedigitalc\htdocs\PortalCSVS\PortalCfg.xml" 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: </o:p>




    Code:
    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.
    </o:p>

    Stack Trace: </o:p>



    </o:p>[UnauthorizedAccessException: Access to the path "E:\web\tsedigitalc\htdocs\PortalCSVS\PortalCfg.xml" is denied.]</o:p> System.IO.__Error.WinIOError(Int32 errorCode, String str) +393</o:p> System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888</o:p> System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +45</o:p> System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) +34</o:p> System.Data.DataSet.WriteXml(String fileName, XmlWriteMode mode) +48</o:p> System.Data.DataSet.WriteXml(String fileName) +7</o:p> ASPNET.StarterKit.Portal.Configuration.SaveSiteSettings() in C:\Program Files\ASP.NET Starter Kits\ASP.NET Portal (CSVS)\PortalCSVS\Components\Configuration.cs:778</o:p> ASPNET.StarterKit.Portal.Configuration.AddTab(Int32 portalId, String tabName, Int32 tabOrder) in C:\Program Files\ASP.NET Starter Kits\ASP.NET Portal (CSVS)\PortalCSVS\Components\Configuration.cs:93</o:p> ASPNET.StarterKit.Portal.Tabs.AddTab_Click(Object Sender, EventArgs e) in C:\Program Files\ASP.NET Starter Kits\ASP.NET Portal (CSVS)\PortalCSVS\admin\Tabs.ascx.cs:159</o:p> System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108</o:p> System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57</o:p> System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18</o:p> System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138</o:p> System.Web.UI.Page.ProcessRequestMain() +1292</o:p>
     
  2. Thanks for the response, but the permission manager requires a "username"... But the portal starter kit does not have a username.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    you can do so in the permission manager in the control panel. contact support if you still have problem.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page