2017-06-29 160 views
0

我總是收到此錯誤。無法弄清楚問題所在。我嘗試清除我的cookies /整個瀏覽記錄仍然沒有運氣。localhost重定向你太多次了。 - ERR_TOO_MANY_REDIRECTS

在我的Index.aspx我在下面上的Page_Load

protected void Page_Load(object sender, EventArgs e) 
    { 
     if (User.Identity.IsAuthenticated == true) 
     { 
      Response.Redirect(FormsAuthentication.DefaultUrl, true); 
     } 
    } 

代碼在web配置我有這樣的:

<authentication mode="Forms"> 
     <forms cookieless="UseCookies" defaultUrl="app_files/home.aspx" loginUrl="index.aspx" name="osivms" path="/" protection="All" requireSSL="true" slidingExpiration="true" timeout="525600" /> 
    </authentication> 

有時它的工作,雖然..但其真正隨機的,我不知道什麼改變時,它的工作..然後我刷新或什麼我再次得到相同的錯誤消息...

+0

這確實沒有足夠的信息。 Response.Redirect(FormsAuthentication.DefaultUrl,true);'帶你到哪裏? – john

+0

發送至:app_files/home.aspx – psj01

+0

您發佈的c#代碼在哪裏? – john

回答

1

此問題已修復。我遵循這個page的指示,我的localhost現在又開始工作了。

我必須刪除舊證書並創建一個自簽名的新證書並將其綁定到該網站。

相關問題