Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
This example shows how to register a protocol specific classthat is defined elsewhere. In this example, CustomWebRequestCreator is the user-implemented object that implements the Create method that returns the CustomWebRequest object. The code example assumes that you have written the CustomWebRequest code that implements the custom protocol.
Ejemplo
WebRequest.RegisterPrefix("custom", new CustomWebRequestCreator());
WebRequest req = WebRequest.Create("custom://customHost.contoso.com/");
WebRequest.RegisterPrefix("custom", New CustomWebRequestCreator())
Dim req As WebRequest = WebRequest.Create("custom://customHost.contoso.com/")
Compilar el código
This example requires:
References to the System.Net namespace.