Access to the path 'C: \ WebSites \ mywebsite \ myfile.xml' 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 occurred in the code.
Exception Details: System.UnauthorizedAccessException: Access to path 'C: \ WebSites \ mywebsite \ myfile.xml' is denied.
ASP.NET does not have permission to access the requested resource. Consider granting access rights to a resource to an ASP.NET request identifier. ASP.NET has a basic process identifier (usually {MACHINE} \ ASPNET on IIS 5 or network service on IIS 6 and IIS 7, and a configured application pool identifier in IIS 7.5), which is used if the application does not impersonate. If the application pretends to be using, the identity will be an anonymous user (usually IUSR_MACHINENAME) or an authenticated user request.
ASP.NET , , "" "". "", . ASP.NET, .
:
-. .
:
[UnauthorizedAccessException: 'C:\WebSites\mywebsite\myfile.xml' .]
System.IO.__ Error.WinIOError(Int32 errorCode, String maybeFullPath) +12892935 System.IO.FileStream.Init(String path, FileMode, FileAccess, Int32, Boolean useRights, FileShare, Int32 bufferSize, FileOptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) +2481
System.IO.FileStream..ctor(String , FileMode, FileAccess , FileShare, Int32 bufferSize, FileOptions, String msgPath, Boolean bFromProxy) +229 System.IO.FileStream..ctor(String , FileMode, FileAccess , FileShare) +102
System.Xml.XmlWriterSettings.CreateWriter(String outputFileName) +5224496
System.Xml.Linq.XElement.Save(String fileName, SaveOptions) +108
mesoBoard.Services.SiteConfig.UpdateCache() +1971 mesoBoard.Web.MvcApplication.OnApplicationStarted() +62 Ninject.Web.Mvc.NinjectHttpApplication.Application_Start() +604
[HttpException (0x80004005): 'C:\WebSites\mywebsite\myfile.xml' .]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext , HttpApplication) +3985477 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext, MethodInfo []) +191
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo [] , IntPtr , HttpContext) +325 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr , HttpContext) +407 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375
[HttpException (0x80004005): 'C:\WebSites\mywebsite\myfile.xml' .]
System.Web.HttpRuntime.FirstRequestInit(HttpContext ) +11524352
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext ) +141
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext) +4782309