Registers a WebRequest descendent with the WebRequestFactory for a specific Uniform Resource Identifier.
[Visual Basic] Public Shared Function RegisterPrefix( _ ByVal Prefix As String, _ ByVal Creator As IWebRequestCreate _ ) As Boolean [C#] public static bool RegisterPrefix( string Prefix, IWebRequestCreate Creator ); [C++] public: static bool RegisterPrefix( String* Prefix, IWebRequestCreate* Creator ); [JScript] public static function RegisterPrefix( Prefix : String, Creator : IWebRequestCreate ) : Boolean;
true if registration was successful; otherwise, false.
Duplicate prefixes are not allowed. RegisterPrefix will return false if an attempt is made to register a duplicate prefix.
Note The HttpWebRequest class is registered to service requests for the http and https schemes by default. Attempts to register a different WebRequest descendent for these schemes will fail.
WebRequestFactory Class | WebRequestFactory Members | System.Net Namespace