Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: XmlConfiguration and WPF

$
0
0
Re: XmlConfiguration and WPF
West Wind Application Configuration
Re: XmlConfiguration and WPF
Jul. 16, 2013
02:08 pm
3U00UBH64Show this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:vRITHNER
Make sure you have permissions to read and the configuration file (if it doesn't exist). In Web applications your Application Pool account has to have rights. On a desktop app you can run into problems because by default you don't have any write access to non-user folders. If the Xml file doesn't exist it'll try to create.

If possible step into the code (you can recompile the configuration assembly in debug mode and distribute the PDB file) to see where in the code it breaks, but my guess is permissions are at fault here.

+++ Rick ---



Hi Rick, I'm just testing the XmlFileConfiguration in the Asp.NET sample and I get an error
"Unhandled Execution Error

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.InvalidOperationException:

Source Error:


Line 240: Provider = provider;
Line 241: if (!Provider.Read(this))
Line 242: throw new InvalidOperationException(Provider.ErrorMessage);
Line 243: }
Line 244:
"
When I test the XmlConfiguration in a WPF project (.NET 4.5), I get also an error "An unhandled exception of type 'System.InvalidOperationException' occurred in Westwind.Utilities.Configuration.dll "

protectedvirtualvoid OnInitialize(IConfigurationProvider provider, string sectionName,object configData) {if (provider == null) provider = OnCreateDefaultProvider(sectionName, configData); Provider = provider; if (!Provider.Read(this))thrownew InvalidOperationException(Provider.ErrorMessage); }

Any idea what's is going on ?

txs in advance
-Vince




Rick Strahl
West Wind Technologies


from Geneva


Viewing all articles
Browse latest Browse all 10393

Trending Articles