????? ????? ????? HTTP ASP.NET ???????? Visual C# .NET

?????? ????????? ?????? ?????????
???? ???????: 308001 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

???? ??? ??????? ???? ????? ??? ????? ??????? Visual C# .NET ?????? ????? HTTP ????? ? ???????. ???? ??? ?????? ????? ????? ????? ?????? ???????.

??????? ????

????? ??? ?????

  1. ???? Microsoft Visual Studio .NET. ?? Visual C# .NET ? ????? ????? "????? ??????" ???? ???? MyHandler.
  2. ????? ???? ??? ???? System.Web.dll.
  3. ????? ????? ??????? ??? ?????:
    using System.Web;
    					
  4. ????? ????? ??? SyncHandler.cs ?? ?? ?????? ????? ????? ???? ???.
  5. ???? ?????? ????? IHttpHandler. ??? ?? ???? ????? ????? ??? ???:
    public class SyncHandler : IHttpHandler
    					
  6. ????? ??????? IsReusable ???????? ProcessRequest ????? IHttpHandler. ??? ??? ????? ?????? ?????? ??? ??????? IsReusable ???? ?? ??? ??????? ??? ???????.
    public bool IsReusable
    {
       get {return false;}
    }
    
    public void ProcessRequest(HttpContext context)
    {
       context.Response.Write("Hello from custom handler.");
    }
    					
  7. ????? ???????.

??? ?? ?????

  1. ????? ???? ???? ???? ????? ??? ?????? C:\Inetpub\Wwwroot.
  2. ????? ???? ???? ???? ????? ?? ???? ????? ?? ?????? ??????. ?? ?????? ??????? C:\Inetpub\Wwwroot\Handler\Bin.
  3. ??? MyHandler.dll ?? ?????? Bin\Debug ??????? ????? ?? ??? ???? C:\Inetpub\Wwwroot\Handler\Bin.
  4. ???? ??????? ??????? ???? ????? ??? ???? ????? ???? ?????? ???:
    1. ???? ????? ????? ??????.
    2. ???? ??? ?????? ?????? ??? ?????? ????? ??? ?? ???? ??? ?????.
    3. ??? ????? ??????? "??????" ? ???? ??? ?????.
  5. ???? ??????? ??????? ?????? ???? ????? ??????. ??? ?????? ????? ????? ????? Aspnet_isapi.dll ?????? *.sync. ????? ??? ??? ??? .sync ??? ????? ????? ??? ASP.NET ? ????? ASP.NET ?????? ????????? ???????? ?? ???????.
    1. ???? ??? ?????? ?????? ??? ????? "??? ?????" ??? ?? ???? ??? ?????.
    2. ?? ????? ??????? "??????" ? ???? ??? ?????.
    3. ???? ??? ????? ?????? ????? ????.
    4. ?? ???? ???? "??????? ???????" ? ???? ?????? ??????: ???? ??????? Microsoft Windows 2000:
      C:\WINNT\Microsoft.NET\Framework\<version#>\Aspnet_isapi.dll
      Microsoft Windows XP:
      C:\WINDOWS\Microsoft.NET\Framework\<version#>\Aspnet_isapi.dll
    5. ?? ???? ???? ???? ???? .sync.
    6. ???? ?? ????? ????? ???? ???????? ?????? ?? ???? ????? ??? ?? ???? ??? ????? ?????? ???? ?????? ????? ???? ??????? ?????/?????.
    7. ???? ??? ????? ?????? ?????? ?????? ????? ????? "?" ????? ???????.
  6. ???? ????? ????? ??????.

????? ?????? ?????

  1. ?? ?????? C:\Inetpub\Wwwroot\Handler ????? ??? ???? ???? Web.config.
  2. ????? ????????? ???????? ??????? ??? ??? Web.config:
    <configuration>
       <system.web>
          <httpHandlers>
             <add verb="*" path="*.sync" type="MyHandler.SyncHandler, MyHandler" />
          </httpHandlers>
       </system.web>
    </configuration>
    						
    ?? ????? = "*" ????? ? ????? ?????? ??????? ?????? ??? ?????? ?? ????? (??? ???? ??????? POST, HEAD ? GET ?????). ??? ??? ???? ?? ?? ???? ????? ??? ?????? ????? POST ????? ??? ?????? ????? = "POST".

    ?? ?????? = "*.sync" ??? ???? ?????? ??????? ????? ?????? ??? ????? ??????? ??????? ??? ?????? .sync.

    ?? type="MyHandler.SyncHandler MyHandler" ????? ???? ?????? ??????? ???? ??????? ????? ?????? ?? ????? ????? MyHandler.SyncHandler ????? ??? ????? ?? ??????? MyHandler.

?????? ?????? ??????? ??

??????? ????? ???? ?? ???? ?????? ?? ???? ???????. ??? ???? ??????? ??? ??? Default.sync ?? ????? "??? ?????" (<computername>/Handler/Default.sync http://). ??? ?? ???? ??????? ???????:
Hello from custom handler.
				

?????

?????? ??? ??????? ?????? ??? ??????? HTTP ???? ??? ??? ??????? ????? ?????? ?? "????? ??????? ?? Microsoft:
307985INFO: ???? ???? ??????? HTTP ? ??????? ??????? HTTP ASP.NET

???????

???? ???????: 308001 - ????? ??? ??????: 27/????? ??????/1425 - ??????: 3.6
????? ???
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
  • Microsoft Visual C# .NET 2003 Standard Edition
  • Microsoft Visual C# .NET 2002 Standard Edition
????? ??????: 
kbmt kbconfig kbhowtomaster kbhttphandlers kbhttpruntime kbweb KB308001 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????308001

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com