Ftp Application Chilkat Ftp2 Does Not Start ERR CLR20r3 - vb.net

In some cases I've encoutered this problem on some machines; apllication doesn't start with no msg or sometimes with Windows crash errors. I think depends on some framework component, but really I don't know how to resolve. I've already verified Visual C++ Redist Presence (2017). Can you help me? I've just looked at Windows Registry Event and there are 2 error events; I've attached following.
Any ideas? I use ftp2 ChilkatDotNet4.dll version 9.5.0.68
=======================================
Eventi Errore FTP
Nome registro: Application
Origine: .NET Runtime
Data: 18/07/2018 16:46:51
ID evento: 1026
Categoria attività:Nessuna
Livello: Errore
Parole chiave: Classico
Utente: N/D
Computer: ETagliabue-PC
Descrizione:
Applicazione: PigrecoFTP.exe
Versione framework: v4.0.30319
Descrizione: il processo è stato terminato a causa di un'eccezione non gestita.
Informazioni sull'eccezione: System.BadImageFormatException
in PigrecoFTP.mFTP.Main()
in PigrecoFTP.fLogo..ctor()
Informazioni sull'eccezione: System.InvalidOperationException
in PigrecoFTP.My.MyProject+MyForms.Create__Instance__[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon)
in PigrecoFTP.My.MyApplication.OnCreateMainForm()
in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
in PigrecoFTP.My.MyApplication.Main(System.String[])
========================================================
Nome registro: Application
Origine: Application Error
Data: 18/07/2018 16:46:51
ID evento: 1000
Categoria attività:(100)
Livello: Errore
Parole chiave: Classico
Utente: N/D
Computer: ETagliabue-PC
Descrizione:
Nome dell'applicazione che ha generato l'errore: PigrecoFTP.exe, versione: 2.1.1.0, timestamp: 0x5b29fefa
Nome del modulo che ha generato l'errore: KERNELBASE.dll, versione: 10.0.17134.165, timestamp: 0xfa43f4b2
Codice eccezione: 0xe0434352
Offset errore 0x0010ddc2
ID processo che ha generato l'errore: 0x2514
Ora di avvio dell'applicazione che ha generato l'errore: 0x01d41ea629d4fcc3
Percorso dell'applicazione che ha generato l'errore: C:\Pigreco 2.1\PigrecoFTP.exe
Percorso del modulo che ha generato l'errore: C:\WINDOWS\System32\KERNELBASE.dll
ID segnalazione: 0ada4e60-4e0b-43fc-b86e-f13c3d332488
Nome completo pacchetto che ha generato l'errore:
ID applicazione relativo al pacchetto che ha generato l'errore:
XML evento:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2018-07-18T14:46:51.940619500Z" />
<EventRecordID>9008</EventRecordID>
<Channel>Application</Channel>
<Computer>ETagliabue-PC</Computer>
<Security />
</System>
<EventData>
<Data>PigrecoFTP.exe</Data>
<Data>2.1.1.0</Data>
<Data>5b29fefa</Data>
<Data>KERNELBASE.dll</Data>
<Data>10.0.17134.165</Data>
<Data>fa43f4b2</Data>
<Data>e0434352</Data>
<Data>0010ddc2</Data>
<Data>2514</Data>
<Data>01d41ea629d4fcc3</Data>
<Data>C:\Pigreco 2.1\PigrecoFTP.exe</Data>
<Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
<Data>0ada4e60-4e0b-43fc-b86e-f13c3d332488</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
===================================================
Nome registro: Application
Origine: Windows Error Reporting
Data: 18/07/2018 16:47:04
ID evento: 1001
Categoria attività:Nessuna
Livello: Informazioni
Parole chiave: Classico
Utente: N/D
Computer: ETagliabue-PC
Descrizione:
Bucket errato 1422329624855657611, tipo 5
Nome evento: CLR20r3
Risposta: Non disponibile
ID CAB: 0
Firma problema:
P1: PigrecoFTP.exe
P2: 2.1.1.0
P3: 5b29fefa
P4: PigrecoFTP
P5: 2.1.1.0
P6: 5b29fefa
P7: c9
P8: c
P9: System.InvalidOperationException
P10:
File allegati:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF0A4.tmp.mdmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF289.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF2AA.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF2A8.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF2C8.tmp.txt
I file potrebbero essere disponibili qui:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_PigrecoFTP.exe_34f9c1645f3274f7fd82cee797602cbfb31baa9a_0989035a_3c1d22df
Simbolo analisi:
Nuova ricerca di soluzioni: 0
ID rapporto: 0ada4e60-4e0b-43fc-b86e-f13c3d332488
Stato rapporto: 2147487744
Bucket con hash: 0d7268abdbc332eec3bd21420b093c8b
GUID CAB: 0
XML evento:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Windows Error Reporting" />
<EventID Qualifiers="0">1001</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2018-07-18T14:47:04.981973000Z" />
<EventRecordID>9011</EventRecordID>
<Channel>Application</Channel>
<Computer>ETagliabue-PC</Computer>
<Security />
</System>
<EventData>
<Data>1422329624855657611</Data>
<Data>5</Data>
<Data>CLR20r3</Data>
<Data>Non disponibile</Data>
<Data>0</Data>
<Data>PigrecoFTP.exe</Data>
<Data>2.1.1.0</Data>
<Data>5b29fefa</Data>
<Data>PigrecoFTP</Data>
<Data>2.1.1.0</Data>
<Data>5b29fefa</Data>
<Data>c9</Data>
<Data>c</Data>
<Data>System.InvalidOperationException</Data>
<Data>
</Data>
<Data>
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF0A4.tmp.mdmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF289.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF2AA.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF2A8.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERF2C8.tmp.txt</Data>
<Data>C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_PigrecoFTP.exe_34f9c1645f3274f7fd82cee797602cbfb31baa9a_0989035a_3c1d22df</Data>
<Data>
</Data>
<Data>0</Data>
<Data>0ada4e60-4e0b-43fc-b86e-f13c3d332488</Data>
<Data>2147487744</Data>
<Data>0d7268abdbc332eec3bd21420b093c8b</Data>
<Data>0</Data>
</EventData>
</Event>

