views:

117

answers:

3

I have built a web service that uses DLLImport to access unmanaged code. The service works just fine running in ASP.NET server but the application is generating an error once I run it from IIS. I have checked permissions, moved ddl to system32, etc. I am not sure what else to do, the service needs to run in IIS. What should I do?

A: 

The main difference from VS's ASP.NET server and IIS is that IIS uses ASP.NET as a default user, but VS's server uses your user to work. check is ASP.NET user have access to execute code in system32? provide more detailed error message, to give us to understand the problem.

ArsenMkrt
A: 

It might be an issue with the default trust level. Try running your app at the FullTrust level and see what happens:

http://msdn.microsoft.com/en-us/library/tkscy493.aspx

Dave Markle
A: 

If it's an authenticated service you could turn on impersonation to carry your credentials through.

RubbleFord