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

Discussion in 'ASP .Net Security' started by John Lau, Sep 13, 2004.

  1. John Lau

    John Lau Guest

    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
     
    John Lau, Sep 13, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Juan T. Llibre [MVP]
    Replies:
    4
    Views:
    3,032
    Patrick Olurotimi Ige
    Dec 9, 2004
  2. Carmen

    Interop and windows 2003 server

    Carmen, Mar 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    361
    Carmen
    Mar 17, 2005
  3. AvaDev
    Replies:
    3
    Views:
    856
    AvaDev
    Jul 10, 2008
  4. Bill Belliveau

    DirectoryEntry Impersonate or WindowsIdentity Impersonate?

    Bill Belliveau, Jan 28, 2004, in forum: ASP .Net Security
    Replies:
    3
    Views:
    363
    Joe Kaplan \(MVP - ADSI\)
    Jan 31, 2004
  5. Michael Fan
    Replies:
    2
    Views:
    141
    Michael Fan
    Jul 16, 2004
Loading...

Share This Page