简体   繁体   中英

Is there a way to bypass forms authentication for local requests?

I have an ASP.NET web application that is entirely protected by Forms Authentication.

Is there a configuration under which web requests coming from another application on the same machine, either web or console, can bypass the form authentication and access the page as if it were authenticated?

@merlin2011,you have two chose.

1.use cookie with same machineKey in the different application.(simplest)

the Forms Authentication in ASP.NET use cookie to Encryption and decryption your identity and indicates whether you are logged.the application use different key to encrypt you identity in the different application by default. see more: Forms Authentication Across Applications

notes:this solution only for the between application in the same web domain. (for example, www.example.com , a.example.com ,if the www.example1.com will not work)

2.the application in the different web domain(Complex)

in this situation,you need the Single Sign-on solution .this will required you need to write code to authenticate a user whether is logged.

this article will can help you Cross Site Authentication and Data Transfer

good luckly!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM