Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Avoiding Access Denied erros when raising events from MTS objects

Total Hit ( 3065)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


If you don't take specific actions, you get an Access Denied Error when you try to raise an event from an MTS component into a client. This happens because the client executable doesn't have the proper DCOM security settings to let the server call it back. In order to have it working you have two solutions:

1) Open wide DCOM security settings on the client side
2) Add the proper DCOM security settings for the client executable in the registry (you cannot call CoInitializeSecurity in a VB client).

Or

a) Add a new key with the name of the client executable under the AppId key
b) Generate a GUID with guidgen.exe
c) Add a key with such value under the AppId key
d) Add a string value under the key created in step a whose name is AppID and the value is the generated GUID vaue
e) Add the proper security settings under the GUID key.

Here is an example:

Click here to copy the following block
REGEDIT4] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\yourclient.exe] @= _
  "YourClient"
"AppID"="{YourGuid}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{YourGuid}] @= _
  "YourClient"
"AuthenticationLevel"=dword:00000001

See http://msdn.microsoft.com/library/psdk/com/reg_33y1.htm for further info.


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.