Sign in to follow this  
OpenGL_Guru

[.net] calling an unmanaged C DLL from a C# web service..

Recommended Posts

OpenGL_Guru    104
I am trying to make various calls to a C dll using DllImport from a C# webservice and am running into some problems. I have been able to successfully make the same calls from a local C# application, however as soon as I try to make the call from a web service the functionality of unmanaged code seems to be not allowed. is there anyway around this? where could i change the IIS permissions? i am using VS 2003. thanks a lot for your help --

Share this post


Link to post
Share on other sites
remigius    1172
I'm not sure, but I think this isn't so much an issue with IIS but rather a .NET configuration security policy. Unfortunately that's definitely not my expertise so I can tell you little about it, other than that MSDN most likely provides more info and that you can find the control applet in Settings > Control Panel > Administrative tools > .NET Framework Configuration.

Depending on the functionality of the DLL you're calling, it might be an interesting alternative to set up a local Windows service which will handle the interaction with the DLL and have webapps query the service through named pipes (or another comm mechanism, perhaps remoting). This seperates the web code from the unmanaged native code (which is typically a good idea) and it allows for scalability in that the native work could optinally be done on another machine.

Hope this is of any use :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this