Apr 6, 2011 at 2:19 PM
Edited Apr 6, 2011 at 2:21 PM
|
Good Morning All:
When I ran Orchard in my hosting environment for the first time, I recieved the below error.
Here's what I did.. I installed it to my local pc and sql server using the Web Platform Installer, then I uploaded the site over FTP to the cloud. I also restored the database to the cloud and changed the connection string in the App_Data/Sites/Default/settings.txt
file, which seems to be the root of my problem. Illegal characters in path.
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.ArgumentException: Illegal characters in path.
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:
[ArgumentException: Illegal characters in path.]
System.IO.Path.CheckInvalidPathChars(String path) +126
System.IO.Path.Combine(String[] paths) +84
Orchard.FileSystems.AppData.AppDataFolder.Combine(String[] paths) in AppDataFolder.cs:90
Orchard.Data.SessionFactoryHolder.GetSessionFactoryParameters() in SessionFactoryHolder.cs:108
Orchard.Data.SessionFactoryHolder.BuildConfiguration() in SessionFactoryHolder.cs:79
Orchard.Data.SessionFactoryHolder.GetConfiguration() in SessionFactoryHolder.cs:62
Orchard.Data.SessionFactoryHolder.BuildSessionFactory() in SessionFactoryHolder.cs:74
Orchard.Data.SessionFactoryHolder.GetSessionFactory() in SessionFactoryHolder.cs:53
Orchard.Data.SessionLocator.For(Type entityType) in SessionLocator.cs:29
Orchard.Data.Repository`1.get_Session() in Repository.cs:26
Orchard.Data.Repository`1.get_Table() in Repository.cs:30
Orchard.Data.Repository`1.Fetch(Expression`1 predicate) in Repository.cs:126
Orchard.Data.Repository`1.Get(Expression`1 predicate) in Repository.cs:91
Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate) in Repository.cs:60
Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord() in ShellDescriptorManager.cs:52
Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor() in ShellDescriptorManager.cs:25
Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in ShellContextFactory.cs:66
Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings settings) in DefaultOrchardHost.cs:128
Orchard.Environment.DefaultOrchardHost.<CreateAndActivate>b__1(ShellSettings settings) in DefaultOrchardHost.cs:100
System.Linq.WhereSelectArrayIterator`2.MoveNext() +85
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +217
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +78
Orchard.Environment.DefaultOrchardHost.BuildCurrent() in DefaultOrchardHost.cs:88
Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize() in DefaultOrchardHost.cs:56
Orchard.Web.MvcApplication.Application_Start() in Global.asax.cs:22
[HttpException (0x80004005): Illegal characters in path.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9028953
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +131
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253
[HttpException (0x80004005): Illegal characters in path.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8950644
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
|
So, I added this logging statement:
for (int i = 0; i < paths.Length; i++ )
{
Logger.Debug(String.Format("paths[{0}]:{1}", i,paths[i]));
}
And, got the following output:
2011-04-06 09:00:37,229 [15] Orchard.FileSystems.AppData.AppDataFolder - paths[0]:Sites
DataConnectionString: Data Source=****;Initial Catalog=****;Persist Security Info=True;User ID=****;Password=****
DataPrefix: null
RequestUrlHost: null
RequestUrlPrefix: null
State: Running
EncryptionAlgorithm: AES
EncryptionKey: ****
HashAlgorithm: HMACSHA256
HashKey: ****
**** = Removed for security :)
And I found that the whole file is being read into the Name variable..
The solution was to upload the settings.txt as Binary, to preserve the text file format.. (I was using FileZilla so it probably transmitted the file as ASCII) ....
I recommend that these .txt files are switch to .xml files as parsing an xml document does not rely on the carriage returns in the file.. An XML file would be less succeptible to this sort of corruption via ftp transfer, and an install won't require
debugging skills, or reading my post.
Thanks!
I'm
super excited to build our first Orchard site!!
Rob
2011-04-06 09:00:37,229 [15] Orchard.FileSystems.AppData.AppDataFolder - paths[1]:Default
DataProvider: SqlServer
|