views:

222

answers:

1

Hi All,

I have a C# webservice in .net 4.0. The webservice will create a file on a UNC path. If I let the Cassini web server in visual studio do the authentication it works fine. But if I change the application to use IIS (Windows 7) then the file doesn't get created but no error is reported.

If I change the location of the generated file to a local drive then Cassini and IIS both work fine, but only the Cassini web server will work for a UNC path.

I can only guess at the issue being authentication related, I've tried various combinations of the following;

  • UNC path allow Everyone full access
  • In IIS Windows Authentication
  • In IIS Anonymous Authentication

My windows account has rights to create this file.

I haven't tried user impersonation and I haven't tried changing the anonymous credentials to something with more rights.

Does anyone know of security related differences between the Cassini web server and IIS which would cause these issues?

Many thanks, Mike

+2  A: 

The problem seems to be the identity of the Application Pool.

Check it.

Paulo Santos
Thanks for the help. I can totally understand that the app pool's authentication is incorrect, but how do I give it either elevated rights or (preferably) change it to a specific domain user?I've tried using 'Custom Account' but the credentials I use just keeps saying the password is invalid.
Mike Mengell
My password invalid message was coming up as I wasn't specifying the username correctly. DOMAIN\Username.Problem fixed, I forgot about the security layer on the App Pool.Many thanks for your help.
Mike Mengell