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

Top 5 Contributors of the Month
Post New Web Links

Weird Exception C015000F in 32bit MFC app on 64 bit windows 7 with SQLCE 3.5 SP2

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :Sql Server
Exception code: C015000F The activation context being deactivated is not the
most recently activated one.
Fault address: 776F4391 01:00074391 C:\Windows\SysWOW64\ntdll.dll
One of my customers is getting the following error apparently when trying to
update an SQLCE 3.5 SP2 database.
It appears that the correct 32 and 64 bit versions of Sp2 are installed on
his machine.
Unfortunately, on the 64 bit w7 machine I have, the error doesn't occur.
I've tracked this down to possibly being related to this hotfix:
described more fully here:
http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/Has anyone else run across this. Any obvious reasons SQLCE might throw anexception on one machine but not another? I have a copy of the databasethat was being accessed, but it appears fine.--Anthony WieserWieser Software Ltd

Anthony Wieser | Wieser Software Ltd | www.wieser-software.com

View Complete Post

More Related Resource Links

Weird Exception: Method not found: 'Double System.Windows.Controls.ScrollViewer.get_ContentHorizon

Hi guys I have an XBAP application that uses a Xamdatagrid from Infragistics. I have some filtering on this grid, that rebinds after a filter. The problem is, when a user has scrolled to a certain point and then filters, the rebinding causes the grid to scroll to the beginning position of the grid. Now how I solve this is by getting an instance of the ScrollViewer, I get the ScrollViewer.ContentHorizontalOffset and then I do a ScrollViewer.ScrollToHorizontalOffset after it filters.   Now here comes the problem. For 99% of the users of this xbap app, this will work absolutely fine. Most, if not all of the users run exactly the same machines, XP 64 bit with 8GB RAM. The other 1% get the error: Method not found: 'Double System.Windows.Controls.ScrollViewer.get_ContentHorizontalOffset()'. I cannot reproduce this error on my own box, our dev server or our production server, it is a phantom exception that only pops up on a certain condition. I have even wrapped the "offending" code in a try catch and it still doesn't solve it. If I set the DispatcherUnhandledExceptionArgs Handled to true, it works, but it doesn't feel right. How is this possible? If the method doesn't exist, how can it compile? Why does that method exist for 99% of the other users running the exact same machines? I have googled my fingers raw without any valid results and this issue is frustrat

Cash Drawer - Method Open threw an exception - Windows Service

Hi All, I'm getting the following exception while calling Open method of Cash Drawer object. Method Open threw an exception.  Could not read the device name key's default value, or could not convert the Programmatic ID it holds into a valid Class ID. Code:   class Class1 { CashDrawer _uniCashDrawer1 = null; DeviceInfo cashDrawerDevice1 = null; PosExplorer posExplorer = new Microsoft.PointOfService.PosExplorer();   public void ClaimCashDrawer() { cashDrawerDevice1 = posExplorer.GetDevice("CashDrawer", "testDrawer"); if (cashDrawerDevice1 != null) { _uniCashDrawer1 = posExplorer.CreateInstance(cashDrawerDevice1) as CashDrawer; if (_uniCashDrawer1 != null) { _uniCashDrawer1.StatusUpdateEvent += new StatusUpdateEventHandler(UniCashDrawer1_StatusUpdateEvent); _uniCashDrawer1.Open(); _uniCashDrawer1.Claim(0); _uniCashDrawer1.DeviceEnabled = true; } } } }   Tha above code works fine if you put the code in WindowsApplication in all POS systems. The same is working if you put the code in Windows Service in all other POS systems. The same is not working if you put the code in Windows Service in Aures Galeo POS systems.  Thanks in advance. Ramakrishnan S

'System OutOfMemory Exception' while using rdlc in Windows application

hi Everyone , I am Using Reporting Service (.rdlc) in my Windows application , i am getting Error System OutOfMemory Exception Like "an error occured during local report processing An Unexpected error occured in Report Processing Exception of type 'System OutOfMemory Exception'Was Thrown " what to do Please anyone help me ... Advance Thanks Anilmarnal

A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll

I've read a bit about this error and maybe I have nothing to worry about.  BUT ... my simple little app gets 7 of these before it even gets to the first Dim statement in the Class Form1!  I found and followed instructions on how to have the Debugger intercept these exceptions but it seems that they are not being intercepted.  I only know that they have happened because of the messages in the Immediate Window.  In the Designer all I have is 5 Labels and 5 TextBoxes.   Any thoughts on how I could get to the cause of these messages? Thanks,  Bob

Native exception 0xc0000005 when using SQLCE 3.0/3.1 and .NET CF 2.0?!

Greetings, I have written a very basic C# console test app to check the performance and reliability of SQLCE on Windows CE 5.0 (source code below). Running this on different Windows CE 5.0 devices, I always get a 0xc0000005 native exception error when reaching 25592 inserts. It doesn't matter whether the database is empty or not when the test is run, it always fails at that exact number of inserts. Given that I would expect a managed application not to be able to generate native exceptions anyway, and can't really see any reason why it would in this case, I'm at a bit of a loss as to what's going wrong... Any ideas? Using: VS2005 w/ SP1 Windows CE 5.0 (on custom SH4 platform and HTC WM5 smartphone) .NET CF 2.0 w/ SP1 and post SP1 patch SQLCE 3.0.3600.0 TIA PS. The same code (with some SQLCE 3.0 specific bits removed - version and result set for checking table existence) works perfectly under .NET CF 1.0 and SQLCE 2.0). Source code: using System.Data; using System.Data.SqlServerCe; namespace TestDB {     class Program     {         static void Main(string[] args)         {             SqlCeConnection sqlConnection = new SqlCeConnection();             SqlCeCommand sqlCommand = sqlConnection.CreateCommand();             SqlCeResultSet sqlResult;             string strDatabase = "\\TestDB.sdf";             string strTable = "TestTable";        

