This project is read-only.

Could not find a part of the path 'settings.xml'

Topics: ASP.NET 2.0
Aug 27, 2008 at 10:03 PM
Edited Aug 27, 2008 at 11:49 PM

I am wondering why my application when deployed to host server can not find the path to 'App_Data' folder. Physically it was there but my application couldn't just found it.
My directory structure is 'd:\hosting\<hostingaccountname>\blog\app_data\settings.xml' and my domain is directly pointed to 'blog' directory.


There is no delete option for this post so I'll just let you know that after about 3 hours it's working already. I don't know but maybe the settings from cpanel didn't take effect immediately. Weird.

Aug 28, 2008 at 3:56 AM
Is the \blog\ directory configured as an application? If it isn't then your app would be looking in d:\hosting\<name>\App_Data instead of d:\hosting\<name>\blog\App_Data since the application root would be d:\hosting\<name>\
May 4, 2009 at 8:53 PM
Not sure if this is related, but getting this error.  My host said that the installed drive id g and not c.  What file to change ?

Server Error in '/Blog' Application.

Could not find a part of the path 'c:\Blog\App_Data\pages\b663b6a1-1c34-4c60-a891-c14772507b23.xml'.

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.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\Blog\App_Data\pages\b663b6a1-1c34-4c60-a891-c14772507b23.xml'.

Source Error:

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.

Stack Trace:

[DirectoryNotFoundException: Could not find a part of the path 'c:\Blog\App_Data\pages\b663b6a1-1c34-4c60-a891-c14772507b23.xml'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +193
   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) +1162
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +64
   System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) +77
   System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +54
   System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +74
   System.Threading.CompressedStack.runTryCode(Object userData) +70
   System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0
   System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) +108
   System.Xml.XmlTextReaderImpl.OpenUrl() +186
   System.Xml.XmlTextReaderImpl.Read() +208
   System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +112
   System.Xml.XmlDocument.Load(XmlReader reader) +108
   System.Xml.XmlDocument.Load(String filename) +87
   BlogEngine.Core.Providers.XmlBlogProvider.SelectPage(Guid id) +173
   BlogEngine.Core.Providers.BlogService.SelectPage(Guid id) +44
   BlogEngine.Core.Page.DataSelect(Guid id) +32
   BlogEngine.Core.Page.Load(Guid id) +61
   BlogEngine.Core.Providers.XmlBlogProvider.FillPages() +222
   BlogEngine.Core.Page.get_Pages() +78
   BlogEngine.Core.Page.GetFrontPage() +10
   BlogEngine.Core.Web.HttpModules.UrlRewrite.context_BeginRequest(Object sender, EventArgs e) +363
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75