.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

Deactivate WPF commands globally (class registered)

Posted By:      Posted Date: September 04, 2010    Points: 0   Category :WPF
Hello everyone, I need to deactivate the default WPF commands in a globally way, i'm talking about those that are registered as "class commands". Here's the reason : We are upgrading an old application to WPF, that application uses some key shortcuts that overlap with default wpf commands. I know that that should be a problem as commands attached to an instance have more "priority" than those that are attached to the "type" or "class". The problem is, we cannot attach the input binding (notacommand to disable the shortcut) to every instance. It will be, either overkill (modify all the styles) or almost impossible (controls instantiated by third party controls).   So, is there a way to disable wpf "class attached" commands in a globally way ? Thank you.

View Complete Post

More Related Resource Links

Deployment bug: Class not registered

I deployed my web app from my development machine (WinXP Pro) to the production server (Windows 2003).  Everything works except for a COM library I am referencing from my business object.  The references in my solution are: Web Project --->  Business Layer Project (DLL)  ---> COM Library I suspect part of my problem is I didn't properly deploy, I just grabbed everything under \wwwroot\MyWebApp and copied it to the server.  I'm going to be researching proper deployment strategies, but in the meantime maybe someone could give me suggestions.  In my error log, the exception source is "Interop.AccpacCOMAPI", and the message is "Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))" and the stack trace is as follows: at AccpacCOMAPI.AccpacSessionClass.Init(String ObjectHandle, String AppID, String ProgramName, String AppVersion) at WSTimesheets.AccPacWrapper.GetAccPacEmployeeList(Guid AppUserID) in C:\Documents and Settings\Joe\My Documents\Visual Studio 2005\Projects\WellServe\BusLogic\WSTimesheets\AccPacWrapper.cs:line 239 Here is a snippet of the code:1 // Open a session to AccPac 2 bool sessionOpened = false; 3 bool linkOpened = false; 4 AccpacCOMAPI.AccpacSession accpacSession = null; 5 AccpacCOMAPI.AccpacDBLink dbLinkRead = null; 6

SSIS 2008 generates Class not registered

I am getting the following error in SQL Server 2008 R2 (build 10.50.1734) x86 platform BI Development Studio (BIDS) 9.0.30729.4462 with .NET Framework 3.5 SP1 in a Integration Services project Data Source View table when I attempt to Explore Data: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) This happens on a Windows 7 Professional workstation x86 platform, (but has not been observed on Windows XP). The error occurs on Data Source Views bound to a Data Source connected to a SQL Server 2005 SP3 (build 9.0.4053) and SQL Server 2008 R2 server (I'm sure it's not a server issue, but a workstation issue). I have successfully unregistered and re-registered DTS.DLL and DTSComm.DLL in the registry, with no resolution to the issue. Does anyone have any ideas? Thanks.Greg

SQL 2005 "Class Not Registered" error when saving a Maintenance Plan


We are running SQL 2005 Standard Edition SP3 on a single server. Anytime I attempt to save a maintenance plan, I get a "Class Not Registered" error. I also got this when attempting to edit or delete Maintenance Plans created previously, when this functionality was working. On this server there is a SQL Server 2000 as the default instance, and the SQL Server 2005 is a named instance.

Looking at other posts everywhere, installing SP2 or SP3 can break the ability to create or edit Maintenance Plans. I can confirm that SSIS is running and that I can now connect to Integration Services in Mainagement Studio (and I was able to delete my old plans in the Integration Services). There was a problem with this which was cured by manually registering dts.dll and msDtsSrvrUtil.dll in the DTS/Binn folder. I wonder if I need to manually register any more DLLs.

CLASS Not Registered - Excel 2007 Data Source (Not 64 Bit machine)


First off, I am not running on a 64 bit machine.

I keep getting the following error when I try to run a task that has an ODBC connection to an xlsx file on a SQL Server 2005 server using SQL Server Agent.

Executed as user: ACCT02\ssc_emr_ra. ... 9.00.4035.00 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  7:29:39 AM  Error: 2010-10-28 07:29:42.63     Code: 0xC0202009     Source: RFC_Data_Load Connection manager "Excel ODBC Connection"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040154.  An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".  End Error  Error: 2010-10-28 07:29:42.63     Code: 0xC020801C     Source: Data Flow Task OLE DB Source [3052]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel ODBC Connection" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method c

