【问题标题】:Asp.net Forms Authentication & IIS Default Document causes an extra execution page load of default document which had set in IIS default docAsp.net Forms Authentication & IIS Default Document 导致在 IIS 默认文档中设置的默认文档的额外执行页面加载
【发布时间】:2011-07-08 19:57:32
【问题描述】:

场景:

  1. 我在 IIS 中将默认文档设置为 Home.aspx。
  2. Web.config 中表单身份验证的默认 URL 是 Default.aspx。
  3. 例如,单击 Default.aspx 中的任何链接都会导航到页面 X。
  4. 现在 Home.aspx 的 Load 事件正在执行。

步骤#4(执行主页加载事件)不正确,但我不知道home.aspx与Default.aspx页面的重定向事件有什么关系?

问题 - 总是 Home.aspx 页面的 Load 事件正在执行。

您能帮我解决这个问题吗?

问候,

卡提克

【问题讨论】:

    标签: c# asp.net iis forms-authentication


    【解决方案1】:

    您的 Default.aspx 的类后面的代码可能指向您的主页类。

    检查您在 Default.aspx 中的页面声明:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="**Default.aspx.cs**" Inherits="YourNamespace.Default"
        MasterPageFile="~/Masters/YourMaster.master"  %>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-11
      • 2015-05-02
      • 2012-09-15
      • 2011-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多