473,789 Members | 3,013 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
languageSelecto r : 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_oddsL ayProfitLiabili ty : Liability

Request Header Name Request Header Value
POST /betting/BetsManipulatio nAction.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 2063
system.web
you need that..
then you need to make a http object
i think it is
system.web.http context.
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*********@hot mail.com
subject..Code
<my***@pearcey2 001.freeserve.c o.uk> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.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
languageSelecto r : 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_oddsL ayProfitLiabili ty : Liability

Request Header Name Request Header Value
POST /betting/BetsManipulatio nAction.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
2608
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 still unanswered. I think I'm cursed. I originally created a crystal report which connects to a sql server server db on the same dev machine and it worked just fine. I tried to move it to another computer, but now I have to connect to an Oracle...
2
2238
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 failed. Description: An unhandled exception occurred during the execution of the
1
7589
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, and they are linked via an ODBC connection. I'm am attempting to make the logon to SQL server transparent so the users are never prompted to logon. I can easily create an ADO connection object in a procedure to open a connection with the proper...
1
1985
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 html form. <form action="/admin/login.asp?aktion=login" method="POST" name="login"> <table border="2" align="center"> <tr> <td> <b>Username:</b>
6
1677
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 aspx. Any help will be very much apprecaited Alixx This is the code in the calling aspx Page
10
4519
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 failed for user "NT AUTHORITY/ANONYMOUS LOGON". Why would this be? There is no reason it should even be trying to login to using NT Authority/Anonymous login. The IIS Server is set to turn off anonymous logins, and use integrated security, and my...
0
990
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#. Crystalreports viewer works in a winform but so far - for me - not in a web form... In design, the data can be previewed but get err when attempting to
10
2089
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 authenticate users. At first I was thinking to create a WebService that accepts username & password and returns if it's valid or not. But it is *very* important that
1
3643
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 focus. How can I force a form to be in focus?
0
9665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6768
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3697
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.