httpWebRequest created differently
I have a .dll that I've been able to successfully run in both a test and production environment that does a WebRequest.Create() and a request.GetResponse().
Everything works fine when I put a Windows frontend in front of my .dll. However, when I put an Web page in front of my .dll, the server I am dealing with returns an HTTP 403 Forbidden error.
When I do a hash of the HttpWebRequest object created with the Windows frontend, I get the exact same hash every time. When I do a hash of the HttpWebRequest object created with the Web page front end, I get a different hash eash time. Obviously there's a difference in how the HttpWebRequest object is being created depending upon the front end being used and this difference is the source of my problems.
I initally thought of instantiating the request object using the Windows front end, then serialize the object and save it to a database. Subsequent calls would de-serialize the request object and use it. Trouble is, the request uses a variable query string, which as far as I can tell must be in place at the time Create() is called. There's no way to set this property after the object has been instantiated.
Any help anyone can provide would be greatly appreciated.
|