问题描述
我遇到的问题是,当定向到FileUploadWAP应用程序中的页面时,我收到第二个登录请求.如果将登录代码和配置部署到根默认站点,则共享身份验证有效.我怀疑Cookie的路径是问题或machineKey.
The issue I am having is I get a second login request when directed to the page in FileUploadWAP application. If the login code and config are deployed to the root default site the shared authentication works. I suspect that the path to the cookie is the problem or the machineKey.
IIS中的网站DefaultWebSite其他应用1其他应用2StaffLocal(是一个应用程序)FileUploadWAP(StaffLocal下的应用程序)
Web site in IISDefaultWebSite Other Application1 Other Application2 StaffLocal (is an application) FileUploadWAP (is an application under StaffLocal )
Web Config file in StaffLocal
<authentication mode="Forms">
<forms loginUrl="login.aspx"
name="StaffWeb"
timeout="610"
path="/"
slidingExpiration="true"
enableCrossAppRedirects="true"
protection="All">
</forms>
</authentication>
Web Config file in StaffLocal/FileUploadWAP
<authentication mode="Forms">
<forms loginUrl="../Login.aspx" (If the .. are removed get error can’t find Login.aspx.)
name="StaffWeb"
timeout="610"
path="../" (have tried / and ../ and other variants)
slidingExpiration="true"
enableCrossAppRedirects="true"
protection="All">
</forms>
</authentication>
Same in both configs
<machineKey
decryption="DES"
decryptionKey="966CF55FB064D15A13789E90CF5B91E640436E07AB6C71A3"
validation="SHA1"
validationKey ="E329E5ECDD7EE4B3BDF27A563F91A38888FA95E5259914DBADD86F9ED681A41732E609F8338"/>
validationKey="E329E5ECDD7EE4B3BDF27A563F91A38888FA95E5259914DBADD86F9ED681A41732E609F8338" />
推荐答案
回答我自己的问题.我将配置更改为使用AES,并且身份验证开始工作.
Answering my own question. I changed the configs to use AES and authentication started working.
这篇关于跨应用程序身份验证IIS到子应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!