| Forum: ASP.NET |
Thema:
Using C++ COM+ component over a WebService with impersonate |
Von:
G. Guest (
12.03.2003 14:30) |
Hi to all,
we have a application which is designed as follows:
a asp.net client with windows nt auth.
a asp.net webservice with impersonate=true
a COM+ dll which is called over DCOM (the dll is on a remote W2k Server and
only restiricted users can access this dll., the webservice server and the
remote com+ server are on the same domain)
i know that asp .net is MTA and a call to COM+ or DCOM is STA, so i wrote a
class which is called from the webservice to make a new thread in STA mode.
I use following code and when i make the call over a special user i get
always a access denied error. If i don't use impersonate and select anonymus
in IIS and use a user account which is allowed to the COM+ server for the
anonymus, it works fine. has anyone an idea?
code:
WindowsImpersonationContext ctxt = null;
WindowsIdentity wid =(WindowsIdentity)User.Identity;
ctxt = wid.Impersonate();
// Access some STA COM object that requires impersonation.
myComp newComp;
newComp = new myComp;
newComp.Method();//here's an error thrown
many thanx
Tobi
Antworten
Vorsicht bei der Eingabe: Die Zeichen ' oder -- sind nicht erlaubt!