2015-07-01 39 views
0

我有一個軟件,當我在本地主機上運行它時工作得很好,但是當我將它發佈到服務器時,它的類型重複了它在查詢字符串上的無窮大。查詢字符串在服務器上自我複製

這是錯誤我得到:

HTTP Error 404.15 - Not Found 

The request filtering module is configured to deny a request where the query string is too long. 

,這裏是它嘗試訪問該網址:

http://localhost:8084/Account/Login?ReturnUrl=%2FAccount%2FLogin%3FReturnUrl%3D%252FAccount%252FLogin%253FReturnUrl%253D%25252FAccount%25252FLogin%25253FReturnUrl%25253D%2525252FAccount%2525252FLogin%2525253FReturnUrl%2525253D%252525252FAccount%252525252FLogin%252525253FReturnUrl%252525253D%25252525252FAccount%25252525252FLogin%25252525253FReturnUrl%25252525253D%2525252525252FAccount%2525252525252FLogin%2525252525253FReturnUrl%2525252525253D%252525252525252FAccount%252525252525252FLogin%252525252525253FReturnUrl%252525252525253D%25252525252525252FAccount%25252525252525252FLogin%25252525252525253FReturnUrl%25252525252525253D%2525252525252525252FAccount%2525252525252525252FLogin%2525252525252525253FReturnUrl%2525252525252525253D%252525252525252525252FAccount%252525252525252525252FLogin%252525252525252525253FReturnUrl%252525252525252525253D%25252525252525252525252FAccount%25252525252525252525252FLogin%25252525252525252525253FReturnUrl%25252525252525252525253D%2525252525252525252525252FAccount%2525252525252525252525252FLogin%2525252525252525252525253FReturnUrl%2525252525252525252525253D%252525252525252525252525252FAccount%252525252525252525252525252FLogin%252525252525252525252525253FReturnUrl%252525252525252525252525253D%25252525252525252525252525252FAccount%25252525252525252525252525252FLogin%25252525252525252525252525253FReturnUrl%25252525252525252525252525253D%2525252525252525252525252525252FAccount%2525252525252525252525252525252FLogin%2525252525252525252525252525253FReturnUrl%2525252525252525252525252525253D%252525252525252525252525252525252FAccount%252525252525252525252525252525252FLogin%252525252525252525252525252525253FReturnUrl%252525252525252525252525252525253D%25252525252525252525252525252525252FAccount%25252525252525252525252525252525252FLogin%25252525252525252525252525252525253FReturnUrl%25252525252525252525252525252525253D%2525252525252525252525252525252525252FAccount%2525252525252525252525252525252525252FLogin%2525252525252525252525252525252525253FReturnUrl%2525252525252525252525252525252525253D%252525252525252525252525252525252525252FAccount%252525252525252525252525252525252525252FLogin%252525252525252525252525252525252525253FReturnUrl%252525252525252525252525252525252525253D%25252525252525252525252525252525252525252F 

,你可以看到它只是增加了相同的查詢多次。

什麼可能是錯的?這是在服務器上還是以某種方式在代碼中?

+0

我的意思是,它在我在Visual Studio中本地運行它時效果很好。 –

+0

如果您的域名長度超過了'localhost:8084',可能會超過** 2,083 **個字符。您的完整網址長度不應超過** 2,083 ** –

+0

不可以,我們只是使用端口訪問網站 –

回答

0

我有點晚,但我有同樣的問題,我想指出爲他人提供的解決方案。

我的具體問題是我在登錄頁面中有一個不允許匿名的局部視圖,所以即使在登錄時它也會嘗試重定向到登錄,從而導致無限循環。

剛上每出現在登錄頁面添加行動

[AllowAnonymous] 

。 (或不加載它的情況下匿名用戶取決於你想要的)