Windows 2003 server web service consumer with interop cannot impersonate a specific user

J

John Lau

Hello,

I have a .Net class library that is a web service consumer. This .Net web
service consumer DLL is instantiated by a VB6 ActiveX EXE wrapper program,
which is instantiated by a classic ASP page. So my situation is that I have
a classic ASP page which calls a VB6 ActiveX EXE, which calls .Net class
library, which calls a Java web service. Phew!

(I could not instantiate the .Net DLL directly from Asp, and had to create
an ActiveX EXE wrapper program. If anyone knows how to do that, I would
also appreciate your comments!)

This works on my Windows XP computer, and my Windows 2003 test server.
However, I could not get it to work on my locked down production Windows
2003 server.

The error message is:

System.Runtime.InteropServices.ExternalException: Cannot execute a program.
The command being executed was
"c:\windows\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig
@"C:\WINDOWS\TEMP\zoyfx5bm.cmdline". at
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(IntPtr
userToken, String cmd, String currentDir, TempFileCollection tempFiles,
String& outputName, String& errorName, String trueCmdLine) at
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken,
String cmd, String currentDir, TempFileCollection tempFiles, String&
outputName, String& errorName, String trueCmdLine) at
System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters options,
String compilerDirectory, String compilerExe, String arguments, String&
outputFile, Int32& nativeReturnValue, String trueArgs) at
System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters
options, String[] fileNames) at
System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters
options, String[] sources) at
System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options,
String source) at
System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters
options, String source) at System.Xml.Serialization.Compiler.Compile() at
System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings) at
System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type) at
System.Web.Services.Protocols.SoapHttpClientProtocol..ctor() at ...

I found an article at
http://support.microsoft.com/default.aspx?scid=kb;en-us;315904, which says I
need to impersonate a non-Anonymous account. I impersonate an admin user,
but the error did not change in the web page. Also, when I run the ActiveX
EXE as a admin user logged onto the server, I get "Fatal Execution Engine
Error ()x7927bb38)" Of course this works on my XP and 2003 server that is
not locked down.

Thanks,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top