views:

207

answers:

3

I have an .asmx in a folder in my application and I keep getting a 401 trying to access it.

I have double and triple checked the setting including the directory security settings. It allows anonymous. I turned off Windows Authentication.

If I delete the application and the folder its in, then redeploy it under the same application name it magically reapplies the old settings.

If I deploy the exact same application to a different folder on the server and create another application under a new name and set up the directory security setting again it works!!!

How do I get IIS to forget the setting under the original application name?

+1  A: 

After deleting the first application in IIS and its associated files on the disk, try restarting IIS (or your server if possible). Then come back and recreate the whole setup.

Vaibhav
A: 

Eventually I got it working again. By deploying to a different folder and recreating the virtual folder / application to it.

I am not sure how that makes a difference but at least things are working again.

BlackMael
A: 

I ran into a similar situation with asp.net pages. I had Anonymous on and Integrated off for a virtual directory, but one page was the opposite. Everything worked fine until I went to the one special page, then my post backs stopped working and I couldn't log out of the site until I deployed to a new virtual directory.

My eventual solution was to enable anonymous and integrated for the entire site and just turn off anonymous on that one page.

Greg