How to mix ASP.NET Forms and Windows authentication
-
I am developing a web application that uses Forms authentication however it has a few web service methods so that I can script some maintenance tasks and allow other administrative functions. Is there an easy way to change a sub folder to use Windows authentication instead of Forms without multiple web applications or web.config files. I tried to override it using the option but am getting "configuration section not allowed to be set below application." when looking in IIS. Any thoughts on how to use both methods without deploying a separate app?
The network is down...let's go get bagels.
-
I am developing a web application that uses Forms authentication however it has a few web service methods so that I can script some maintenance tasks and allow other administrative functions. Is there an easy way to change a sub folder to use Windows authentication instead of Forms without multiple web applications or web.config files. I tried to override it using the option but am getting "configuration section not allowed to be set below application." when looking in IIS. Any thoughts on how to use both methods without deploying a separate app?
The network is down...let's go get bagels.
-
I am developing a web application that uses Forms authentication however it has a few web service methods so that I can script some maintenance tasks and allow other administrative functions. Is there an easy way to change a sub folder to use Windows authentication instead of Forms without multiple web applications or web.config files. I tried to override it using the option but am getting "configuration section not allowed to be set below application." when looking in IIS. Any thoughts on how to use both methods without deploying a separate app?
The network is down...let's go get bagels.
If you don't want to add extra web.config files in the subfolder, you can add a <location> section in your main web.config.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
If you don't want to add extra web.config files in the subfolder, you can add a <location> section in your main web.config.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
Is there perhaps a machine or web.config setting that could be preventing it? IIS throws up errors when I am using the tag.
The network is down...let's go get bagels.
What's the error messages?
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
I am developing a web application that uses Forms authentication however it has a few web service methods so that I can script some maintenance tasks and allow other administrative functions. Is there an easy way to change a sub folder to use Windows authentication instead of Forms without multiple web applications or web.config files. I tried to override it using the option but am getting "configuration section not allowed to be set below application." when looking in IIS. Any thoughts on how to use both methods without deploying a separate app?
The network is down...let's go get bagels.
You cannot mix the two authentication methods. You can only use one authentication method per site, so you have to pick either Forms or Windows. The only thing you can do with a sub folder is change the authorization, which is something separate.
-
You cannot mix the two authentication methods. You can only use one authentication method per site, so you have to pick either Forms or Windows. The only thing you can do with a sub folder is change the authorization, which is something separate.
There is atleast one workaround[^].
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
There is atleast one workaround[^].
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
I agree that the OP might be able to impliment this to work with their application, but my point is still valid. As the article states "While you might like to just combine Forms and Windows authentication, its not that easy. Each ASP.NET application can only have one authentication type, so you need to pick just one."
-
I agree that the OP might be able to impliment this to work with their application, but my point is still valid. As the article states "While you might like to just combine Forms and Windows authentication, its not that easy. Each ASP.NET application can only have one authentication type, so you need to pick just one."
Agreed.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions