-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to load (with Roaming Profile?) #60
Comments
Have you been able to replicate this? I know there was discussion in Jabbr, not sure whether there was progress made. |
I am am able to perfectly replicate it by attempting on my account with a roaming profile using the following (in LinqPad):
I get this:
It works fine on my regular profile but not my roaming profile. Having a quick look with reflector this probably happens when the System.IO.LongPathDirectory.CreateDirectory(..) [internal class and method] fails. Sadly the IsolatedStorageFile class swallows any exception and simply throws its own "Initialization failed" exception so the details of why are lost. I'll attempt some reflector-fu and see if I can reproduce the underlying issue. |
OK I have confirmed that this is the issue and I believe that it is unique to my environment. Here is the code that
This shows that the path it is trying to create exists under a UNC path
This is not the first app that has run into this sort of issue with my roaming profile set up. We can potentially fix this by having a boolean setting to indicate whether Roaming profile is to be used or not because turning it off makes it work from my local drive. If that sounds OK I'll add it and send a pull request. |
Sorry, I failed to see the question at the end of this - yes, falling back to local directory for settings works for me. I think we've now changed to a XML based (rather than binary based) storage mechanism too. ie, settings provider code is different |
Also related (if we switch to a flag to toggle), #70 |
It raise "System.IO.IOException: The filename, directory name, or volume label syntax is incorrect." because function "InternalCreateDirectory" before creating folder through Win32 function, add to path "\myserver\userAccountm$\profile\Application Data\IsolatedStorage" prefix "?" which main that this path have type "long UNC", (IsolatedStorage in .NET 4 work with "long UNC" and .NET 3.5 with simple UNC). Long UNC path in this case must be "?\UNC\myserver\userAccountm$\profile\Application Data\IsolatedStorage" but in is "?\myserver\userAccountm$\profile\Application Data\IsolatedStorage" that is way Win32 function return error 123 which mean "The filename, directory name, or volume label syntax is incorrect." It looks like guys in Microsoft forget test it with network paths. Also I described this problem and workaround in social.msdn: http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/74712ff7-3611-40d0-a983-945b0307ffe8 |
Closing this as we're using SettingsProvider.net - see JakeGinnivan/SettingsProvider.net#5 for the current state of affairs |
So far my experiments have shown that I cannot load MarkPad under my corporate account but I can under my regular account. I suspect this has to do with my Roaming Profile and I'm happy to explorer further. Details as recorded in the Event Log are as follows:
Application: MarkPad.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Autofac.Core.DependencyResolutionException
Stack:
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
at MarkPad.SingleInstanceManager.Main(System.String[])
The text was updated successfully, but these errors were encountered: