I set up a .NET MVC project that uses both anonymous and windows authentication to users. It is also configured enabled in IIS for those 2 authentication methods. How can we only force windows authentication and start to ask user for windows username/password for certain webmethods (calling from client side's ajax) in certain cs code for page:
Default.aspx
Default.aspx.cs
when certain webmethod is targeted:
[WebMethod]
[ScriptMethod(UseHttpGet = true)]
public static string retr_key()
to pop up windows authentication request for user and once user passes that authentication, no need to ask for second time.
What needs to be done in web.config? And what authorize attribute should be used?