views:

90

answers:

2

I made a .NET dll and put it in system32 folder and RegAsm it in a win2003 server.

One of the API of this dll is to create a file in c:/ folder. And when I call this API from a classic ASP script, always get this error

System.IO.__Error.WinIOError

So the dll or asp process does not have the sufficient access privilege? How to give it the write access?

Thank you

[Edit] The dll is called in an ASP page, running in a browser.

[Edit] Anyone can help?

A: 

You might find some of the information in this post helpful:

Accessing a .NET Assembly from classic ASP

Look at what user your classic asp app is running under (look at the app pool) and grant access to that user to the folder where you are trying to create files.

Also, are you sure the error is generated from within the DLL and not because you can't access the DLL itself? If possible, put a simple method like Ping or something that returns a string (i.e."Hello!") and see if that works. This way you will at least know you can get to the DLL and execute methods.

Loki Stormbringer
A: 

add permission to ASPNET or Network Service (depending of the version of IIS). You can also change the identity of the application pool in IIS.

Nicolas Dorier