A System.BadImageFormatException is thrown when a process is trying to load a dependency that has a different bitness compared to the process itself. This could be a 32-bit process trying to load a 64-bit DLL, or a 64-bit process trying to load a 32-bit DLL.
Chilkat isn't compiled as AnyCPU, but instead contains two DLLs (one 32-bit and one 64-bit). This means that if you really want to compile your application as AnyCPU you have to ship it with both the 32-bit and 64-bit version of the ChilkatDotNet4.dll, and have the installer install both of them into the Global Assembly Cache (GAC).
If you cannot/don't want to do it this way, the alternatives are:
Compile your application as 32-bit only.
Do the same as Chilkat and release two versions of your application: one 32-bit and one 64-bit.

The BadImageFormatException is the "Common Error #1" described here: http://www.chilkatsoft.com/x64_Framework4.asp
Also, the ChilkatDotNet4.dll is the assembly one would use with the .NET 4.0 Framework. It would require the MSVC 2010 runtime redist to be installed on the system, which it probably already is.. See http://cknotes.com/chilkat-net-assemblies-matching-visual-studio-versions-to-net-framework-versions-to-vc-runtime-versions/

Related

Access denied error when accessing usb stick files in Windows IoT core app

I want to access files (images, text files etc.) from an USB stick on my Raspberry Pi 2 using Windows 10 IoT Core.
So I've added the to the appxmanifest file.
When using this code in my IBackgroundTask I get an access denied error in the second line:
public sealed class StartupTask : IBackgroundTask
{
public async void Run(IBackgroundTaskInstance taskInstance)
{
//...
Windows.Storage.StorageFolder sf = Windows.Storage.KnownFolders.RemovableDevices;
//get list of drives
IReadOnlyList<Windows.Storage.StorageFolder> list = await sf.GetFoldersAsync();
...
}
}
I found that I should add the fileTypeAssociation with the file types I'd like to access in Package.appxmanifest so I did that:
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" IgnorableNamespaces="uap mp iot">
<Identity Name="test-uwp" Publisher="CN=user" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="8f31dff8-3a2b-4df1-90bb-2c5267f32980" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>test</DisplayName>
<PublisherDisplayName>user</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App">
<uap:VisualElements DisplayName="test" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="test" BackgroundColor="transparent" AppListEntry="none">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<Extension Category="windows.backgroundTasks" EntryPoint="test.StartupTask">
<BackgroundTasks>
<iot:Task Type="startup" />
</BackgroundTasks>
</Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="myimages">
<uap:SupportedFileTypes>
<uap:FileType ContentType="image/jpeg">.jpg</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<uap:Capability Name="removableStorage" />
</Capabilities>
</Package>
If I want to deploy that, I get the following error:
Severity Code Description Project File Line Suppression State
Error Error : DEP0700 : Registration of the app failed.
AppxManifest.xml(37,10): error 0x80070490: Cannot register the
test-uwp_1.0.0.0_arm__yzekw4x8qxe1g package because the following
error was encountered while parsing the windows.fileTypeAssociation
Extension element: Element not found. . Try again and contact the
package publisher if the problem persists. (0x80073cf6)
As soon as I remove the uap:Extension element, the error goes away (but the access denied is still there).
Did I miss anything? Is it not possible to access files from an USB stick using a background service (I want to run that headless with no user interaction)?
At the moment you can't register a headless app that uses filetypeAssociation.
There is a workaround - see here: https://github.com/ms-iot/ntvsiot/issues/62
Simply add a headed app (project) to your solution (no need for any special code there).
Add a reference to this project in your headless app.
Now change the manifest of the headless (file asso..) and add Executable: YourHeadedApp.exe and EntryPoint: YourHeadedApp.App now with the next deploy the EXE will be included in deployment - so it can be found when the manifest is checked.

