0 votes
by (160 points)
edited by

var creator = new HttpRequestCreator();
creator.Register();

could not cast "Rebex.Net.HttpRequest" to "System.Net.HttpWebRequest"

1 Answer

+1 vote
by (150k points)

var request = (HttpWebRequest)WebRequest.Create(uri);

by (160 points)
Thanks for the reply. I have replace the HttpWebRequest and responses with the rebex one. It looks good, only the cookies and ClientCertificates are not supported or must be implemented different.
thx for help
by (150k points)
edited by
Update: ClientCertificates collection was added in release 2018 R2 (https://www.rebex.net/https/history.aspx#2018R2)

We plan to add support for both HttpWebRequest-style Cookies and ClientCertificates soon. In the meantime, cookies have to be set/retrieved using custom code (use request/response Set-Cookie header - https://en.wikipedia.org/wiki/HTTP_cookie#Implementation). And client certificate authentication is supported using a different API - see https://www.rebex.net/https/features/tls-ssl.aspx#client-certificate for details.
by (75.8k points)
Update: Support for Cookies was added in release 2020 R4 (check https://www.rebex.net/total-pack/history.aspx#2020R4)
...