Server Error in '/' Application.

Access to the path 'c:\webhosting\data\Config\Global.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 'c:\webhosting\data\Config\Global.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 File 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 77:         <div class="content">
Line 78:             <p>
Line 79:                 订购热线:<span><%=NSW.OConfig.GlobalConfig.FindPinServiceTel %></span><em><a <%=NSW.OConfig2.SMTP.SiteServiceURL %>
Line 80:                     title="点击咨询"><img src="/loading.gif" _src="/Skins/Default/Img/Index/ban_btn.gif" alt="点击咨询" /></a></em></p>
Line 81:         </div>

Source File: c:\webhosting\data\Product\index.aspx    Line: 79

Stack Trace:


[UnauthorizedAccessException: Access to the path 'c:\webhosting\data\Config\Global.config' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +666
   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) +1135
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +67
   System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) +36
   System.Xml.XmlDocument.Save(String filename) +79
   NSW.Utls.XmlUtls.Set(String key, String newValue, String path) +289
   NSW.OConfig.GlobalConfig.Save(String key, Object val) +120
   NSW.OConfig.GlobalConfig.set_ServiceQQ1(String value) +36
   NSW.OConfig2.SMTP.get_SiteServiceURL() +792
   ASP.product_index_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\webhosting\data\Product\index.aspx:79
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +88
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +25
   System.Web.UI.Page.Render(HtmlTextWriter writer) +30
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +52
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +197
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5764


Version Information: Microsoft .NET Framework Version:2.0.50727.9044; ASP.NET Version:2.0.50727.9047