Calling a COM (exe) file from Webservice

J

Jason Wager

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
 
J

Jason Wager

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
 
J

Jason Wager

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
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top