0
votes

I have this situation where the main domain requires Anonymous Authentication while the sub-domain can only accept Windows Authentication for my app to work.

Currently, I can only do one or the other on IIS. Basically, in my service it's expecting WindowsIdentity and unless it's coming through Windows Authentication it'll becomes ClaimsIdentity. I want to ensure that the identity of this request is a Windows and is authenticated.

I've tried enable Anonymous Authentication and Windows Authentication for the main domain and disabled Anonymous Authentication & enabled Windows Authentication for sub-domain.

Folder and site structure:

Folder

inetpub /myservice /wwwroot /mysubdomain

In IIS

Default Web Site /myservice /wwwroot /mysubdomain

I made the request via http://localhost/myservice/mysubdomain. If I publish my service as IIS in Visual Studio 2019, Windows Authentication works but Anonymous Authentication doesn't. If I publish my service as myservice project then Anonymous Authentication works but Windows Authentication doesn't.

1
Are they separate applications, or all the same? If separate applications, are they under the same site in IIS (one is an app in a virtual folder of the other site) or are they separate sites?Gabriel Luci
I've update my question, if that helps. They're sitting in the same app.Loc Trang

1 Answers

0
votes

I have this sorted out. It's not the ideal solution I wanted but it worked around my problem. I had to change my app to accept only Windows Authentication.