Cassini vs IIS Authentication Issue
Asked Answered
G

1

0

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

Grapheme answered 18/3, 2010 at 10:12 Comment(0)
M
2

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

Check it.

Manse answered 18/3, 2010 at 10:15 Comment(2)
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.Grapheme
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.Grapheme

© 2022 - 2024 — McMap. All rights reserved.