Problem consuming 32bit WCF service which references a native Dll in a 64 bit OS(Windows Server 2008

I have some 32bit Dlls which i want to use it in 64bit OS as i do not have a source code of this to recompile it for 64 bit OS. I have created a x86(32 Bit) WCF service which calls these Dlls and hosted it as a Windows Service on a x64(64 Bit) machine using Windows Server 2008. I have created one more x64 client which calls a function in the WCF which in turn calls a function from the 32 bit native Dll. Whenever i try calling this WCF from the client I get an error as given below.Can anybody please guide as to where I am going wrong and what is needed to solve this issue. Thanks in advance for any help.******The Error Message********************System.BadImageFormatException: Could not load file or assembly 'TestWCFWrapper, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.File name: 'TestWCFWrapper, Version=, Culture=neutral, PublicKeyToken=null'   at TestWrapperWCFClient.Form2.button1_Click(Object sender, EventArgs e)   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms

GDI+ exception in FillRectangle under Windows 7

Hi, Since we have migrated our WinForms based application to .Net 4, we'r getting strange "A generic error occurred in GDI+" errors under windows 7 x64, all coming from System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height) method. These errors originate from different controls, third party ones and from OOB winforms controls (like a menu). I have tried searching the web to see whether others faced this problem however what i have found so far is that some state that this is a known bug in .NET framework. I have tried to search msdn and the web to find anything about this "known" bug with no success yet. Does anyone have any information regarding this? Thanks in advance.  

SQL Compact 3.5 Database Opening on Windows Vista - Unhandled Exception


I have written a Visual Basic 2008 application that utilizes SQL Server Compact Edition 3.5. On my Vista (32-Bit) development machine, I can install this application and have it connect to my SQLCE Database just fine. However, if I deploy the application to any other Vista computer (32-Bit or 64-Bit), I get the following error message when trying to connect to the database.


Unhandled exception has occured in your application.....


Opening a database as read-only requires a temp path to be specififed. [Db name = C:\users\bob\Documents\MyDatabase.sdf ]


The users who are running the application are in the local machine Administrators group. Running the application "As Administrator" does not resolve the issue.


I've used various connection strings suggested in other threads with no luck. The one I'm currently working with is:


Data Source=C:\users\bob\Documents\MyDatabase.sdf;File Mode=Read Only;Temp Path=%TEMP%;


Does anyone have any suggestions?



Visual Studio, Windows 7, Web Site, Profile Exception, HELP!



I have a major problem with a website project using visual studio 2005...

I upgraded my PC to windows 7 X64, I installed vs 2005.

I made sure all components/references matched my old Winxp PC.

With all that said...

I make no changes to the project.

My project works fine in production environment.

I publish the unchanged project to my webserver, and I get the following error when accessing the site...

[ArgumentNullException: Value cannot be null.
Parameter name: type]
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +7469318
   System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean isAuthenticated) +79
   System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated) +231
   System.Web.HttpContext.get_Profile() +107
   MasterPage.get_Profile() +17
   MasterPage.Page_Load(Object sender, EventArgs e) +563
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141

I re-publish from my xp box, the error goes away.

The problem occurs on any page that trys to access the Profile object.

I have even tried converting site to .net

Windows Service crash - catch exception


A windows service written in C# is intermittently crashing on a server. If I want to log the reason for crash, can I add try catch block in OnStop method?

will onStop  method get initiated on crashing?

protected override void OnStop()

Windows 2003 64 bit - Web App gives "is not a valid Win32 application. (Exception from HRESULT: 0x80


I've got an x86 deployment which is targeted at x86 and works fine on 2003 server 32 bit.

When I install on win 2003 x64, the installer works OK, but I cant get the first web page to display.

I've done a fair bit of googling but not found an answer yet

The error message is:

Server Error in '/MyCompany' Application.

is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
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.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

[BadImageFormatException:  is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean thro

Can we install 32bit SQL Server 2008 R2 on a Windows 2008 R2 Server ?



We are going to test SQL Server 2008 R2 and get it installed on a Windows 2008 R2 Testing Server.  However, we are not able to access the database engine via a 32 Bit SQL Server 2005 Management Studio installed on Windows XP workstation.

We just guess that SQL Server 2008 R2 database must be installed as 64 Bit and attempt to remove / reinstall a 32 Bit version.  However, it seems that we don't have an option to choose whether 32 or 64 bit of SQL Server 2008 R2 will be installed.

Is our understanding correct ?   Your advice is sought.

Web Exception while accessing a Web Service from C# Windows application . Please help


Hi ,

I am trying to consume a webservice from windows application for localtime service.

When I try to fetch the results my application fails with an web exception : Please find the below exception details.

System.Net.WebException was unhandled

  Message="The request failed with HTTP status 407: Proxy Authentication Required."



       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)




Windows Service Applications Tutorials

You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

Serving Silverlight Apps from Windows Mobile

Even if mobile dev is not my every day work, thanks to the .Net Compact Framework, it's still .Net programming.

Here is the scenario:

You come back home, you have a windows mobile phone wifi capable and you want to quickly get access to your phone pictures from your home network.
You just activate the Wifi, run my app and then browse to the provided link from any computer on the network.
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