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

Top 5 Contributors of the Month
Post New Web Links

WPF Browser application crashes when using x64 Matlab dlls

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF


I'm developing an application in C# that makes use of some functions developed and compiled with Matlab 2009b 64 bit. As Matlab is 64bit, the DLL compiled with it can only be used in 64 bit applications. I have successfuly build a WPF application that makes use of these libraries, setting the target architecture to x64 (it crashes if set to AnyCPU with the BadImageFormatException error).

My problems started when I tried to migrate the WPF application to a WPF Browser Application. In this case, I can't set the target architecture to x64 since VS forces me to use AnyCPU (I get the "Error    2    Cannot build a platform-specific XAML Browser Application. If HostInBrowser property is set to 'True', either do not set the PlatformTarget property or set it to 'AnyCpu'." compilation error otherwise). However, if I set the target to AnyCPU, the application crashes when I try to use the Matlab DLLs, getting the BadImageFormatException error.

I have just started to work with VS and C#, so I'm completely lost. I don't understand why, even when using AnyCPU as target, I can't use 64bit DLL when I'm using a 64 bit OS (Windows 7 64 bit). Also, I have just noted that VS launches IE 32 bit. Maybe is that the cause of the problem? How can I configure VS to launch IE 64 bit instead?

I'm really in a dead e

View Complete Post

More Related Resource Links

Designer crashes sometimes because application path becomes C:\Windows\system32

Sometimes VS crashes as it seems to execute the WPF designer in its directories or C:\Windows\system32. Sometimes it works fine as we can preview saved settings in the Designer. I have set application path as follows : ConfigFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "mixer.ser");<br/> When VS crashes I accept to debug it, the exception is : {"Access to the path 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\mixer.ser' is denied."}    System.Exception {System.UnauthorizedAccessException} ... or c:\windows\system32 Any ideas on how to fix this ?   Thank you !

Application just crashes without error

Hello, I'm using Visual Studio 2010 Premium edition on a Vista 32-bit machine. I've created a WPF application that has references to some old DLL's (older version of Framework). The application needs to load some stuff and then display a map. When I run the app in the debugger of VS2010 it always works!! But when I want to start the app as a normal .exe application, it crashes without an error. It writes a line in the Windows Log: It's an Application Error 1000   Application error Norma SEH Module.exe, version 2010.8.1.0, timestamp 0x4c737108, module error clr.dll, versie 4.0.30319.1, timestamp 0x4ba1d9ef, exceptioncode 0xc0000409, errormarge 0x002b5b8c, proces-id 0x121c, Application starttime 0x01cb435c02d99ad2.   In my app.config the frameworks are defined like: <startup useLegacyV2RuntimeActivationPolicy="true"> <requiredRuntime version="v1.0.3705" safemode="true"/> <supportedRuntime version="v4.0"/> <supportedRuntime version="v1.0.3705"/> </startup> The weirdest thing is that they app.exe does work 1 time and then it won't work until I create a rebuild with VS2010. Can someone please help me out here? I've searched the whole internet and can't find anything. Thanx in advance With best regards, Alex van der Lans Team Leader | Software Engineer URL: http://www.

how do I host wpf browser application in IIS

I would like to host several WPF browser applications in IIS, and include these as iframe in one IIS .net webforms application. Would you please provide the procedures involved in the first step: creating a wpf application in visual studio 2010 for hosting in IIS 7. I understand I need an xbap, but how do I get an xbap from the browser application project? I'm not seeing this in the folder after build. Also would you please confirm whether it is possible to run multiple xbap iis websites (using bindings possibly?), and present these though regular webforms website in multiple iframe?

Reading Harddisk Information Using Silverlight 4 Out Of Browser Application

To read the hard disk information in silverlight was my question which I have search on net and was keen to do that, because I want to learn the silverlight. So after search on internet and searching the msdn for this question here is what I have found. You can see the out of the sample code in the Image 1, Here in the Image 1 I have display the hard disk partition just like the window 7 , the title , the progress bar to indicate the usage of the partition space and the at the end the summary of the the partition size.

Add a "Shared Documents" type documents browser onto an aspx Application Page?


I have an aspx page for a user to fire off a mail merge. I'd like them to choose a .html file from a document library in Sharepoint, then choose a contact list, and then have it fire off the mail merge.

The mail merge part is done and works from a console application with the .html file location hardcoded, and the contact list hard coded.
What I need is a way to add a documents browser onto the .aspx page. I can't see any obvious control I can drop on to achieve this though.

Ideally I would drop on a <Sharepoint:DocumentsBrowser> control, point it at a given ListId in sharepoint, and at runtime Sharepoint would display a nice shared documents type documents browser. Is this possible?

I wrote a book :) http://www.amazon.com/Microsoft-Visual-Studio-2008-Programming/dp/0071604081

open application in seperate browser when click on SiteMapNode


Hi All,

I want to open application in seperate browser when click on SiteMapNode.

Thanks in advance. 

.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

Client need to open auditing reports in excel application not in browser


Good day,
I encountered with this issue in MOSS 2007. Auditing reports was opened from common SharePoint auditing page.
This page contains hyperlinks to auditing reports.
When any user tries to open this hyperlink, "open file" dialog does not appear, instead of this a IE browser silently open in text XML format.
I suppose that common behaviour is when user open a hyperlink, report will open with excel application through "open file" dialog.
For example, hyperlink in SharePoint contains URL:

Session Timeout in WPF browser application


Hi All,

I have to design a web browser application in WPF with a session timeout facility. The requirement to provide a session timeout after 1 hours. How can this be achieved? Also i need to implement login based menu access levels in this application. How can i achieve both these?


