problem w/ configSections and dll not deployed in GAC or locally

R

Renee Petris

I'm trying to setup a development environment that allows developers
to access the latest versions of dlls from a build server, and doesn't
require that they copy the dlls onto their local hard drive. Our final
application will be very large with hundreds of dlls, so trying to
keep local machines in sync with copied dlls or dlls that need to be
installed in the GAC isn't practical.

I'm running into a problem with configSections when I load a dll of a
mapped drive, and I tell Visual Studio not to copy the dll locally.
The dll is loaded, but when the code tries to call
ConfigurationSettings.GetConfig(xxx), the call fails. In this case I'm
trying to use Microsoft's User Interface Process Application Block.

The complete debug output shows that the dll was loaded from the t:
drive, which is on the build server. But then the application fails to
load the configuration paramters. See below.

'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No
symbols loaded.
'LEDemoWinUI': Loaded
'D:\wrk\LEDemoRefactor\WinUI\bin\Debug\LEDemoWinUI.exe', Symbols
loaded.
'LEDemoWinUI.exe': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll',
No symbols loaded.
'LEDemoWinUI.exe': Loaded
't:\microsoft.applicationblocks.uiprocess.dll', Symbols loaded.
'LEDemoWinUI.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.
'LEDemoWinUI.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No symbols loaded.
'LEDemoWinUI.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.
Error loading UIP config parameters. : at
Microsoft.ApplicationBlocks.UIProcess.UIPConfiguration.get_Config() in
D:\wrk\uiprocessdemo\AppBlockUIProcess\UIPConfig.cs:line 910
at Microsoft.ApplicationBlocks.UIProcess.StatePersistenceFactory.Create(String
navigationGraph) in d:\wrk\uiprocessdemo\appblockuiprocess\concretefactories.cs:line
64
at Microsoft.ApplicationBlocks.UIProcess.StateFactory.Create(String
navigationGraphName) in
d:\wrk\uiprocessdemo\appblockuiprocess\concretefactories.cs:line 326
at Microsoft.ApplicationBlocks.UIProcess.UIPManager.StartTask(Form
parentForm, String navigationGraphName, ITask task,
TaskArgumentsHolder taskArguments) in
D:\wrk\uiprocessdemo\AppBlockUIProcess\UIPManager.cs:line 149
at Microsoft.ApplicationBlocks.UIProcess.UIPManager.StartTask(String
navigationGraphName) in
D:\wrk\uiprocessdemo\AppBlockUIProcess\UIPManager.cs:line 99
at TE.SOP.LegalEntity.WinUI.Forms.Starter.Main() in
D:\wrk\LEDemoRefactor\WinUI\LegalEntity\Starter.cs:line 30
The program '[2332] LEDemoWinUI.exe' has exited with code 0 (0x0).


The embedded error information is:

StackTrace " at System.Configuration.ConfigurationRecord.GetFactory(String
configKey)\r\n at System.Configuration.ConfigurationRecord.Evaluate(String
configKey)\r\n at System.Configuration.ConfigurationRecord.ResolveConfig(String
configKey)\r\n at System.Configuration.ConfigurationRecord.GetConfig(String
configKey)\r\n at System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfigurationSystem.GetConfig(String
configKey)\r\n at System.Configuration.ConfigurationSettings.GetConfig(String
sectionName)\r\n at
Microsoft.ApplicationBlocks.UIProcess.UIPConfiguration.get_Config() in
D:\\wrk\\uiprocessdemo\\AppBlockUIProcess\\UIPConfig.cs:line
906" string

My configuration file looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="uipConfiguration"
type="Microsoft.ApplicationBlocks.UIProcess.UIPConfigHandler,
Microsoft.ApplicationBlocks.UIProcess, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=8e46a09178151420"/>
</configSections>

<uipConfiguration>
<!-- eliminated for clarity -->
</uipConfiguration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity
name="Microsoft.ApplicationBlocks.UIProcess"
publicKeyToken="8e46a09178151420"
culture="neutral"/>
<codeBase version="1.0.0.0"

href="file:///T:/Microsoft.ApplicationBlocks.UIProcess.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.ApplicationBlocks.Data"
publicKeyToken="8e46a09178151420"
culture="neutral"/>
<codeBase version="1.0.0.0"

href="file:///T:/Microsoft.ApplicationBlocks.Data.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

</configuration>

I tried a test program to check my type definition in the App.config.
Using the same <runtime> tag information, the following code returned
a valid object:

Type uipConfigHandle =
Type.GetType("Microsoft.ApplicationBlocks.UIProcess.UIPConfigHandler,
Microsoft.ApplicationBlocks.UIProcess, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=8e46a09178151420");
Object o = Activator.CreateInstance(uipConfigHandle);
System.Diagnostics.Debug.WriteLine(o.GetType());

My local intranet zone has full permissions. Explicitly adding the
build server name to my local intranet zone didn't change anything.
Besides, I'm not seeing a security exception anyway. Does anyone have
any ideas?

Thanks,

Renee Petris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top