"Configuration system failed to initialize" while initializing a New TcpClient

I'm devoloping a windows service which requires a socket connection to my server to do its job. I made the service establish the connection through a thread that is started on the OnStart service's event. It worked until this morning when I've compiled it again after some changes I've made: it crashes on the initialization of the client variable. Here is the part of the code where it crashes:
Try
client = New TcpClient 'the error is here
client.Connect(ip, port)
stream = client.GetStream()
receiver.Start()
tryingconnect_thread.Abort()
Catch ex As Exception
File.WriteAllText("C:\error.txt", ex.Message) 'here it gives me "Configuration system failed to initialize"
System.Threading.Thread.Sleep(10000)
End Try
To be sure I also tried the Try Catch End Try statements only with the initialization in it.
How can I solve this problem?
I've already seen other questions like this, but none of them worked.
EDIT:
This is the exception:
System.Configuration.ConfigurationErrorsException: Impossibile inizializzare il sistema di configurazione ---> System.Configuration.ConfigurationErrorsException: Sezione di configurazione authentication non riconosciuta. (C:\Users\Davide\Documents\Visual Studio 2013\Projects\winddsvc\winddsvc\bin\Debug\winddsvc.exe.Config line 8)
in System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
in System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
in System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
in System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
--- Fine della traccia dello stack dell'eccezione interna ---
in System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
in System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
in System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
in System.Configuration.ConfigurationManager.GetSection(String sectionName)
in System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
in System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
in System.Diagnostics.DiagnosticsConfiguration.Initialize()
in System.Diagnostics.DiagnosticsConfiguration.get_Sources()
in System.Diagnostics.TraceSource.Initialize()
in System.Net.Logging.InitializeLogging()
in System.Net.Logging.get_On()
in System.Net.Sockets.TcpClient..ctor(AddressFamily family)
in System.Net.Sockets.TcpClient..ctor()
in winddsvc.winddsvc.tryconnect() in C:\Users\Davide\Documents\Visual Studio 2013\Projects\winddsvc\winddsvc\Service1.vb:riga 88
And this is the config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<authentication mode="Windows" />
<identity impersonate="true" />
</configuration>
I've just found the solution: simply remove the
<authentication mode="Windows" />
<identity impersonate="true" />
part from the config file.

Failure to launch VB.net application on distributed machines

I'm not entirely sure what's going on with this. The application works absolutely fine on my machine, but when being launched on another machine, it crashes at launch. This is the error log of the .NET Runtime:
Log Name: Application
Source: .NET Runtime
Date: 2/5/2014 2:28:50 PM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: -
Description:
Application: (executable name)
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.
DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.
Run(System.String[])
at (executable name)
.My.MyApplication.Main(System.String[])
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-02-05T19:28:50.000000000Z" />
<EventRecordID>1557</EventRecordID>
<Channel>Application</Channel>
<Computer>-</Computer>
<Security />
</System>
<EventData>
<Data>Application: (executable name) Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.
DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.
Run(System.String[])
at (executable name)
.My.MyApplication.Main(System.String[])
</Data>
</EventData>
</Event>
Which then caused this:
Log Name: Application
Source: Application Error
Date: 2/5/2014 2:28:52 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: -
Description:
Faulting application name: (executable name), version: 1.0.0.0, time stamp: 0x52f17e27
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18229, time stamp: 0x51fb10c6
Exception code: 0xe0434352
Fault offset: 0x0000812f
Faulting process id: 0x758
Faulting application start time: 0x01cf22a87f1bae09
Faulting application path: C:\Program Files\(application dir)\(application dir)\
(executable name)
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: be39c661-8e9b-11e3-bb31-0007e9a790e1
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-02-05T19:28:52.000000000Z" />
<EventRecordID>1558</EventRecordID>
<Channel>Application</Channel>
<Computer>-</Computer>
<Security />
</System>
<EventData>
<Data>(executable name)</Data>
<Data>1.0.0.0</Data>
<Data>52f17e27</Data>
<Data>KERNELBASE.dll</Data>
<Data>6.1.7601.18229</Data>
<Data>51fb10c6</Data>
<Data>e0434352</Data>
<Data>0000812f</Data>
<Data>758</Data>
<Data>01cf22a87f1bae09</Data>
<Data>C:\Program Files\(application dir)\(application dir)\(executable name)</Data>
<Data>C:\Windows\system32\KERNELBASE.dll</Data>
<Data>be39c661-8e9b-11e3-bb31-0007e9a790e1</Data>
</EventData>
</Event>
This was all done with Visual Studio 2010. Any ideas? It's been an issue plaguing this project for a while.

