WPF problem

2007-01-05 11:48:54 by Kjell-Åke Gafvelin

For some reason I get an error when I run a XAML file from a website, I have checked the security settings for XAML and XBAP and they are enabled, but if I save the file to disk and run it it works flawless.

The error that I get is the following:

Startup URI:
Application Identity: file:///c:/WINDOWS/Microsoft.Net/Framework/v3.0/WPF/XamlViewer/XamlViewer_v0300.xbap#XamlViewer_v0300.application, Version=, Culture=neutral, PublicKeyToken=c3bce3770c238a49, processorArchitecture=msil/XamlViewer_v0300.exe, Version=, Culture=neutral, PublicKeyToken=c3bce3770c238a49, processorArchitecture=msil, type=win32

System.Configuration.ConfigurationErrorsException: Error creating the Web Proxy specified in the '' configuration section. ---> System.Net.Sockets.SocketException: An invalid argument was supplied
at System.Net.SafeCloseSocketAndEvent.CreateWSASocketWithEvent(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType, Boolean autoReset, Boolean signaled)
at System.Net.NetworkAddressChangePolled..ctor()
at System.Net.AutoWebProxyScriptEngine.AutoDetector.Initialize()
at System.Net.AutoWebProxyScriptEngine.AutoDetector.get_CurrentAutoDetector()

And when I try to run an XBAP file from a website I get the following error:

Startup URI:
Application Identity:, Version=, Culture=neutral, PublicKeyToken=256a0a4972738a32, processorArchitecture=msil/FinanceApplication.exe, Version=, Culture=neutral, PublicKeyToken=256a0a4972738a32, processorArchitecture=msil, type=win32

System.Runtime.InteropServices.COMException (0xFFFFFFFF): Exception from HRESULT: 0xFFFFFFFF
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Deployment.Application.LockedFile.AcquireLock(String path, TimeSpan timeout, Boolean writer)
at System.Deployment.Application.SubscriptionStore.AcquireLock(DefinitionIdentity asmId, Boolean writer)
at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)
at System.Deployment.Application.SubscriptionStore.get_CurrentUser()
at System.Deployment.Application.DeploymentManager..ctor(Uri deploymentSource, Boolean isUpdate, Boolean isConfirmed, DownloadOptions downloadOptions, AsyncOperation optionalAsyncOp)

What I have found out so far for this error is that it tries to lock a temporary file that does not exist!

If you have any clue what could be causing this please leave a comment or send a mail!

Problem solved! It was the very annoying software firewall that our organization installs on all computers that caused the errors... Crap!