Helios does not use configSource on connectionStrings in web.config
If you have something like
<connectionStrings configSource="connectionStringSource.config"></connectionStrings>
It fails using the Helios host
Server Error in '/' Application.
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.]
[ConfigurationErrorsException: The configSource attribute is invalid.: Illegal characters in path. (line 7)]
[TypeInitializationException: The type initializer for 'System.Net.ComNetOS' threw an exception.]
[TypeInitializationException: The type initializer for 'System.Net.ServicePointManager' threw an exception.] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +303
[HttpException (0x80004005): The type initializer for 'System.Net.ServicePointManager' threw an exception.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9915300 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446
Note that this works on Helios vNext but not on the "Katana version".
Same problem!
Thanks a lot for the info @PinpointTownes ! I will upgrade to vNext eventually but as for now I resolved this issue by inlining the file referred to by the configSource attribute.
Inlining the file?
Yep, I replaced the
That workaround was good for me when prototyping, but it will not work in production. However, I will not put Helios v2.1 into production anyways.
This issue is now resolved in the Katana-based version pending the next release.
@GrabYourPitchforks out of curiosity, how did you fix this issue? :astonished:
@PinpointTownes IIS's configuration system uses Windows long paths ("?\C:\directory\web.config"), but System.Configuration only supports normalized paths and UNC paths when looking at the 'configSource' attribute. I implemented a small fixup routine to convert back and forth between the two formats.
@GrabYourPitchforks thanks for the details :innocent:
111