After upgrading to .Net 4.0, I'm getting the exception "Could not load file or assembly 'System.Windows, Version=2.0.5.0'"

We recently upgraded our web app from 3.5 to 4.0. Now after I login and load a page with Microsoft ScriptManager on it, I get:
Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
It only happens the first time, reload the page and everything works.
UPDATE: We have all Silverlight v4 projects.I found the System.Windows.dll in the C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0 directory. Why would it look for version 2.0?
Here's the entire exception (edited and removed folder paths)
Server Error in '/test' Application.
Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 450: <UC5:PageTitle ID="PageTitle" runat="server" />
Line 451: <UC2:PageTabs ID="testPageTabs" runat="server" />
Line 452: <asp:ScriptManager ID="ScriptManager1" runat="server"/>
Line 453: <div id="step1Div" style="padding-top: 10px; padding-left: 10px" runat="server">
Line 454: <asp:ValidationSummary ID="displayValidationSummary" ValidationGroup="displayCreateEditValidationGroup" runat="server" />
Source File: c:{directories}\Pages\Administration\DisplayCreateEdit.aspx Line: 452
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.]
System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0
System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +180
System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +192
System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +115
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +426
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103
System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33
System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +76
System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +388
System.Web.UI.ScriptManager..ctor() +26
ASP.pages_administration_displaycreateedit_aspx.__BuildControlScriptManager1() in c:{directories}\Pages\Administration\DisplayCreateEdit.aspx:452
ASP.pages_administration_displaycreateedit_aspx.__BuildControlContent1(Control __ctrl) in c:{directories}\Pages\Administration\DisplayCreateEdit.aspx:9
System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +12
System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) +87
ASP.master_master.__BuildControlContentPlaceHolder1() in c:{directories}\Master.master:28
ASP.master_master.__BuildControlmasterForm() in c:{directories}\Master.master:13
ASP.master_master.__BuildControlTree(master_master __ctrl) in c:{directories}\Master.master:1
ASP.master_master.FrameworkInitialize() in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\zoning\dff1a5fe\99aa3a7f\App_Web_shgw15qp.4.cs:0
System.Web.UI.UserControl.InitializeAsUserControlInternal() +35
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8832342
System.Web.UI.Page.get_Master() +54
System.Web.UI.Page.ApplyMasterPage() +15
System.Web.UI.Page.PerformPreInit() +45
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +328
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
And the system.web of our web.config:
<system.web>
<pages validateRequest="false" buffer="true" theme="Summer" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<controls>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.TextBox" mappedTagType="CleanTextBox"/>
<add tagType="System.Web.UI.HtmlControls.HtmlTextArea" mappedTagType="CleanTextArea"/>
</tagMapping>
</pages>
<compilation debug="true" targetFramework="4.0">
<assemblies>
</assemblies>
</compilation>
<authentication mode="Forms">
<forms requireSSL="false" cookieless="UseDeviceProfile" loginUrl="~/Pages/Authentication/Login.aspx" timeout="60" defaultUrl="~/Pages/Authentication/AccountHome.aspx" slidingExpiration="true" name="sqlAuthCookie" protection="All"/>
</authentication>
<sessionState timeout="60" mode="StateServer" stateConnectionString="tcpip=localhost" stateNetworkTimeout="60" cookieless="false"/>
<customErrors mode="RemoteOnly" defaultRedirect="~/Pages/Global/DefaultError.aspx">
<error statusCode="404" redirect="~/Pages/Global/404.htm"/>
<error statusCode="403" redirect="~/Pages/Global/403.htm"/>
</customErrors>
<httpHandlers>
<add path="*js.axd" verb="*" type="ScriptCompressorHandler"/>
<add path="*css.axd" verb="*" type="CssCompressorHandler"/>
<add path="*css" verb="*" type="CssCompressorHandler"/>
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</httpHandlers>
<httpModules>
<remove name="WindowsAuthentication"/>
<remove name="PassportAuthentication"/>
<remove name="AnonymousIdentification"/>
<remove name="RoleManager"/>
<remove name="Profile"/>
<remove name="ErrorHandlerModule"/>
<add type="ScriptCompressorModule" name="ScriptCompressorModule"/>
<add type="CssCompressorModule" name="CssCompressorModule"/>
</httpModules>
<machineKey validationKey="{key}" decryptionKey="{key}" validation="SHA1"/>
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" requestValidationMode="2.0"/>
</system.web>
See the same problem here and Microsoft Feedback/Bug report
Edit: I'm running VS 2010, XP with IIS 5.0 (I miss Win 7 at work every day :-)). We have the web app running under the local IIS instance, not Cassini. We deployed it to a test server and I did not see the exception. After I installed the C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.windows.dll to the GAC and then removed it and haven't seen the same exception, though my colleague hasn't done this and still sees it occasionally. I think it only happens when the app is restarted (which happens every time we rebuild the app when developing locally).
Sounds like one of the projects in your solution is referencing the v2 system assemblies. Make sure that all of your projects and application pools are set to use 4.0. You can set this in the project properties in Visual Studio.
(Note that you'll have to rebuild your solution with the new settings if you haven't already).
I have been having the same issues for a long time, but just found some old Silverlight Assemblies in my bin folder, removed those and voila.. error gone
Adding reference to AjaxControlToolkit.dll and adding the header
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
to the aspx that contains the script manager solved the problem for me.

