Httphandler implements. NET web access without a suffix

Source: Internet
Author: User

First, add the httphandler definition in Web. config: CopyCode The Code is as follows: <Add verb = "*" Path = "*" type = "encourage. wtssocheck"/>
</Httphandlers>

Then define the httphandler logic:Copy codeThe Code is as follows: public class wtssocheck: ihttphandler
{
Public void processrequest (httpcontext context)
{
String A = context. Request. querystring ["reqstr"];
Context. response. Write ();
}

Public bool isreusable
{
Get
{
Return false;
}
}
}

In this example, GET parameters through GET requests to implement an HTTP redirection.
Finally, you need to set IIS on the server where the deployment is located: click "website"> "properties"> "home directory"> "configuration", and click "wildcard application ".ProgramAdd the executable file "C: \ WINDOWS \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_isapi.dll" to the ing (execution sequence) "and deselect" check whether the file exists.

So that we can pass through the http://www.jb51.net/wtSSOCheck? Reqstr = tteesstt to access the Web.

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.