webclient.uploaddata

WebClient.UploadData error: (401) Unauthorized

I'm getting this error... What is puzzling me is the fact that i do not have any type of security enabled for the page i'm invoking... WebClient myWebClient = new WebClient(); myWebClient.UploadData(myUrl,"POST", myByteArray); When i access directly to the page ( on ie ) it works fine, with the WebClient it's not working. Anyone has ...

C# remote web request certificate error

I am getting the following error when trying to perform a HttpWebRequest to a remote server over SSL (the url is https://sandbox.payfast.co.za): "The remote certificate is invalid according to the validation procedure" The certificate seems to be valid and I can successfully make a web request to another url. Could someone tell me how...

Post collection of C# objects using WebClient

I am trying to post to an ASP.NET MVC action from another Action (separate sites) and I need to post a collection of objects. I'm unable to find how to serialize this collection of objects so I can get them as a standard NameValueCollection. Example: var test1 = new TestObject { FirstName = "John", LastName="Smith", IDNum=...