HTTP Web Request to site using Session ID

Hi there

I have some code that needs to make a HTTP request to a site which uses session id's I have the code working fine against sites which don't use session id's already. I was wondering if anybody had any advice on ways to deal with this. I have investigated all of the client side code from the site and cant see an reference to a session id so Im assuming it is a session state. My next thing to try is to see if the server will assign a session to my app but if that doesn't work then I am a bit stuck. Any ideas or suggestion are most welcome.

Cheers
Justin Hewitt



"Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer



Visit me at http://www.dfodesign.co.nz
0
shilohcity
1/14/2004 11:52:07 PM
asp.net.handlers-modules 2116 articles. 0 followers. Follow

3 Replies
769 Views

Similar Articles

[PageSpeed] 58
Get it on Google Play
Get it on Apple App Store

Session IDs are assigned per session (obviously). However, by default on ASP.NET, session IDs are stored on the client side on a cookie the client sends with each request to the server (which is what allows you to link them together).

If you're calling the site programatically, using the HttpWebRequest class (or the WebClient class), make sure you enable cookies by using the CookieContainer class.
Tomas Restrepo [MVP]
tomasr@mvps.org
0
tomasr
1/15/2004 1:30:36 PM
Good suggestion I didn't know there was such a class. I will check this out in the next few days and let you know how things go.

Cheers
Justin Hewitt



"Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer



Visit me at http://www.dfodesign.co.nz
0
shilohcity
1/15/2004 6:51:34 PM
I have been experimenting with this class and have managed to extract the value of the cookie from the response and then add this as a header to my subsequent request. I am still getting a "Session Expired" message from the site I am trying to scrape from however. Im a bit stumped about what to do next.


Cheers
Justin Hewitt



"Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer



Visit me at http://www.dfodesign.co.nz
0
shilohcity
1/20/2004 3:48:59 AM
Reply:

Similar Artilces:

How do I set a session ID in a web service SOAP header using a .NET proxy?
I have a web service proxy set up in PB 10.5. I need to set a session ID in the SOAP header so the web service can validate subsequent requests for this session. Is this possible? You can't modify the SOAP headers unfortunately. That capability is supposed to be forthcoming in an EBF/Maintenance Release, but I do not now of an specific timeframe. On 20 Apr 2006 13:40:54 -0700, "Libby Engelbret" <lengelbret@npomn.com> wrote: >I have a web service proxy set up in PB 10.5. I need to set a session ID in >the SOAP header so the web service can val...

How to use HTTP protocol in .Net Remoting? Thanks and Regards,How to use Http protocol in .net Remoting
<>Hi,     <><>How to use HTTP protocol in .Net Remoting ? Is there any specific code bits requires for that ?    I am using TCP protocol it's working but when i change it to  HTTP it throwing an error like "Arugument null exception"<>  Could  anybody give samples for that? Thanks & Regards,Vijay Here is an example of HTTP remoting:http://msdn2.microsoft.com/en-us/library/system.runtime.remoting.channels.http.httpchannel.aspxCheers,       Kev...

Get Session ID in Web Service from Cookieless web site
Hi,    To get straight to the problem, I have a web service with in my web solution, this service have been created for Ajax calls, am using webservice.htc to call the web service. Web method within the web service uses the Session so each methods are added with [webmethod(true)] attribute, and method takes XmlDocument as an input. eg.[WebMethod(true)]public string MyMethod( XmlDocument xdocInput){------return xmlstring;-------}I had no problem up to now, but when i make my Web site cookieless this fails and I have done following <protocol...

Using the module HTTP::Request
Hello All, I am trying to use the module HTTP::Request. I tried to use the code given in perldoc HTTP::Request Here is my code ============== #!/usr/bin/perl -w use strict; require HTTP::Request; require LWP::UserAgent; my ($request,$response,$ua); $ua = LWP::UserAgent->new; $request = HTTP::Request->new('GET' => "http://www.google.com/"); $response = $ua->request($request); print "$response\n"; ============ But the output of the code is perl aprequest.pl HTTP::Response=HASH(0x81e8a84) How can I make this human reada...

