On Windows 7, how does one configure Asp.net website pseudo-static in IIS 7?

Source: Internet
Author: User

Today, I would like to share with you my personal experience on "Configuring Asp.net website pseudo static configuration in Windows 7 OS iis 7". This is the first time I used iis7 to configure Asp.net website pseudo static, so we have taken a detour. Today we will post it to share with you. First of all, we will not talk about attaching the website to IIS, I think the first step is to make sure that pseudo-static data is useful when you browse a website through vs locally. It is not cumbersome to find a lot of methods on the Internet, now I will post the detours I 've taken, so that you don't need to take any detours in the future.

Step 1: Add a new website

Then configureProgramPool, port number, default document, etc. Click Browse to see if the website can be opened

If you can browse normally, the first step is complete. If you cannot browse, find the reason.

Step 2: find out the cause of pseudo-static failure

I can open the website normally, and when there is a pseudo Static Page, 404 error will be reported, you know.

Then I started to check the program pool, which I thought should be. net Framework version, I used 3.5 in the configuration file, but I chose 2.0, because there is no 3.5 option, I am depressed.

As a result, I went to the Internet to download version 3.5 and installed it after the download. I don't know why, but I just couldn't install it. I couldn't change it to several versions. I'm speechless, then I found some references and thought about it. the problem with the Net Framework Version may still be the configuration problem. Finally, the problem is found, because iis7 is slightly different from the previous version in terms of Configuration: previous versions can achieve pseudo-static state by selecting program ing, but iis7 does not work because it cannot find the aspnet_isapi.dll file and cannot map, therefore, you can only complete the configuration (this is my personal understanding), and finally find the solution, that is, add the following in the configuration file:Code:

<Handlers>
<Add name = " Urlchat " Path = " *. Thtml " Verb = " Get, post " Modules = " Isapimodule " Scriptprocessor = " % Windir % \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_isapi.dll " Resourcetype = " Unspecified " Precondition = " Classicmode, runtimeversionv2.0, bitness32 " />
<Add name = " Scripthandlerfactory " Verb = " * " Path = " *. Asmx " Precondition = " Integratedmode " Type = " System. Web. Script. Services. scripthandlerfactory, system. Web. Extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 " />
<Add name =" Scripthandlerfactoryappservices " Verb = " * " Path = " * _ Appservice. axd " Precondition = " Integratedmode " Type = " System. Web. Script. Services. scripthandlerfactory, system. Web. Extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 " />
<Add name = " Scriptresource " Precondition = " Integratedmode " Verb = " Get, head " Path = " Scriptresource. axd " Type = " System. Web. Handlers. scriptresourcehandler, system. Web. Extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 " />
</Handlers>

In this way, the pseudo-static effect can be achieved.

Note: I have only implemented the pseudo-static effect with suffix names. Style disorder occurs when no suffix is configured and the pseudo-static effect is not resolved yet, if you have any good solutions, please let me know. Thank you!

PS: Tandy tang I wish you a pleasant time writing your code!

Related Article

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.