tags:

views:

57

answers:

1

Hi all!

I am trying to call a DLL function in my file.aspx.cs like this:

[DllImport("the.dll")]
private static extern bool theFunction(int width, int height);

And:

  • file "the.dll" is in "C:\Windows\System32\inetsvr"
  • my web site is an application that has the privileges to read and execute it
  • if I try File.Exists("the.dll") on the server it returns true, so the DLL is on the server "path"

But:

  • if I try to run the page on localhost, all is OK
  • if I try to run the page uploaded on IIS server, the page loads to infinity... Nothing shows up, nothing happens!? And then IIS gets blocked and I have to restart the server.

What am I doing wrong? o_0

A: 

Check security and permissions settings on IIS. Also try putting dll in bin folder.

Sharique