HTTP Error 404.15 The request filtering module is configured to deny a request where the query string is too long

前端 未结 2 573
耶瑟儿~
耶瑟儿~ 2021-01-13 19:31

I have created a brand new web form application from Visual Studio 2013 and set the following in the web.config file:


         


        
相关标签:
2条回答
  • 2021-01-13 20:03

    The solution it's not completely deactivating the whole authentication system.

    The problem may be caused by the access control not correctly setting Login.aspx permission when using the FriendlyUrls module. So you must force the permissions also for the Login page by it's "friendly" name. In the folder where login page it's stored, possibly will already be a web.config file that you may setup like this:

    <?xml version="1.0"?>
    <configuration>
      ...
    
      <location path="Login">
        <system.web>
          <authorization>
            <allow users="*"/>
          </authorization>
        </system.web>
      </location>
      <location path="Login.aspx">
        <system.web>
          <authorization>
            <allow users="*"/>
          </authorization>
        </system.web>
      </location>
      ...
    
    </configuration>
    

    Note: Take care with other pages currently in the same folder and setup accesses accordingly.

    0 讨论(0)
  • 2021-01-13 20:10

    Here is how I got it to work.

    1. Excluded all the items under the Account folder except Login.aspx
    2. Excluded IdentityConfig and Startup.Auth under the App_Start folder
    3. Excluded IdentityModels under the Models folder
    4. Excluded Startup under the root folder of the application
    5. Commented out all the code under Page_Load and LogIn inside the Login.aspx code file
    6. Commented out code with OpenAuthProviders in the Login.aspx markup
    7. Added the following key to the appSettings section inside the web.config file
    <add key="owin:AutomaticAppStartup" value="false" />
    
    0 讨论(0)
提交回复
热议问题