CommunicationException when calling a WCF from Silverlight

this is going to steal my sanity. I've been gone through almost everything I found on the web and went no single step forward. Frustration is not strong enough to describe this errormessage come popping up regardless of what I am doing.
But one after the other.
I have a 64bit W2008 Server machine with VS 2008 SP1 german version, Silverlight Tools 3.0
I want to consume a WCF-Service from a Silverlight application. And, as many people, I get this very frustrating non-descript Communication Exception at the end of the invoke.
I created a new WCF-Service, named an Endpoint and set its binding to basicHttpBinding. I added the attribute
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
to the Service1 class and the line
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
to the system.serviceModel in the App.config
I left everything else as it is and tested the service via WCF-client successfully. Then I published it to my local IIS7 to http://localhost/WCFTest
Within my Silverlight application, I added the service to the Servicereference using http://europa.therestofmydomain/WCFTest/WcfTest.Service1.svc
I added the following code to the client:
using OSMDeepEarthExample.ServiceReference1;
...
Service1Client s1 = new Service1Client();
s1.GetDataCompleted += new System.EventHandler<GetDataCompletedEventArgs>(s1_GetDataCompleted);
s1.GetDataAsync(20);
void s1_GetDataCompleted(object sender, GetDataCompletedEventArgs e)
{
CountFetchedData.Text = e.Result;
}
I added a clientaccesspolicy.xml AND a crossdomain.xml to the webroot (C:\inetpub\wwwroot)
clientaccesspolicy.xml:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from>
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
crossdomain.xml:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
<allow-http-request-headers-from domain="*" headers="SOAPAction" />
</cross-domain-policy>
I restarted the IIS. Twice. Often.
I installed Web Development Helper to maybe get more meaningful information about WHAT is wrong. But this makes the IE crash.
I am out of ideas. And soon start to be aggressive against my hardware. Please help my hardware!
As John noted, I did forgot the full Errormessage here it comes:
Fehler beim Senden einer Anforderung an den URI "http://europa.therestofmydomain/WCFTest/WcfTest.Service1.svc". Ursache ist möglicherweise, dass ohne die entsprechende domänenübergreifende Richtlinie oder mit einer nicht für SOAP-Dienste geeigneten Richtlinie domänenübergreifend auf einen Dienst zugegriffen wurde. Möglicherweise müssen Sie sich an den Besitzer des Diensts wenden, damit eine domänenübergreifende Richtliniendatei veröffentlicht und das Senden von sich auf SOAP beziehenden HTTP-Headern zugelassen wird. Dieser Fehler kann auch durch Verwendung von internen Typen im Webdienstproxy ohne das InternalsVisibleToAttribute-Attribut verursacht werden. Weitere Details finden Sie in der inneren Ausnahme.
In short, it says there may be an interdomain rule be missing.
Whew, I've done it!
I removed the clientaccesspolicy.xml from the webroot, leaving only crossdomain.xml there. What an odyssee! Thank you for listening, it helped to clear my mind. I hope someone with a similar problem will find the text helpfull a little bit!