473,396 Members | 1,789 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.

Web Basic Authentication

Hi all! When I go to some web site, I have to provide username and
password, like my router's web site. The question is the how can I
programmatically capture the 'realm' (Like 'level_15_access'), and
provide username and password in vb.net? Thanks!

Nov 21 '05 #1
7 7584
"Stanley" <xs******@gmail.com> schrieb:
Hi all! When I go to some web site, I have to provide username and
password, like my router's web site. The question is the how can I
programmatically capture the 'realm' (Like 'level_15_access'), and
provide username and password in vb.net? Thanks!


Do you want to implement the authentication mechanism?
Do you have the site's source code?
Where do you want to capture the realm?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2
all logins receive there data either by a get or a post ( provided in the
url , provided in the header )

if you know the username and password , or other values the page is
expecting you only have to find out wich way they use ( can be seen in the
HTML , or script source that is on your browser side )
then create a url http://www.asite.com/pass.aspx?uname=john&pass=doe& or
if the site requires a post create the values in a form posting and submit
this to the website ( this can be done in HTML or directly from code )

regrds

M. Posseth
"Stanley" <xs******@gmail.com> schreef in bericht
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi all! When I go to some web site, I have to provide username and
password, like my router's web site. The question is the how can I
programmatically capture the 'realm' (Like 'level_15_access'), and
provide username and password in vb.net? Thanks!

Nov 21 '05 #3
"m.posseth" <po*****@planet.nl> schrieb:
if the site requires a post create the values in a form posting and submit
this to the website ( this can be done in HTML or directly from code )


Sample:

<URL:http://dotnet.mvps.org/dotnet/code/net/#CookieRequest>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
I know that can I go to the web site by this kind of url
http://user:pa**@10.10.10.1 because the authentication is "Basic Web
Authenticaion", but the problem is that I want to get the 'realm' or
'message' of the site before I determine which user and pass to give,
because I want to go to different kind of router (Linksys, D-Link ....)
Hope you can understand my English! Thanks!

Nov 21 '05 #5
"Stanley" <xs******@gmail.com> schrieb:
I know that can I go to the web site by this kind of url
http://user:pa**@10.10.10.1
Just FYI: This is an invalid HTTP URL.
because the authentication is "Basic Web
Authenticaion", but the problem is that I want to get the 'realm' or
'message' of the site


Are you referring to the short message typically shown in the login dialog?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #6
Thanks for reply! Yes, that's what I'm saying! The short message like
"level_15_access" for Cisco Router, "Linksys BEFSR81v3" for Linksys
Router else... Can you tell me how to capture that short message, so
that I can identify which router it is!! Thanks again!

Nov 21 '05 #7
Hi Stanley
This thread is a couple of months old, but anyway i hope to be helpful.
This is something I am currently doing too.
It's very simple. In VB6, you need to use a Microsoft Internet Transfer
Control, set some properties like the URL and then call the GetHeader
method and that's it. The rest is just string manipulation.

header = Inet1.GetHeader

The variable header shoud now have a value such as:

HTTP/1.1 401 Authorization Required
WWW-Authenticate: Basic realm="Linksys BEFW11S4 V4"
Content-type: text/html
Expires: Thu, 13 Dec 1969 10:29:00 GMT
Connection: close
Pragma: no-cache

good luck!

*** Sent via Developersdex http://www.developersdex.com ***
Dec 15 '05 #8

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

Similar topics

1
by: Phil Powell | last post by:
/*-------------------------------------------------------------------------------------------- This function will utilize the ability to use HTTP-based WWW Authentication, checking for the global...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
1
by: Oran | last post by:
I am trying to integrate an application into our extranets. The extranet technology has its own authentication system requiring a domain user but uses anonymous authentication (from the...
4
by: Joseph | last post by:
I have an intranet application that I setup using windows authentication through IIS basic authentication. Is there a way to set a timeout, so that after ten minutes the user will be prompted...
4
by: Dave | last post by:
Hi, Is there anyway to mimic forms authentication's loginUrl and RedirectFromLoginPage functionality using Windows authentication? We are developing intranet sites using basic authentication...
4
by: Barry | last post by:
The MS fix for IE broke how users access our site (if they patch their browsers), so I need a solution to get users logged onto our site transparently. Basically we used to log on to the site...
2
by: Chad Beckner | last post by:
Hi everyone, I am developing a site in which the root will be set with Anonymous & Basic permissions. Past that I will have an application (directory) in which I will be developing...
3
by: sefe dery | last post by:
hi ng, i try to create a asp.net 1.0 website on windows server 2003(Servername: ServerX) with iis 6.0. PROBLEM: The user should login with his windows credentials in basic.aspx and...
3
by: Martin | last post by:
How does one set up basic authentication on an HttpListener? I know I need to set the HttpListener.AuthenticationSchemes to AuthenticationSchemes.Basic but then I'm unsure how and against what...
0
by: =?Utf-8?B?S29uc3RhbnRpbg==?= | last post by:
I am currently working on the application that need to simulate basic authentication programmatically using user's credentials that are known. Basically, the need is for a single sign on with a...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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...
0
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...
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,...

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.