all groups > dotnet interop > october 2004 >
You're in the

dotnet interop

group:

Problem when using COM from a webservice


Problem when using COM from a webservice rknewsaccount NO[at]SPAM yahoo.co.uk
10/28/2004 3:10:05 AM
dotnet interop: Hi,

I have written some code in VB.net that uses a COM object via a
reference I have add to my project. This program works as expected. I
thought it would be a neat idea to expose the functionality offered by
this program as a web service so that I can use the program across my
UNIX/LINUX and Windows driven production lines.

I have narrowed the issue down to the following lines of code:


Dim z As AGTFDCOMSERVERLib.IAgtFDEngine
z = New AGTFDCOMSERVERLib.AgtFDEngineClass

It falls over on the second line. I have scoured the newsgroups and
msdn and tried various suggestions. I am new to IIS and I suspect
there could be some sort of configuration issue as the could would
work as a straight forward windows application. My web server
configuration is exactly as Visual Studio generates, I have not
altered it.

To complicate matters further I can use other COM objects added as
references and they at least allow me to instansiate them. Either way
I am puzzled as to why it runs fine as windows app but not as a web
service.

The error message from the web server is HTTP 500 internal server
error.

I would appreciate any help.

Regards

RE: Problem when using COM from a webservice Kaustav
10/28/2004 8:59:05 AM
Hi Raymond,

yeah looks like more of a permission issue. Just grant the ASPNET account
and IIS_WPG group proper rights and see if that helps.

Kaustav.

[quoted text, click to view]
Re: Problem when using COM from a webservice rknewsaccount NO[at]SPAM yahoo.co.uk
10/29/2004 6:57:02 AM
Hi Kaustav,

I spent a fair amount of time trying to get the most secure set of
permissions that would allow the web service to run. I tried to set
the user group membership to a few different settings, I altered the
file permissions for read/write/execute within these groups. In the
end I gave up and set the ASPNET group to admistrators. Now, that just
does not seem right. I am sure there must be a more secure setting.

I used the IIS admin tool from adminstrator tools and I tweaked the
execute permissions to 'scripts and executables' and applications to
Low(IIS Process).

I sure there is someone out there who would know the required
permissions masked that might return my webserver to a more secure
setting.

Thanks for your help.

Raymond



[quoted text, click to view]
AddThis Social Bookmark Button