473,395 Members | 1,863 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,395 software developers and data experts.

https authentification

Hi
I'm trying to access a web server that requires authentification for a https
page. I can access http pages on that server but get "(401) Authentification
Error" for the https page. I have a login for that page but don't know where
my code is wrong. Any hints will be appreciated.

TIA Greg

Code:

Dim sClUri As String = ClientPage.Text ' https Address
System.Net.ServicePointManager.CertificatePolicy = New MyPolicy
'Certificate
Dim ClientUri As System.Uri = New System.Uri(sClUri) 'Address into
Uri
Dim ClientRequest As HttpWebRequest = WebRequest.Create(ClientUri)
'gerenate request
Dim ClientCred As NetworkCredential = New
NetworkCredential(username.Text, userPassword.Text, userDomain.Text) 'adding
login data to request
Dim ClientCredCache As CredentialCache = New CredentialCache
ClientCredCache.Add(ClientUri, "Basic", ClientCred)
ClientRequest.Credentials = ClientCredCache
'ClientRequest.Credentials = CredentialCache.DefaultCredentials
ClientRequest.KeepAlive = False
ClientRequest.Timeout = 300000
ClientRequest.Method = "GET"
'sending request and getting response
Dim ClientResponse As HttpWebResponse
Try
ClientResponse = ClientRequest.GetResponse()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error accessing
Client Inventory data")
'Exit Sub
End Try

Nov 20 '05 #1
2 1435
Greg,
make sure first that you are using internet explorer version 5.5 or higher.
That very often is a problem for our customers at work, when they simply
can't get in to https.
I recommend upgrading to version 5.5 or later. If you do not meet the above
minimum requirements, you will not be able to sign into 128bit encryption
sites.
k.

"Greg Hill" <so*****@microsoft.com> wrote in message
news:40********@usenet01.boi.hp.com...
Hi
I'm trying to access a web server that requires authentification for a https page. I can access http pages on that server but get "(401) Authentification Error" for the https page. I have a login for that page but don't know where my code is wrong. Any hints will be appreciated.

TIA Greg

Code:

Dim sClUri As String = ClientPage.Text ' https Address
System.Net.ServicePointManager.CertificatePolicy = New MyPolicy
'Certificate
Dim ClientUri As System.Uri = New System.Uri(sClUri) 'Address into
Uri
Dim ClientRequest As HttpWebRequest = WebRequest.Create(ClientUri)
'gerenate request
Dim ClientCred As NetworkCredential = New
NetworkCredential(username.Text, userPassword.Text, userDomain.Text) 'adding login data to request
Dim ClientCredCache As CredentialCache = New CredentialCache
ClientCredCache.Add(ClientUri, "Basic", ClientCred)
ClientRequest.Credentials = ClientCredCache
'ClientRequest.Credentials = CredentialCache.DefaultCredentials
ClientRequest.KeepAlive = False
ClientRequest.Timeout = 300000
ClientRequest.Method = "GET"
'sending request and getting response
Dim ClientResponse As HttpWebResponse
Try
ClientResponse = ClientRequest.GetResponse()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error accessing
Client Inventory data")
'Exit Sub
End Try

Nov 20 '05 #2
K,

I have no problem accessing the page in my browser. So it seems to me that I
don't send the server suthentication in the right way.

Greg
Nov 20 '05 #3

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

Similar topics

0
by: maxx | last post by:
Hi, I want use the header authentification (HTTP/PHP module), and i've a big problem for to get the varaibles 'PHP_AUTH-*". This is my source code :...
2
by: Junky | last post by:
Hi folks, well, I've read some articles on authentification, but somehow I can't get along with what I need. I need to get the login name from the OS to check if this person is even able to...
6
by: Ivan Demkovitch | last post by:
Hi! I'm reading thru everything I could find on "user Authentification" topic. There is couple of options ASP.NET suggest: Forms, Passport, etc... My application is simple portal with forums...
1
by: bob | last post by:
1) Authentification NT: En ASP (pas ASP.Net), comment on recupere le login/pwd windows ? On veut automatiquement authentifier un utilisateur d'après son login NT (il a pas besoin de se...
3
by: serge calderara | last post by:
Dear all, I clearly underdand the advantage of both type of authentification but is it allowed or possible to set the Authentication mode to Windows and then handle a login form for defined...
1
by: HIK | last post by:
I am porting an ASP.net 1.1 application from a win2K server to win2k3 server. The application uses forms authentification. The authentification information is in a query string. The user goes...
6
by: chris | last post by:
Client page: <input type="file".....> Server: Apache, OC4J, J2EE app XP, SP1 and updates Works perfectly under HTTP. However, under HTTPS the user needs to hit the submit button really fast to...
0
by: koraykazgan | last post by:
Hi all, I have written an ASP.Net 2.0 Web Project Application, which is consuming a Web Service of a company. The first method will be called over https, because its the authentification method....
0
by: pac1250 | last post by:
Hi, I am searching how to solve a problem and I dont find it :( I want to access a page from a script behind a proxy : (my script) <-(a proxy with authentification) <-(https serveur with...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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...

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.