1

如果用户选择,我有一个配置为持久登录的网络应用程序。我正在使用表单身份验证并将 cookielesss 设置为自动检测。当使用 cookie 时,票证以及有关用户的详细信息都会得到妥善维护。当我禁用 cookie 时,我会在 url 中嵌入会话标识符并定向到登录页面。

但是,我无法使用 IIS 7 重定向到默认页面。我收到 400 Bad Request - URL

当我在 VS Using cassini 中运行应用程序时,无 cookie 票证和会话工作得很好。

我尝试了以下方法:

  • <httpRuntime maxUrlLength="15000"/>在网络配置中设置。
  • 设置请求过滤以允许非常长的 URL (1000000)

当我在 VS 中进行身份验证和重定向时,重定向工作并且 URL 看起来像:

http://localhost:53605/(X(1)S(new25hbmvxqwiupj3uijv2et)F(HHRQfdcbjBvktt0SbfNrna7jUgMQYcA2q6uv8ptwjYoQCEIO3MgYD59wXfTdRPSnzdaoCnkKQF762Tiii98dEQdmUGiAYm5XrpIcwin_TcEWMRsHDIgrqsvULetKy97--XUWx3ESMkMRWNwwYNEoC65nqvG_-ip1g0y_9N52RwspzW__QFNberHNf9asniAQv8dtFkbClW8hKyjPYawaIzmLgFw-OfCVyVyIkrjONs7nu2TZCV7sQvgG-txTtiSJ_vtBYB81vbv3n2ZSrjHsft6zyodZh0yNbRGJUc1Vb0ee4iAJQnOJ-a4Plsgx1r3qwhw_dVhkl20Omr2V81o84sfhAhd_Ye0Y4CFJk8EakQ5yRf8GNQ7gyn5Je3RWqnoAiW_gdB7VMqB7-eX4RjTml4W1RJAN2QWa7S21w-A_KrD7oc1Cp6vAOwPt_kkBxhYTApUkPIsiFQ5kJ0RnPA6NJFal9BGD9JVS9YDHZS2MHQicR-kUang362AghpexjcIDPTE1QPTEslzfpB2RnoosTPunPK5a3L0_hwSwWllagbCHxHXEA_6d73UhFeX23QYzMG_1gYFhANj7vIT5e3nDuRL_6Yep22h8tzRKAly8mk3Ke5U1_lU0sMrgdjXIInnsVzCbLfN42rUVlJaGOM1kbzM68-P9bLvu_qyD1h1iZak_coDPPNpioxg1BTQ5fyon4kSd89qAvSoDslIn3xJ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JeUbEXpES76Q6M3NJpxwz1YlEMoC_PgV9s5EQtX65QZbxzML2kSyst38Eu_WLyCL-KKE3gAmEHSUhfZ1G5WXXOoSk__vgz1Od9SNUfjxsIyEK4-HstZMLGDNWXZZc7_DTlPGrXS6yr6NfjmJEixxKEpgP-HN3Q18YPyOcS5EUwGa3tISPjGKMGq5qmZcRyihwAImUA0X5lh-rgNvWNM5AkPK8F7fAzygNJ7CZMmKN87wiCsC8kDthKZrOhbzgO4EOTsv0gEnSe7wiSH4vWzrEumUrJDGrFGLmtudyl4hLgAwQcSdMh2OIapGNVAPQTwEqwqc4kEZnWpGxXrfPxejG-IH391TFqHLyYWkN5onVXWhOn3cCeYNqD0yc7jgOZ_AY4gTj4UtiB_PAK4jlRhwyQ4SozJzkSQFimtURC-H6Z7piB6ekXIihtAdTURTpaq6CmKefCh6ydgDJNywS9nFoFBKPUdi3kF9hpuz9yNtfz8zh4LAm6ikP2p0yXBpecQq2W7V6XFJhVXC00Hvx56kvks-r1V4660-WDsvee86-4GID1XBcM7AoOWfkvABWMRDLjixk8ud57QlyJ_kYmHTeIQWDuj3EA1a6383ffycVdx3AFJ8px3eNacHybKX-9kwoYJaoo_T019ZvrcgrNWeK4uEf3VRVYVRydkJoW4Pk6OgDRN1LvSYkwEjGiN_m2g03MLfpboLMtGzorBSjTwvId8u_CqqBB4QAqj7Vt4htU6jfKWlERlqo38dTdub0i69eLAJffVoTEH2wIhqIpRp6WIWk8NNh97AkqYAOR5744cNuqJBJI56ZsY7Ja31wPArJI4nO1ey49CzReI3W5I9MWW2TuWE3x2XjFxXbea_4uTv5CdhGOYqsd5IugFMLz-0Rcva77ZI-ZipISwzv62ZXAGaQKg6PuVWIEGtTs9K_B-h3Dhg3anjxNOS7t03U6v4d9lyNwtmN4nK4-29NUAf2DcPo7V4TQzc-TtTpv-4gcvA_U47HijfasQ2))/Home/Dashboard.aspx

唯一的区别是 webdev 服务器在 web 根目录加载应用程序。我尝试添加一个空白测试页,以确保请求的页面之外没有资源,但它仍然失败。

有什么建议么?

4

0 回答 0