473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to post a SSL web-form from code without losing session?

1
Hello,

I've been trying for some time now, to post some information to a SSL web page, when the first step is getting the page, and the second step is filling the form and posting to the same page.

I've tried to do this using HttpWebRequest and HttpWebResponse,
Passing the CookieContainer from one to another in order to maintain session consistency.

Unfortunately, the page re-renderes at the second step, as if i just loaded it for the first time (the response does not redirect me to the result page, but to the form page itself. actually, i get the same response for both my requests.)

This is probably because the second request is not included in the same session as the initial request.

When i used a sniffer to check the difference between the code performance and a regular browser performance, i noticed some cookies (with the word 'session' in its names) were missing when i post from code. my only guess is that the web page is using Javascript to add the session cookie.

How can i simulate a web browser good enough, so this page would recognize me the second time i request it?

Is there any workaround to use the Windows.Forms.WebBrowser ActiveX control? (I am writing an asp.net service)

Note that the POST string (key=value&key=value...) is computed perfectly by my code.

Any answers would be very appreciated.
Thanks ahead,
YAT.
Jul 16 '09 #1
0 1341

Sign in to post your reply or Sign up for a free account.

Similar topics

49
by: Lauren Wilson | last post by:
Hi folks, Just wondered if, for the sake of clarity, it is permissible to post small image files of an error box along with a text message about a problem with Access?
2
by: Salim Afþar | last post by:
Hi, Can I post a XML file or data to a site with .NET? Thanks in advance, Salim
2
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some...
3
by: Jon Maz | last post by:
Hi All, I'm at the "Hello World" stage of learning about web services (just to warn you), and have what is I think a simple question. I have created a basic HelloWorld.asmx, which has the...
0
by: CFloyd | last post by:
I have a web service client that sends an XML string to the web service for processing. I alos have to add some headers to the post. I first establish the baseuri as === baseuri = new...
9
by: c676228 | last post by:
Hi, I am new to this discussion forum. I started to post questions on this forum since this Jan. and got many good responses and I am very appreciated to those who are willing to help with their...
1
by: arfeengodil | last post by:
Hi, I need to have a web application such that other applications should be able to do send data to it using HTTP Post. So I created a ASP.NET web service and defined a web method for other...
0
by: phaniva | last post by:
Hi, I have a ASP .Net 2.0 web service on Win 2k SP4. One of the web methods expects a string as input like public string mymethod(string inp); I am trying to invoke this web method through...
3
by: Jason Zhou | last post by:
I understand how to consume a web service by registering it as a web reference in my project, but how to use HTTP Post to call a web service? For example I have a web service called TestService,...
2
by: =?Utf-8?B?cGhlbmdsYWk=?= | last post by:
I am not sure really how to explain this but here goes. I am creating some new web services and I want to be able to post data like the following: <Data> <some value>1</some value> <more...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.