Calling a COM (exe) file from Webservice

Discussion in 'ASP .Net Security' started by Jason Wager, Nov 14, 2003.

  1. Jason Wager

    Jason Wager Guest

    Hello,

    I have a programme made in VB6 that I need to reference from a web service.
    I tried it from a .NET windows application and it worked perfectly. When I
    try it from a web service, though, it does not work at all. It does not give
    any error, only a "the page cannot be reached" fault in the web service
    (when using post).

    I can call VB6 COM components from the .NET web service provided they are
    dll-files, but not the one that is an exe-file.

    As it works perfectly well from a windows application, it seems it must be a
    security issue. Where would I change it so that I can access files of this
    type. I have the project from my own computer and log in as an
    administrator, but to no avail.

    I hope the description of the problem is clear enough, and I hope somebody
    knows an answer that can help me.

    Thank you in advance,
    Jason
     
    Jason Wager, Nov 14, 2003
    #1
    1. Advertising

  2. Jason Wager

    Jason Wager Guest

    I found out, when doing it as a web application (instead of web service),
    that I got an error message:

    Security Exception
    Description: The application attempted to perform an operation not allowed
    by the security policy. To grant this application the required permission
    please contact your system administrator or change the application's trust
    level in the configuration file.

    Exception Details: System.Security.SecurityException: Permission denied


    The problem here is that I have no idea of what to write in the config file
    here.

    Any answers or pointers to where I can find answers are very wellcome.

    Sincerely,
    Jason
     
    Jason Wager, Nov 14, 2003
    #2
    1. Advertising

  3. Jason Wager

    Jason Wager Guest

    Solution found

    For others who might have same problem or otherwise interested.

    Problem:
    I could not create an ActiveX object on the ASP .NET page unless using
    Impersonate in the web.config. When I wanted to create a COM object that in
    itself created an ActiveX object, that was not enough.

    The solution to this problem was to give aspnet_wp the rights to the ActiveX
    component through the dcomcfng.exe.

    This might pose some security issues. Does anybody have any thoughts on
    this?

    Sincerly,
    Jason
     
    Jason Wager, Nov 15, 2003
    #3
    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. batista
    Replies:
    1
    Views:
    928
    Laurent Bugnion
    Jan 26, 2006
  2. batista
    Replies:
    0
    Views:
    571
    batista
    Jan 26, 2006
  3. Peter Nordström

    Webservice calling a webservice.....Error

    Peter Nordström, Oct 21, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    173
    Peter Nordström
    Oct 21, 2003
  4. Calling a webservice from a webservice

    , Apr 19, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    162
  5. batista
    Replies:
    0
    Views:
    258
    batista
    Jan 26, 2006
Loading...

Share This Page