Asp.net uses httpmodule to implement a reverse proxy

Source: Internet
Author: User
A http://www.codeproject.com/KB/IP/reverseproxy.aspx found on the Network

When httphandel is used to implement reverse proxy, it turns out that its configuration is a bit complicated, and some virtual hosts cannot be configured.

I want to change it to httpmodule, so that it can be used on the VM.

Then we started.

The module has been written. In vs2010, everything is normal. Which integration mode is added to iis7?

Something went wrong at once.

Configuration Error lock conflict

 

The solution is to set <system. webserver> In applicationhost. config under c: \ windows \ system32 \ inetsrv \ config
<Modules>
<Add name = "httpcachemodule" lockitem = "true"/>
<Add name = "staticcompressionmodule" lockitem = "false"/>
<Add name = "defaultdocumentmodule" lockitem = "false"/>

Change lockitem = "true" to false

 

In this way, you can pass

 

It is hoped that most host providers will not lock this.

In terms of principle, the request will be relayed in a simple sentence.

 

Source code download

 

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.