URL link under Windows Server long processing method

Source: Internet
Author: User

When using the win server, if the URL is too long, you will encounter a situation that can not be resolved properly


1. Restrictions:

The path character under WINDOWS is 260 characters, while IIS supports a maximum URL length of 254. In the IIS7 pipeline, the path model, and then into the handle, in the pipeline operation, will try to go to the operating system to find files, whether it is the path of MVC, or the path of ASPX. This will cause an error.


2. Preconditions for lifting restrictions

Environment must use IIS 7.5, the. NET Framework uses version 4.0


3, configuration file in Web. config, add the following configuration


4. Modify the Registration form:

To modify registry information on the server:

Added under Hkey_local_machine/system/currentcontrolset/services/http/parameters: Named Urlsegmentmaxlength, type DWORD 32, value 4 096 (can be customized). Urlsegmentmaxlength indicates the maximum number of characters per URL path that can be accommodated


5. Restart the IIS service

URL link under Windows Server long processing method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.