473,396 Members | 2,024 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,396 software developers and data experts.

How to logon and post this to a web form

Hi,
I am trying to use my vb.net app as a replacement to a normal browser
to interface with a website.
I am trying to achieve 2 things:
1) logon to the website
2) complete forms and submit data to the website (would I need to store
cookies once I have logged on?)

I've looked at various webrequest, POST resources without any luck. The
logic behind what I need to do seems straightforward, but I'm finding
this really hard applying it to code.

The post data details are as follows:
1) for logon:
Mime type : application/x-www-form-urlencoded
languageSelector : en%2CGBR
username : xxxxx
password : xxxxxxx
LoginBTN :Login

Request Header Name Request Header Value
POST /account/login/LoginAction.do HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer: http://www.betfair.com/Header.do
Accept-Language: en-gb
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322)
Host: www.betfair.com
Content-Length: 93
Connection: Keep-Alive
Cache-Control: no-cache
Cookie:

2) for sending form info:
Mime Type : application/x-www-form-urlencoded
BetIDs :
origin : placeBets
SelectionIDs :5861|5862|
BidTypes :B|B|
Odds :1000|1000|
NewOdds :
Stakes :2|2|
NewStakes :
Modes :
SubEventIds :
BetType :O
ei :3337261
iid :GreyHound
fa :pb
iCard :
placeBets_oddsLayProfitLiability : Liability

Request Header Name Request Header Value
POST /betting/BetsManipulationAction.do HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer:
http://www.betfair.com/betting/Marke...570&origin=NHR
Accept-Language: en-gb
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322)
Host: www.betfair.com
Content-Length: 237
Connection: Keep-Alive
Cache-Control: no-cache
Cookie:

I believe this is all the information I need to be able to do this, but
as I said, knowing where to start is a nightmare :-)

Any help, in particular code examples would be hugely appreciated.

Many thanks,

Mike

Nov 21 '05 #1
2 2047
system.web
you need that..
then you need to make a http object
i think it is
system.web.httpcontext.
you should not need to set anything as far as vars. You should make a post
just like you would in web page
I have code that ports any web page and displays it on my own. If you want
that email me
cc*********@hotmail.com
subject..Code
<my***@pearcey2001.freeserve.co.uk> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi,
I am trying to use my vb.net app as a replacement to a normal browser
to interface with a website.
I am trying to achieve 2 things:
1) logon to the website
2) complete forms and submit data to the website (would I need to store
cookies once I have logged on?)

I've looked at various webrequest, POST resources without any luck. The
logic behind what I need to do seems straightforward, but I'm finding
this really hard applying it to code.

The post data details are as follows:
1) for logon:
Mime type : application/x-www-form-urlencoded
languageSelector : en%2CGBR
username : xxxxx
password : xxxxxxx
LoginBTN :Login

Request Header Name Request Header Value
POST /account/login/LoginAction.do HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer: http://www.betfair.com/Header.do
Accept-Language: en-gb
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322)
Host: www.betfair.com
Content-Length: 93
Connection: Keep-Alive
Cache-Control: no-cache
Cookie:

2) for sending form info:
Mime Type : application/x-www-form-urlencoded
BetIDs :
origin : placeBets
SelectionIDs :5861|5862|
BidTypes :B|B|
Odds :1000|1000|
NewOdds :
Stakes :2|2|
NewStakes :
Modes :
SubEventIds :
BetType :O
ei :3337261
iid :GreyHound
fa :pb
iCard :
placeBets_oddsLayProfitLiability : Liability

Request Header Name Request Header Value
POST /betting/BetsManipulationAction.do HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer:
http://www.betfair.com/betting/Marke...570&origin=NHR
Accept-Language: en-gb
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322)
Host: www.betfair.com
Content-Length: 237
Connection: Keep-Alive
Cache-Control: no-cache
Cookie:

I believe this is all the information I need to be able to do this, but
as I said, knowing where to start is a nightmare :-)

Any help, in particular code examples would be hugely appreciated.

Many thanks,

Mike

Nov 21 '05 #2
Thanks Chris,

I would be very grateful for the code - I've sent you an email.

Does anyone else have any suggestions please?

Thanks,

Mike.

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Max | last post by:
Hi wise people, Has anyone encountered the Crystal Reports problem I describe below? If so, how did you solve it? It seems that every article posted on google regarding CR and logon problems is...
2
by: Gidrazas | last post by:
Hi all. I want to get data from Sybase ASA9 to report named Subjektai.rpt in web form. I made ODBC connection to DB and it looks OK. But whe i run project i get an error like this. Logon...
1
by: James | last post by:
Hello group: I guessing there is no way to create an OLEDB linked table in Access to SQL Server, am I correct? Basically, I've currently migrated one of my Access database tables to SQL Server,...
1
by: Lorenzo | last post by:
Hi i'm writing some code that retrieve the html source code of an asp page. The problem is that if i go directly to this page the browser redirect me to a login page where are two textbox in a...
6
by: Alixx Skevington | last post by:
OK why does the following code work in a Windows form with a crystal report viewer but not in a webform. I get the usual CrystalReports.EngineLogONException logon Failed when this is called in...
10
by: et | last post by:
I have an asp.net program that uses a connection string, using integrated security to connect to a sql database. It runs fine on one server, but the other server gives me the error that "Login...
0
by: Rey | last post by:
Howdy all. Using VS.Net 2003 on an XP Pro SP2 box, I'm geting an err: CS1026: ) expected Project is just a simple report w/data from an access mdb to see how it works on a web form using C#....
10
by: Steven Spits | last post by:
Hi, Our company has a database of users that we use to authenticate users on various websites. However, some of our customers want to develop a website on their own and use the same database...
1
by: eddy k | last post by:
I am creating a windows application. Before entering the main form I want to have a logon box. I create this box from the constructor of the main form, but when the logon box opens it is not in...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.