View Complete Post
I have implemented a https HttpWebResponse in .Net 3.5 as follow.
System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("https://someDomain.com");
System.Net.ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidation;
request.Credentials = System.Net.CredentialCache.DefaultCredentials;
System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
System.IO.Stream responseStream = response.GetResponseStream();
System.IO.StreamReader reader = new System.IO.StreamReader(responseStream);
string responseData = reader.ReadToEnd();
public bool RemoteCertificateValidation(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
Now the problem is when ever it wants to read from the created URL (request.GetResponse();) it throws the following exception:
"The underlying connection was closed: An unexpected error occurred on a receive."
I have searched and found out there are some method in .Net 1.1 which you have to download certificate and add a reference to that. Also have to implement the ICertificatePolic
I am developing an application which requires a logon to a website.
I am using Firefox and Tamper to view the HTTP traffic and trying to replicate this using HTTPWebRequest/Response objects.
According to Tamper, multiple cookies are returned by the response object: the Set-Cookie header reads:
Set-Cookie=JSESSIONID=X1X1; Path=/; Secure vb_session_key=96160; Expires=Sun, 30-Oct-2011 02:09:21 GMTabc123=""; Expires=Sun, 30-Oct-2011 02:09:21 GMTSessionLoginUser=chans; SecureWLSessionKeyHashCode=-250316961; Secure
When I try to parse the "Set-Cookie" header, I am able to read only the JSESSIONID value, which I think is down to the fact that the Path has been specified. I also tried using the CookieContainer, but I encountered the same problem.
Any ideas on how to view all cookies ?
Thx in advance
Hi, I use the HttpWebRequest to download a .pdf file from an http URL, but my problem is that the pdf file is generated when the URL is invoked, and between invocation and generation of the file, an html wait page is generated. For this my HttpWebResponse get the html wait page. My question is how can I get the pdf file and ignore the html page wait?Thank you in advance
The api guide is real briefe about cookies. I would I go about creating/assiging a cookie, setting exporation, and anything else...
Could someone just list out the helper capabilities?
Thanks for your time...!
I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...
I've been handed an application thats connection string implies a local host connection.
I want to make this connection a remote connection, to a database located on a Server. I want the client and server to be able to communicate with one another remotely, instead of a local connection.
How does one create the Data Service, and establish end points to Server and Client? Is it as simple as creating a contract (which I have limited knowledge on constructing), between the two locations, setting up the dataservice, security, and ratifying the 'connetions'?
A smidge of insight, please ;-)
Ive 'inherited' some code that creates a HttpWebRequest object to consume a webservice and am working through it to figure out what each bit does. Ive never consumed webservices this way before (I always create a webreference) so this way of working is new to me. I can follow all of it except for one bit. Heres the code Im having trouble understanding
ASCIIEncoding encoding = new ASCIIEncoding();
byte bytesToWrite = encoding.GetBytes("The message here");
// create web request
const string Action = "http://Awebaddress.org/AProcess";
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("The web service url here");
const string contentType = "text/xml; charset=utf-8";
httpWebRequest.Method = "POST";
httpWebRequest.ContentType = contentType;
httpWebRequest.Timeout = -1;
httpWebRequest.ContentLength = bytesToWrite.Length;
the line im having trouble with is this one
Data Points: Windows Azure Table Storage - Not Your Father's Database Let go of your traditional relational database thinking if you want to understand how Windows Azure Table storage works, says Julie Lerman. Luckily for you, she's done the hard work to grasp the new concepts and help you get up to speed.Julie LermanMSDN Magazine July 2010
Let go of your traditional relational database thinking if you want to understand how Windows Azure Table storage works, says Julie Lerman. Luckily for you, she's done the hard work to grasp the new concepts and help you get up to speed.
MSDN Magazine July 2010
Yes, you can run background processes in the cloud. Kevin Hoffman and Nate Dudek use a shopping cart example to demonstrate how to build an application engine as well as implement asynchronous messaging and processing using Azure Storage.
Kevin Hoffman, Nathan Dudek
MSDN Magazine January 2010
This month's column describes how to use WCF for communication between a workflow and a host application in Windows Workflow Foundation 3. This knowledge should help developers with their efforts using WF3 and prepare them for WF4, where WCF is the only abstraction over queues (referred to as "bookmarks" in WF4) that ships with the framework.
MSDN Magazine November 2009
See how to get the most out of isolated storage in Silverlight to keep your applications safe.
Justin Van Patten
MSDN Magazine March 2009
Here we build a syndicated news reader application to illustrate the use of isolated storage and data syndication in Silverlight.
MSDN Magazine February 2009
Smart cards are a compelling alternative to the reliance on passwords, which are the weakest link in authentication systems. Get the Windows smart card programming basics here.
MSDN Magazine November 2006