I need to log out of the application when user closes the browser of a sharepoint 2007 internet webs


HI techies,

         i would like to place the below functionality.

i placed one app in the sharepoint internet site. that app having login/logout functionality ,I need to log out of the application when user closes the browser or Click on the back button on the Browser.

please advice i need to write any javascript or place any code on masterpage?





Nag: http://nagaraju-sharepoint.blogspot.com. Posting is provided with no warranties.

.NET Application does not start - crashes at launch



On a customer machine our .NET application does not start. It crashes at launch. I got a full DrWatson dump and analyzed it, but I can't figure out anything.

Any ideas would be highly appreciated, I can't find much on the Internet about these errors. Since it only happens on one machine, I suspect it is an environment issue, but I'd like to pinpoint it, before telling the customer to get a new machine...

CONTEXT:  0012f728 -- (.cxr 0x12f728)
eax=00000000 ebx=00000000 ecx=00000000 edx=0000000e esi=001a2fdc edi=001a40d0
eip=79f286f4 esp=0012f9f4 ebp=0012fa20 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246
79f286f4 f6401010        test    byte ptr [eax+10h],10h     ds:0023:00000010=??
Resetting default scope

READ_ADDRESS:  00000010

79f286f4 f6401010        test    byte ptr [eax+10h],10h





LAST_CONTROL_TRANSFER:  from 79f28738 to 79f286f4

79f286f4 mscorwks!PEDecoder::HasManagedEntryPoint+0x8

WPF application crashes on touch screen computers


We have an application that crashes on a touch screen application.  The error is:

value cannot be null. parameter name: owner

it occurs right after our


I searched online and tried the programs and features...turn windows features on and off and disabled the Tablet PC components.

Now our application works.

So it appears the issue is that with touch enabled you have that window that hovers allowing for text input via a stylus or finger.  That windows must cause WPF app's to crash. 

I need the users to be ablet o write (via stylus) into our text boxes.

Any ideas





How to make Excel open in application not browser by default


I'm facing a problem here. I tried the to open an excel file (.xls) which was attached in a Calendar Item.

On 1 PC, it opens automatically with the Excel application and thus the user is able to edit and save.
On another PC, it opens in the browser and the user is unable to edit / save the file.

Initially, I tried and thought that it's user rights issue but apparantly, it is not.

How can I make the .xls to open in excel by default? Can someone help me?

Really appreciate the help and answers.


My Infopath form works when edited in Infopath but crashes when I try to edit in a browser



I've created an Infopath 2010 form template that includes external data sources (External Sharepoint Lists) and C# managed code.  When I ran in debug mode it worked and I was able to debug it.  I had problems running it as a Sandbox solution (wouldn't connect to the data sources (my external lists) I had configured... kept saying it couldn't find the endpoint but it worked in debug mode).

I switched to the Administrator approved option and was able to load the form and data connections centrally.  Now I can access the form in my site collection... that's where the fun starts.  When I edit in Infopath, it connects to all data sources and displays the form just fine!  Problem is, I need it to run as a browser form which doesn't work and consistently throws the following error:

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.

Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web applicat

Fox OLEDB Provider crashes Application Designer (BDC)

I am trying to access some data stored on a Fox Database by using App Designer to connect to it. After trying to use ODBC and seeing that MS consider this driver deprecated and suggests using OLE DB instead I downloaded this provider for Visual Fox Pro and try to connect to the DB.
Everything was going fine on Adding a LOB system, typing the conn string for OLE DB and when I hit Connect I even could see the table list and Add tables by dragging them to the workspace. My guess here was that the provider and conn string were fine since I could actually see the DB objects, but when I hit the OK button and the App Designer should take me to the tree-view Metadata Objects window and let me do my work, instead it just crashes big time!

The error says Application Definition Designer has stopped working with this Details:

  Stopped working

Problem signature:
  Problem Event Name:    CLR20r3
  Problem Signature 01:    applicationdefinitiondesigner
  Problem Signature 02:
  Problem Signature 03:    49ac68fa
  Problem Signature 04:    mscorlib
  Problem Signature 05:
  Problem Signature 06:    498d1a92
  Problem Signature 07:    dc
  Problem Signature 08:    5
  Problem Signature 09:    A4DH5WWIWWW1YJTMP0C0KV4ZWCALU4IN
  OS Version:    6.0.6001.

How do I Distribute SQL Compact DLLs with my application


I've seen in various writings about SQL Compact that it can be embedded with my application.  My understanding has been that I don't have to run a separate installer to install SQL, but rather just include its DLLs in my product installer, and place them in my application folder along with my executables.  The closest thing I found in documentation to substantiate this is that it lists what the DLLs are that are installed.  But I cannot find any information anywhere that says how I would do this.

The issue is I don't want SQL Compact to show up as a separate installed product.  I want it to be part of my product.  I don't want it to go into the GAC.  I don't want it to be serviced by automatic updates.  Therefore, I believe I cannot use Microsoft's MSI file to install it.  So, I just need to know what DLLs need to be registered, and so forth so that when my application runs it can find SQL Compact.

On browser back button click again login in Application problem



In my project I am using the FormsAuthenticationTicket and maintain session when any user login in the application. On logout I am expire the seesion using Session.Abandon (); but when I click on the browser back button after logout it again login in the application. I want after logout if any user clicks on the browser back button it do not again login in the application it redirect it on login page. But I do not how it could be possible.


Below is my code


protected void btnLogon_Click(object sender, EventArgs e)


            propertyStore.BusinessLayer.Users objUser = new propertyStore.BusinessLayer.Users();

            if (objUser.IsAuthentic(txtUserName.Text, txtPassword.Text))



                FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(


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