"The request failed with HTTP status 400: Bad Request." when attempting to use a web service
Hi, I'm having a tough time deploying this web service I wrote.  Before I moved it over to the development server I tested the web service locally on my computer using a web portal to talk to the service...  However, now that I've copied it up to the Web Server, it keeps giving me these 400 errors and I can't figure out why.  Any ideas?    Kyle Which web server are you using, 6.0, 7.0....Do you have ASP.NET installed and correctly mapped. Do you have the security set up to allow Web Services. Have you checked your IIS log for any status sub codes.Chr...

superreview requested: [Bug 278821] Access key conflict in Preferences->Advanced->HTTP Networking: both Use HTTP 1.1 and Help use 'H' : [Attachment 171622] Fixed accesskey for Use HTTP 1.1 (H -> E).
Giacomo Magnini <giacomo.magnini@portalis.it> has asked neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> for superreview: Bug 278821: Access key conflict in Preferences->Advanced->HTTP Networking: both Use HTTP 1.1 and Help use 'H' https://bugzilla.mozilla.org/show_bug.cgi?id=278821 Attachment 171622: Fixed accesskey for Use HTTP 1.1 (H -> E). For visibility reasons, I've also changed 2 other accesskeys: Enable Keep-Alive (L -> A) and Enable Pipelining (I -> N) https://bugzilla.mozilla.org/attachment.cgi?id=171622&action=edit ...

"Visual Studio .NET cannot create or open the application. Web site 'http://localhost/2373/Labs/Lab071' not started on this Web server. "
i wanted to create a New Project, with Visual Basic Projects as Project Type, and ASP.NET Web Application as the selected Templates. However, there was an error message pop up saying these: "Visual Studio .NET cannot create or open the application. Web site 'http://localhost/2373/Labs/Lab071' not started on this Web server. " How may i overcome it? Is 2373 already a directory in your web root? How about Labs? It might have something to do with subdirectories, have you tried creating one just off the route? Ala: http://localhost/labs071 ? You might want to try to see if tha...

How to post using http web request
Hi, any body can me how to post below form information using Http web request. // Home Get Started Learn Downloads ...

superreview requested: [Bug 249231] Use only "web site" and "web page" in Firefox : [Attachment 155345] Same as previous with extraneous changes removed
R.J. Keller <rlk@mozdev.org> has asked Ben Goodger <bugs@bengoodger.com> for superreview: Bug 249231: Use only "web site" and "web page" in Firefox http://bugzilla.mozilla.org/show_bug.cgi?id=249231 Attachment 155345: Same as previous with extraneous changes removed http://bugzilla.mozilla.org/attachment.cgi?id=155345&action=edit ------- Additional Comments from R.J. Keller <rlk@mozdev.org> r=rlk@trfenv.com for the help content. Ben, can you review this for 1.0rc1? ...

focus event using http request or xml request using javascipt
i want lost focus event using http request or xml request using javascipt how to call code file (.cs file) using ajax and javascript i have one asp.net server control  Nothing is really over,untill the moment stop trying for it...Amitsp(MCTS,MCP)sqlreporting.blogspot.com You can capture the event in the javascript and then call the cs function in the page from the javascript. You can also call the button in the page (with style=display:none) . In the javascript you can call the click event of the button which will call the server side code.Vikram www.vikramlakhotia.comPlease mark the...

Http handlers and Http modules
Hi,  What are some of the best and common scenarios where Http handlers and Http modules can be usefully used? Sandyhttp://www.thequinn.infohttp://www.sksdataservices.comhttp://www.infobasket.info Hi, ASP.NET uses the handlers for processing aspx, asmx and other files. How can you use it? Well let us say if you want to create a file with a new extension, you will need to write a handler for it. Moreover they are the earliest point where you can access requests. Moreover they being portable makes them all the more powerful. ASP.NET uses modules for services like session manage...

