.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Mixed Mode application suddenly stops loading assemblies

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
I have a mixed modes application that will occasionally stop executing managed code assemblies after a Windows update. This has been occurring for over a month now so I have not been able to identify any particular update as the problem. We see the problem predominately on XPSP3 but have also seen several times on Vista and once or twice on 7. On a machine that stops working the Fusion log will show a file not found error on the last assembly loaded. LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: AProvider.Data.SqlClient.resources, Version=, Culture=en, PublicKeyToken=c84cd5c63851e072 LOG: The same bind was seen before, and was failed with hr = 0x80070002. ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002). If I delete this assembly, the application will run although not correctly since the data layer has been removed but it does execute as expected instead of hanging. If we run Procmon and watch the probes the correct folders are searched and the images show as loading. But execution fails, either the application hangs or exits. If we move the assemblies to a 'special' folder such as Program Files or Documents, regasm the p

View Complete Post

More Related Resource Links

Mixed Mode assemblies

Does anyone have a good tutorial on how to make the compiler package a mixed-mode assembly?  Specifically:I have a piece of non-trivial C code maintained externally.  I would like to compile that and distribute it with a managed wrapper in a single assembly.  Im looking at the build files for a project which does something similar but right now im at a loss as to how to set this up. 

SSRS 2005 "Mixed" Authentication Mode


I have a web application where users can authenticate using either SiteMinder or Windows domain accounts.  This is actually configured as two separate virtual directories within IIS 6.  Both applications need to use the same instance of SSRS.  Is it possible to configure the SSRS web application so that if a user is authenticated by SiteMinder it impersonates a Windows account, but if they are already Windows-authenticated that account is used instead?

"Mixed mode assembly is built against version 'v2.0.50727'.... " issue and use custom config file

Hi, My Winform applilcation has used Microsoft.SqlServer.Management.Common namespace(assembly :Microsoft.Sqlserver.smo.dll/Microsoft.Sqlserver.ConnectionInfo.dll) and developed in .NET 4.0. Problem:Application is throw an exception when it tries to use above assembly reference methods. Full error text is shown below, "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. " Error is resolved when we include "app.config" file with below code, <?xml version="1.0"?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> </configuration> But, I need to keep configuration file as "renamed.config" and not to include app.config file as of the project requirement.I have set configuration file as "renamed.config" file using below code, //AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "d:\\reanmed.config" ); I have also included <Startup> element in this "renamed.config" configuration file and removed the app.config file.But it raise me below error, it always expect app.config file with <Startup> element to resolve this iss

Can not figure out LDAP naming convention for AD Application Mode login

I am trying to configure Oracle Access Manager (OAM) with AD application mode (ADAM). I am being prompted for the administrator (root DN) LDAP login for the ADAM instance, and nothing I try works. I know the administrator account in ADAM, and when I installed ADAM I used this info for the partition information, CN=accessmanager, DC=devnet, DC=local , the local admin account is devadmin, which is in the administrators container. My question is, what should the LDAP naming convention I should use for devadmin ? Oracle's example is (cn=administrator,o=company,c=us), but nothing I tried seems to allow OAM to access the ADAM installation. The obvious CN=devadmin,DC=devnet,DC=local does not work. Thanks in advance, John  

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in t

First, yes I've read every article I can find including this one: http://msmvps.com/blogs/rfennell/archive/2010/03/27/mixed-mode-assembly-is-built-against-version-v2-0-50727-error-using-net-4-development-web-server.aspx Of course it's for web server stuff, but I found this in my config file and added it. However, my problem now is that if I build in release mode I get a hard error in the error list telling me the same thing, even though it runs fine in debug and has the information in my app.config file. The really anoying part is that the error doesn't tell you WHICH assembly is the offending one. Anyone have any ideas?

Windows Service Suddenly Stops with no logged message

Background: I have a windows service which hosts some wcf services and multithreading has been used there heavily. I'm using Enterprise Library to log messages, handled and unhandled.  AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;  private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)         {             Logger.Error("An unhandled exception has been thrown.", (Exception)e.ExceptionObject);         } Problem: The problem is that randomly my windows service stops on production and I get no log messages saying that the services stopped or what exception details. Question: I haven't created any new AppDomain explicitly. Shouldn't all the threads run in the same default CurrentDomain? if so, why nothing gets logged when the service stops suddenly? Thanks in advance.    

SQL changes from Mixed to Windows auth mode after SQL updates

We run a SQL 2005 cluster on Windows 2008 in Mixed authentication mode.  The last two times we have applied a SQL security patch, it automatically changed the auth mode from Mixed to Windows-only, taking our applications offline.  Most recently was today, when we applied KB970892. Can someone explain why this is happening and how we can prevent it?

Problem: Sessions got mixed up when open multiple tab for a sigle application

We got a problem that Sessions got mixed up when open multiple tab in a single application. We could change the code that do not use session variable in a that level, but a tons of page need to be modified. We need to find a quick fix for this problem. Is any thing we can do in code level to prevent user open multiple tab in a single application? O any thing we can do to keep its own session for a single tab?

ManagementEventWatcher stops raising EventArrived after running application several times