COMM Interop object throws "80040154 Class not registered" error in IIS7


I have enherited a classic VB6 ojject that has been wrapped to run as an Interop in .NET. It is working fine when I instantiate it in the Visual Studio web (Cassini), but throws a "80040154 Class not registered" error when I attempt to test the same web app in IIS7 on the same workstation (Windows 7 / 64-bit). It is obviously registered as it works fine in Cassini, so appears to be some kind of permission problem related to running it is IIS (registry access?).

Is anyone familier with this problem and know of a solution?

Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine- Class Library . win 7 - 64


Hello I wrote a Class Library Program( DLL ) using  VB.Net - It works fine in a 32 bit machine. But when it runs on a 64 bit machine(win 7) . Get this Error:

'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine." Trying to open an access file

I know this is a 64 bit problem and the solution is change the Target Platform to 32 bit instead of Any CPU , In Soluton Properites. But my application is not a windows Form applcaiton(when I built it it created Dll , Not exe ),  therefore  the Target Plat form is not actiavated in the propeties Tab.

Anybody could help me here. My job continuation depends on this. I am base on a contract and now  company is upgrading all machines to 64 and my Test program doesn't work. I already checked and have the latest version of Microsoft Jet. Thanks  for reading.

Class not registered (exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))


I have Visual Studio 2005 (8.0.50727.42) running with SQL Server 2005 (9.00.342.00) on Windows 2003 R2 Ent. Ed. sp2,

when creating an Integration Services Project and try to add a Data Source, choose Native Ole DB/Oracle Provider for Ole DB, click Data Links i get the error-message, saw othe posts with an office 2003 Web Components solution but that did not work for me, need help.


Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

0 down vote favorite



I have converted a VB 6 project to VB.NET 2008 One of the forms throws the following error in the design mode. Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) here is the call stack:

at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid) at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid) at System.Windows.Forms.AxHost.CreateInstance() at System.Windows.Forms.AxHost.GetOcxCreate() at System.Windows.Forms.AxHost.set_Site(ISite value) at System.ComponentModel.Container.Add(IComponent component, String name) at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToConta

Can't browse Cube and Explore data. Class not registered (Exception from HRESULT: 0x80040154 (REGDB



I'm using MS SQL Server 2008 and office 2010. I can't browse cube and can't explore data in Visual Studio, BIDS.

 I'm getting this massage:

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) (Microsoft Visual Studio)

Program Location:

   at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
   at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
   at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
   at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
   at System.Windows.Forms.AxHost.CreateInstance()
   at System.Windows.Forms.AxHost.GetOcxCreate()
   at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
   at System.Windows.Forms.AxHost.CreateHandle()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

ASP.Net Gridview Edit Update Cancel Commands

In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

Class Diagrams

Class diagrams show the static structure of the systems. Classes define the properties of the objects which belong to them. These include:

Attributes - (second container) the data properties of the classes including type, default value and constraints.

Creating a Simple Class in C#

The second article in the C# Object-Oriented Programming tutorial describes how classes are created in C# and how behaviour, in the form of publicly visible and private, hidden methods can be added. This demonstrates some of the uses of encapsulation

Static Class for Beginners

In general, the members of a class can be accessed by instance of that class when they are in public, but there comes a situation to access or call members of a class without an instance and this can be achieved by declaring them as static

abstract away the source of the connection string using a class with a static property.

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Let's abstract away the source of the connection string using a class with a static property.

MessageQueue Class

This sample demonstrates two way communications using message queuing between a device application and a desktop application. One application sends book order messages to a message queue and another application receives these book orders from the message queue and responds to the device queue that the orders have been processed.

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



Can I replace the EntityObject as base-class in Entity Designer 3.5 sp1?


I'm using EF3.5sp1 for a project, and I've been working around many of its problems... as such, my entity partial classes have a lot of logic in them for change-tracking and whatnot.  Obviously, I'd like to factor this logic out into a common base class, but of course all my objects must derive from EntityObject.  Is it possible to tell them to derive from some class of my own invention (which would actually likely derive from EntityObject themselves)?

I'd rather avoid editing the EDMX file unless the changes will be safe on entity-model-update, since I'm still making changes to the database schema in this early state of my project.


Also, is there any good workaround for the fact that the change isn't tracked when you change EntityReference.EntityKey?

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