“NotSupportedException” when WebRequest is unable to find a creator for that prefix

Try this hacky workaround on this issue:

private static HttpWebRequest CreateWebRequest(Uri uri)
{   
   var type = Type.GetType("System.Net.HttpRequestCreator, System, Version=4.0.0.0,Culture=neutral, PublicKeyToken=b77a5c561934e089");
   var creator = Activator.CreateInstance(type,nonPublic:true) as IWebRequestCreate;
   return creator.Create(uri) as HttpWebRequest;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)