Fishing with Rod Discussion Forum

Fishing in British Columbia => General Discussion => Topic started by: DragonSpeed on January 30, 2006, 12:36:57 AM

Title: NFR - looking for C# guru
Post by: DragonSpeed on January 30, 2006, 12:36:57 AM
Anyone out there know anything about cookies? (Not the edible type) I'm trying to get the cookies that are sitting in the IE cache, and add them to a httpwebrequest.

Anyone?
Title: Re: NFR - looking for C# guru
Post by: Buckeye on January 30, 2006, 06:37:25 AM
I am certainly no C # guru, but from what I can find I understand that instead of getting the cookies from HttpWebRequest, you should get the cookies from the HttpWebResponse instance returned by GetResponse()

See http://www.codeproject.com/csharp/httpwebrequest_response.asp (http://www.codeproject.com/csharp/httpwebrequest_response.asp)

Hope that helps.

Cheers,
George
Title: Re: NFR - looking for C# guru
Post by: DragonSpeed on January 30, 2006, 07:30:04 AM
But I need to send my cookies on my first request.  I HAVE my cookies on the system (i.e. the persistent cookie sitting in my IE cache), and I want to send them up on the REQUEST, otherwise the server which I am trying to talk to says "Not logged in", since it is expecting those cookies.

Title: Re: NFR - looking for C# guru
Post by: johnny on January 30, 2006, 08:51:52 AM
I know a C+ guru.. I'll ask him for ya.. :)
Title: Re: NFR - looking for C# guru
Post by: johnny on January 30, 2006, 11:33:52 AM
Sorry..  his response:

Sorry, that's too Windows-specfic. I'm a "language lawyer", more into the pure language aspects than the proprietary interfaces...and I especially eschew e-commerce/web-centric UIs. Sorry...

Title: Re: NFR - looking for C# guru
Post by: Rick on January 30, 2006, 01:16:59 PM
But I need to send my cookies on my first request.  I HAVE my cookies on the system (i.e. the persistent cookie sitting in my IE cache), and I want to send them up on the REQUEST, otherwise the server which I am trying to talk to says "Not logged in", since it is expecting those cookies.




Cookies are handled server side and I have never heard of a client sending a cookie to the server?
Title: Re: NFR - looking for C# guru
Post by: DragonSpeed on January 30, 2006, 02:23:03 PM
Sorry..  his response:

Sorry, that's too Windows-specfic. I'm a "language lawyer", more into the pure language aspects than the proprietary interfaces...and I especially eschew e-commerce/web-centric UIs. Sorry...


LOL.  Thanks anyway, and thanks for the chuckle.
Title: Re: NFR - looking for C# guru
Post by: DragonSpeed on January 30, 2006, 02:25:53 PM
But I need to send my cookies on my first request.  I HAVE my cookies on the system (i.e. the persistent cookie sitting in my IE cache), and I want to send them up on the REQUEST, otherwise the server which I am trying to talk to says "Not logged in", since it is expecting those cookies.




Cookies are handled server side and I have never heard of a client sending a cookie to the server?

When IE hits a site it has cookies for, it just offers them up. If the server wants them, and asks for them, it gets them.  Otherwise a cookie based request would be multiround trips.

I've developped a work-around.

1) Hit the Login page with Post Data containing username/password
2) Take the cookie that it hands me.
3) Hit the page that I want, with the cookie that I had handed to me, and do my stuff

It means another round trip to the server but....
Title: Re: NFR - looking for C# guru
Post by: Reservoir Dog on January 30, 2006, 02:36:58 PM
Friends dont let friends use Internet Exploder. Friends use Firefox :) http://www.mozilla.org
Title: Re: NFR - looking for C# guru
Post by: DragonSpeed on January 30, 2006, 03:45:06 PM
Friends dont let friends use Internet Exploder. Friends use Firefox :) http://www.mozilla.org

Friends let their friends work within corporate standards  ::)  IE it is.
Title: Re: NFR - looking for C# guru
Post by: Rick on January 30, 2006, 06:49:20 PM
There is always http://www.experts-exchange.com/ (http://www.experts-exchange.com/) which is a great site
to ask tech related questions...
Title: Re: NFR - looking for C# guru
Post by: Rick on January 30, 2006, 06:52:36 PM
Friends dont let friends use Internet Exploder. Friends use Firefox :) http://www.mozilla.org

I've heard good things about that browser, Google seems to promote it highly, I wonder if it is their product?
Title: Re: NFR - looking for C# guru
Post by: Reservoir Dog on January 30, 2006, 11:05:41 PM
I've heard good things about that browser, Google seems to promote it highly, I wonder if it is their product?

No it's not a Google product, it was created by Mozilla, which was bought by Netscape (Netscape 7 is based on the firefox engine) Firefox unlike IE is an Open Source program (much like Linux) so instead of a few people busting bugs, there are 100's of millions of people busting bugs. Netscape was bought out by AOL about 2 years ago, however Unlike the AOL engine, they didn't mess with Firefox, they had an agreement, to not make changes to Firefox or Netscape. If they mess with the engine EVER, then Netscape & firefox reverts back to the original creators, along with 100 million dollars.