473,804 Members | 3,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

https authentificatio n

Hi
I'm trying to access a web server that requires authentificatio n for a https
page. I can access http pages on that server but get "(401) Authentificatio n
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.Serv icePointManager .CertificatePol icy = New MyPolicy
'Certificate
Dim ClientUri As System.Uri = New System.Uri(sClU ri) 'Address into
Uri
Dim ClientRequest As HttpWebRequest = WebRequest.Crea te(ClientUri)
'gerenate request
Dim ClientCred As NetworkCredenti al = New
NetworkCredenti al(username.Tex t, userPassword.Te xt, userDomain.Text ) 'adding
login data to request
Dim ClientCredCache As CredentialCache = New CredentialCache
ClientCredCache .Add(ClientUri, "Basic", ClientCred)
ClientRequest.C redentials = ClientCredCache
'ClientRequest. Credentials = CredentialCache .DefaultCredent ials
ClientRequest.K eepAlive = False
ClientRequest.T imeout = 300000
ClientRequest.M ethod = "GET"
'sending request and getting response
Dim ClientResponse As HttpWebResponse
Try
ClientResponse = ClientRequest.G etResponse()
Catch ex As Exception
MsgBox(ex.Messa ge, MsgBoxStyle.Exc lamation, "Error accessing
Client Inventory data")
'Exit Sub
End Try

Nov 20 '05 #1
2 1461
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*****@micros oft.com> wrote in message
news:40******** @usenet01.boi.h p.com...
Hi
I'm trying to access a web server that requires authentificatio n for a https page. I can access http pages on that server but get "(401) Authentificatio n 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.Serv icePointManager .CertificatePol icy = New MyPolicy
'Certificate
Dim ClientUri As System.Uri = New System.Uri(sClU ri) 'Address into
Uri
Dim ClientRequest As HttpWebRequest = WebRequest.Crea te(ClientUri)
'gerenate request
Dim ClientCred As NetworkCredenti al = New
NetworkCredenti al(username.Tex t, userPassword.Te xt, userDomain.Text ) 'adding login data to request
Dim ClientCredCache As CredentialCache = New CredentialCache
ClientCredCache .Add(ClientUri, "Basic", ClientCred)
ClientRequest.C redentials = ClientCredCache
'ClientRequest. Credentials = CredentialCache .DefaultCredent ials
ClientRequest.K eepAlive = False
ClientRequest.T imeout = 300000
ClientRequest.M ethod = "GET"
'sending request and getting response
Dim ClientResponse As HttpWebResponse
Try
ClientResponse = ClientRequest.G etResponse()
Catch ex As Exception
MsgBox(ex.Messa ge, MsgBoxStyle.Exc lamation, "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
1452
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 : --------------------------------------------------------------------------------- <?php function authentificate() { header('WWW-Authenticate: Basic realm="My Realm"');
2
1238
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 start the application. If so, the person should get login window for the web application that is checked against a user database. I tried to use "Windows" and "Forms" authentification, but it doesn't
6
1280
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 and Online store will be added in future. It will be hosted using hosting provider (no way to setup security, etc..)
1
1817
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 connecter sur le site, on verifie qu'il a les droits d'apres son login). 2) Manipulation HTTP
3
2423
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 users in Credential section like as follow : <authentication mode="Windows" > <forms loginUrl="Login.aspx"> <credentials passwordFormat="Clear"> <user name="Jessee" password="JuneBug"/>
1
1273
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 to A.htm A refers to B.htm for validation and if valid goes back to A. htm with the following code in the validating page: Dim strredirect As String = Request("ReturnURL") Response.Redirect(strredirect, True)
6
4275
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 avoid a "page cannot be displayed". All other interaction with the application works well.
0
1558
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. All other methods are called over http. On my local computer, where I have direct access to the internet, everything is working fine. But after I have published the application to the server, which is in DMZ, I had problems. First I noticed, that I...
0
5017
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 authentification) -----------------------------------------------------------------
0
9588
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10327
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
10085
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
9161
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
6857
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();...
1
4302
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
3
2999
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.