Summary of Errors:
Exception of type 'System.Web.HttpUnhandledException' was thrown.
The type initializer for '' threw an exception.
The C++ module failed to load while attempting to initialize the default appdomain.
Illegal operation attempted on a registry key that has been marked for deletion.
The full ugly error:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The type initializer for '' threw an exception. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.TypeInitializationException: The type initializer for '' threw an exception. ----> System.TypeInitializationException: The type initializer for '' threw an exception. ----> .ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain. ----> System.Runtime.InteropServices.COMException: Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at .GetDefaultDomain() at .DoCallBackInDefaultDomain(IntPtr function, Void* cookie) at .LanguageSupport.InitializeDefaultAppDomain(LanguageSupport* ) at .LanguageSupport._Initialize(LanguageSupport* ) ...). --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.fieldreceiptdetail_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Solution:
This problem was related to a cross-appdomain failure. We are using the Microsoft Dynamics AX 2009 Business Connector in this application. The Business Connector is a C++ application that we use to talk to AX. From what I can gather, there are two applications using the C++ DLL at the same time. The problem is that the DLL is mixing appdomains because of our Application Pool setup in IIS 7.
So to solve the problem, I created a new Application Pool for this application. I also set the pipeline mode to Classic. This solved the problem for me.
03699754-e744-4e0d-baec-f0febe7824c0|1|4.0
The UI for the converter kind of stinks right now because I have been concentrating on functionality. I am now rendering XAML via plug-in modules. In addition a preview of the rendered XAML is displayed after generating the XAML.
The UI is really basic right now:
Click the Load Mockup button to locate a .BMML mockup file.
The BMML document is parsed into a set of .NET objects. For now, the controls are displayed in a grid. This is going to be removed. It was mainly used while coding the Mockup XML parsing logic.
Clicking generate will generate the XAML in the texbox at the bottom of the form.
In addition to generating the XAML, it is parsed at runtime and the Mockup is compiled at runtime and previewed.
That is the preview of the XAML rendered from my mockup below:
I still need to include the properties and sample data in the Xaml controls. But for now, we have a start.
e8908b79-edca-4f85-ba00-546d784a509c|3|5.0
By dsandor at February 07, 2010 18:57
Filed Under:
Blankenburg posted this on Friday. Very cool thing and I never even knew about it. Often times I am coding and am inserting a line of code above some existing code. Many times the two are related and I need to see the line below but Intellisense covered it up. Drat. Press the left control key and it will get out of your way!
http://jeffblankenburg.com/2010/02/5th-of-diduary-did-you-know-you-can.aspx

23acc367-3b63-4fc2-ae08-f60663ddc7d9|0|.0
By dsandor at September 12, 2009 01:49
Filed Under:
So this was a really weird one. The solution is simple but I figured I’d post it in case someone out there was stumped.
Service cannot be started. System.ArgumentException: Delegate to an instance method cannot have null 'this'.
The problem was with this line of code:
readerThread = new Thread(new ThreadStart(worker.DoWork));
I was instantiating a new thread that executes the DoWork instance method of the ‘worker’ object. The problem was that I failed to instantiate the worker object.
d9d1049f-2ed7-4ea4-9cb6-817ef01f3e36|6|3.2
By dsandor at September 11, 2009 07:11
Filed Under:
The configuration for the service reference could not be updated due to the following issue: Unrecognized element ‘extendedProtectionPolicy’. (App.config / Web.config)
There does not seem to be a really clear reason why this is happening however it seems to be related to Windows 7. I am not sure if the .NET framework that ships with Win7 has some different setting or template for the WCF configuration policy files but it seems to be the culprit. Maybe the machine.config files are different on Win 7 and the WCF configuration tools use the machine.config as some sort of policy template.
The fix is annoying (because every time you build your solution on Windows 7 and then rebuild on Vista you have to redo this).
Remove the line:
<extendedProtectionPolicy policyEnforcement="Never" />
from both your App/Web.config file on the client and on the WCF server’s Web.config file.
f6dc7cd7-b5ec-497c-b3f9-ca72a08f0943|9|5.0