Wednesday, July 21, 2010

eConnect error: System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL

Most of the client system is not ready to execute the applications developed by Econeect com objects. For Example. Some application will work good in our development environment but when you try to run in Client side it will not work. Some times it will throw COM exceptions..

Error:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
at CustomerMaster.CustomerMaster.Main()

Cause:
Problem in MSTDC or Some DTC prerequest is not installed in that system.

Resolution:

1.Go To Component services(Start--Administrative Tools-->Component Services)
2.Go To My Computer in Component services
3.Right Click and go to properties of My computer
4.Click MSTDC tab and goto Security Configuration
4.Make sure that following fields are checked in that window AllowInbound.Allow outbound,XA transactions,No authentication
5.Then you restart the Distributed Transaction Service in Services.
6. Some time service restart will through same exception.
7.If DTC throw any exception then you should check the system has installed MSMQ or not.Mostlt DTC throw error due to absence of MSMQ
8.Install MSMQ and restart service
9.Now you execute your application.

Friday, June 18, 2010

SQL Error:Alter failed for Login 'sa'.

Error: Alter failed for Login 'sa'.

When you want to change your sa login property in sql server, it could not allow you to change with this messge "Alter failed for Login 'sa'".

Solution: If you change anything in 'sa' Login property then you should mark 'Map to Credential' field in General tab before you click OK.