Inherit HttpWebRequest

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to inherite HttpWebRequest named "HttpWebMultipartRequest". My class
contains method that help adding a name and value in multipart/form-data
requesst. My question is how can I use it? HttpWebRequest's constructor has
two parameters: SerializationInfo and StreamingContext. I cannot find how to
give these parameter to HttpWebMultipartRequest
 
Hello!
You wrote on Sat, 2 Apr 2005 18:55:02 -0800:

T> I want to inherite HttpWebRequest named "HttpWebMultipartRequest". My
T> class contains method that help adding a name and value in
T> multipart/form-data requesst. My question is how can I use it?
T> HttpWebRequest's constructor has two parameters: SerializationInfo and
T> StreamingContext. I cannot find how to give these parameter to
T> HttpWebMultipartRequest

Microsoft has done a very stupid thing by locking HttpWebRequest for http:// protocol:

==
Duplicate prefixes are not allowed. RegisterPrefix returns false if an
attempt is made to register a duplicate prefix.
Note The HttpWebRequest class is registered to service requests for HTTP
and HTTPS schemes by default. Attempts to register a different WebRequest
descendant for these schemes will fail.
==

So you just can't do what you want.

With best regards,
Eugene Mayevski
 
Theewara said:
I want to inherite HttpWebRequest named "HttpWebMultipartRequest". My
class contains method that help adding a name and value in
multipart/form-data requesst. My question is how can I use it?
HttpWebRequest's constructor has two parameters: SerializationInfo
and StreamingContext. I cannot find how to give these parameter to
HttpWebMultipartRequest

These parameters are used to implement the ISerializable interface. You
don't use this constructor directly, and you normally keep this
constructor protected or private.

Cheers,
 
Back
Top