Using http web request to download file
Hello, I am trying to download a file from another web space that I have setup, and I have found a piece of code that almost works, but I need the code to ask the user where they want to save the file, before beginning the download. The code that I have looks like this: Dim wr As HttpWebRequest = CType(WebRequest.Create("http://nulu.webstorm.co.za/NULU_CATALOGUE.pdf"), HttpWebRequest) Dim ws As HttpWebResponse = CType(wr.GetResponse, HttpWebResponse) Dim str As Stream = ws.GetResponseStream Dim inBuf( - 1) As Byte Dim bytesToRead As Integer...

HTTP Module to log Web Dav requests
I am trying to implement a real time auditing system to log file requests.  I need to log user requests for files which are currently held on an IIS web server.  The server has directory browsing enabled to allow our Google box to crawl the files.  I have enabled Webdav on the server which allows access to the files through explorer over Webdav.  In virtual directory root (also the root of the webdav) I have placed a web.config file which attaches an http module, within the module I am currently just writing details of the request to a log file.  When requesting a te...

Web site sample using DW.NET
Hi: I would like to see a web site created with DW.NET... Does someone have a link to provide me? Thanks; Michele You can take a look at one at http://www.catsoft.ch/prognos/default.aspx. The application is covered in PBDJ: http://pbdj.sys-con.com/node/383405. Regards Arthur "Michele" <michrayue@hotmail.com> wrote in message news:491d104c$1@forums-1-dub... > Hi: > I would like to see a web site created with DW.NET... > Does someone have a link to provide me? > > Thanks; > Michele > ...

Web resources about - HTTP Web Request to site using Session ID - asp.net.handlers-modules

Wikipedia:Admin coaching/Requests for Coaching - Wikipedia, the free encyclopedia
Are added to the current request list in date order, newest at the end . Coaches will contact people at or near the top of the list, with preference ...

Boo and Pistol: Johnny Depp's wife Amber Heard requests early trial over dogs, Government to call 12 ...
Johnny Depp's wife Amber Heard pushes for a trial early next year on biosecurity charges involving her pet Yorkshire terriers.

Apple Maps now used 3x as often as Google Maps on iOS, serving 5B requests per week
It’s no secret that when Apple Maps launched back in 2012 it had more than its fair share of issues. The issues included things like incorrect ...

Garry McCarthy fired; Chicago police superintendent resigns at Mayor Emanuel's request
Garry McCarthy resigned Tuesday morning as superintendent from the Chicago Police Department at the request of Chicago Mayor Rahm Emanuel.

Jason Pierre-Paul Comments on Amputation Request, Fireworks Incident and More - Bleacher Report
New York Giants defensive end Jason Pierre-Paul , who had to have his right index finger amputated and suffered other hand injuries after a fireworks ...

Brazil's Lower House Head Cunha Accepts Impeachment Request
Brazil's Lower House Head Cunha Accepts Impeachment Request Bloomberg Mark Zuckerberg and his wife pledged to give away virtually all of their ...

Swiss arrest 2 more FIFA officials on U.S. request
Arrests come as American investigation into corruption at highest level of international soccer widens

Prince Harry goes barefoot in South Africa, refuses selfie requests: would you hit it?
Prince Harry’s South African tour continues unabated. He still hasn’t messed up in any real way, which is great. You know if he made any kind ...

Here’s Why Colombia Just Denied A US Extradition Request For First Time
Here’s Why Colombia Just Denied A US Extradition Request For First Time

Midday open thread: How we spend our time; student reporter billed $8,000 for FOIA requests
Today’s comic ​ by Matt Fiore is The blood never dries : What’s coming up on Sunday Kos … We are more afraid than ever of gun violence. The ...

Resources last updated: 12/9/2015 2:07:13 PM