To monitor some application, I am using ManagementEventWatcher class and I have registered EventArrived event.

When I run application from .NET IDE it works fine. As I have not finished coding of other area on the same form, I have to run and close application serveral times. The problem is when I run application multiple times; for first few times EventArrived gets fired very well. but After some executions it doesnot get fired.

When I restart machine, again it starts working fine. Does any one have any idea?

nilesh k

Release mode application throws Break instruction exception - code 80000003 when running in WinDbg


Here is the initial output of my program after running it from WinDbg:

CommandLine: "C:\Documents and Settings\Administrator\My Documents\Work\QMI_Test_Tool\QMI_UT_Source\Release\QMI Validation Tool.exe"
Symbol search path is: SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is: 
ModLoad: 00400000 0048f000  QMI Validation Tool.exe
ModLoad: 7c900000 7c9b2000  ntdll.dll
ModLoad: 79000000 7904a000  C:\WINDOWS\system32\mscoree.dll
ModLoad: 7c800000 7c8f6000  C:\WINDOWS\system32\KERNEL32.dll
ModLoad: 77dd0000 77e6b000  C:\WINDOWS\system32\advapi32.dll
ModLoad: 77e70000 77f03000  C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000  C:\WINDOWS\system32\Secur32.dll
ModLoad: 7c420000 7c4a7000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCP80.dll
ModLoad: 78130000 781cb000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCR80.dll
ModLoad: 77c10000 77c68000  C:\WINDOWS\system32\msvcrt.dll
ModLoad: 7c9c0000 7d1d7000  C:\WINDOWS\system32\SHELL32.dll
ModLoad: 77f10000 77f59000  C:\WINDOWS\system32\GDI32.dll
ModLoad: 7e410000 7e4a1000  C:\WINDOWS\system32\USER32.dll
ModLoad: 77f60000 77fd6000  C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 7c4c0000 7c53d000  C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\m

.NET application crashes when computer system wakes up from sleep mode.


Need help in understanding this error message generated from mscorlib failing when using threading.  I know the problem is not the code written by me, as the application works fine until the computer system is left idle, say for 30mins and allowed to go into sleep mode then the error manifests itself, about a minute later when the computer wakes from sleep mode, the application will perform its tasks and then this error is generated.

This could be a problem with System.Net.NetworkInformation.NetworkChange.AddressChangeListener.AddressChangedCallback

Any information given about the error described below is greatly appreciated, and information on how to prevent such errors even more greatly appreciated, or traps and handles it successfully.


Kind Regards,


Details of the error given below:--


"The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone)."

Source: "mscorlib"

StackTrace: "   at System.Threading.SynchronizationContextSwitcher.Undo()\r\n   at System.Threading.ExecutionContextSwitcher.Undo()\r\n   at System.Threading.ExecutionContext.run

Open .NET application/website in fullscreen(F11) mode.


When I run my application I want my web browser to open automatically in fullscreen(F11) mode.

Any suggestions?

SSP stops responding when disabling WSS Services Web Application

I've noticed that when I disable WSS Services Web Application on MOSS 2007, my SSP stops responding. I wasn't the initial person to set this up and am wondering where the connection might be between the two. 

mixed mode authentication


I'm trying to build the mixed authentication and have the following problem:

I have a sub application of main application. The main application has the forms authentication enabled and sub- application has windows authentication enabled.

When I start debugging in main application I get nothing and when I start debugging from sub application (name = WinLogin) - after string user = Request.ServerVariables["LOGON_USER"];


FormsAuthentication.RedirectFromLoginPage(user, true);

I'm redirected to   /Wholesale/WinLogin/Admin/Order.aspx instead of  /Wholesale/Admin/Order..

<authentication mode="Forms">

.NET 3.5 built Mixed mode assembly unable to load in .NET 4 (even after using app config) without .N


I am trying to run a .NET 3.5 built mixed mode assembly in .NET 4. I was able to do that by adding an app config file with the following content:

<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
The problem is that I used an XP machine and installed .NET 4 on it (without any other previous versions of .NET). When I tried to run the same thing, it gives me an error saying it is unable to load the assembly in .NET 4.

Any idea why this is still depending on .NET 3.5?

Mixed mode authentication in sharepint 2010



Is it possible I have two mixed FBA in sharepiont 2010? For example, one custom membershipprovider reads data from Database1, the other custom membershipprovider reads from Database2?

Thank you



Website Windows Authentication fails when enabling SQL Mixed Mode.


Hello all,

Just to describe the scenario. I have a website. This lives on a webserver. On that webserver is an SQL server. The website connects to this database using windows authentication. I have written a windows form application that connects to the SQL Server on the webserver. This application is being run from a location on out intranet. The Winform application use SQL authentication to connect to the database. The SQL Server didn't have mix mode authentication enabled. So I enabled it. The winform application could now connect to the SQL Server.

This is where it starts getting a little strange.

The Website that was already connecting find using integrated authentication starts failing with:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

When you are enabling mixed mode authentication, you are adding another authentication method, why would the original Windows authentication fail?

Thanks for any suggestions and sorry if this is completely the wrong place to be asking this question,


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend