httpHandler implementation.Net without suffix name Web access implementation
- 2020-05-16 06:39:17
- OfStack
First, add the HttpHandler definition in Web.Config:
Redefining HttpHandler logic:
In this case, an Http redirect is achieved by obtaining parameters from an Get request.
Finally, IIS on the server where you're deploying it needs to be set up: go to website - > Property - > Home directory - > To configure, add the executable file "C:\WINDOWS\ Microsoft.NET \Framework\ v2.0.50727 \ aspnet_isapi.dll "in" wildcard application mapping (order of execution)" and uncheck "confirm the existence of the file".
In this way, we can through / / www ofstack. com/wtSSOCheck? reqstr=tteesstt such a path to access Web.
<httpHandlers>
<add verb="*" path="*" type="Encourage.wtSSOCheck"/>
</httpHandlers>
Redefining HttpHandler logic:
public class wtSSOCheck : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string a = context.Request.QueryString["reqstr"];
context.Response.Write(a);
}
public bool IsReusable
{
get
{
return false;
}
}
}
In this case, an Http redirect is achieved by obtaining parameters from an Get request.
Finally, IIS on the server where you're deploying it needs to be set up: go to website - > Property - > Home directory - > To configure, add the executable file "C:\WINDOWS\ Microsoft.NET \Framework\ v2.0.50727 \ aspnet_isapi.dll "in" wildcard application mapping (order of execution)" and uncheck "confirm the existence of the file".
In this way, we can through / / www ofstack. com/wtSSOCheck? reqstr=tteesstt such a path to access Web.