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

Please help - Passing credentials to windows integrated authentication

I try to access an asp page in a machine that has windows integrated
authentication turned on.

I use System.Net.Networkcredentials as well as System.Net.Webrequest and
Webresponse.

I receive a response but when I try to use Response.Redirect(), a popup
windows appears asking me for user, password, domain.

Is there a way to pass the credentials to the Reponse.Redirect function so I
do not get prompted for credentials again?

This is the code i use:
Dim objCredentials As New System.Net.NetworkCredential
(strUsername, strPassword, strDomain)
Dim objCache As New System.Net.CredentialCache
objCache.Add(New Uri(strURL), "Negotiate", objCredentials)
Dim objWebRequest As System.Net.WebRequest
Dim objWebResponse As System.Net.WebResponse
try
objWebRequest = System.Net.WebRequest.Create(strURL)
objWebRequest.Credentials = objCache
objWebResponse = objWebRequest.GetResponse()

'I get prompted here
Response.Redirect(strURL, False)
Response.Close()
catch ex as exception
end try

Thank you very much
Nov 18 '05 #1
1 5231
No there is not. When you use the WebRequest object on the server, the
server is making the request, passing the network credentials. When you use
Response.Redirect, you are instructing the remote client, to make another
request to the server address you passed it, strURL.

The remote user then makes the request to strURL; the browser will only send
the credentials on the machine the remote user is using. I know of no
workaround.

HTH,

bill

"jadher" <ja****@excite.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
I try to access an asp page in a machine that has windows integrated
authentication turned on.

I use System.Net.Networkcredentials as well as System.Net.Webrequest and
Webresponse.

I receive a response but when I try to use Response.Redirect(), a popup
windows appears asking me for user, password, domain.

Is there a way to pass the credentials to the Reponse.Redirect function so I do not get prompted for credentials again?

This is the code i use:
Dim objCredentials As New System.Net.NetworkCredential
(strUsername, strPassword, strDomain)
Dim objCache As New System.Net.CredentialCache
objCache.Add(New Uri(strURL), "Negotiate", objCredentials)
Dim objWebRequest As System.Net.WebRequest
Dim objWebResponse As System.Net.WebResponse
try
objWebRequest = System.Net.WebRequest.Create(strURL)
objWebRequest.Credentials = objCache
objWebResponse = objWebRequest.GetResponse()

'I get prompted here
Response.Redirect(strURL, False)
Response.Close()
catch ex as exception
end try

Thank you very much

Nov 18 '05 #2

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

Similar topics

3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
7
by: Wade Wegner | last post by:
Hello, I have been desperately trying to programmatically authenticate a windows user, create their credentials, and then redirect them to a different server while passing the credentials at the...
2
by: Matt F | last post by:
Hi all I was hoping some one could clear up an ASP.Net security question I have. I am writing an ASP.NET application that connects to SQL Server. The security setup (connection string and...
3
by: Patrick.O.Ige | last post by:
Hi folks, How can i pass credentials to windows integrated authentication. I want to use my credentials from windows authentication and pass it on to different asp.net and asp pages without having...
5
by: cdlipfert | last post by:
Our intranet is running under windows integrated security. We have domain users that want to access our intranet site via ssl vpn. SSL VPN can not authenticate against services that run under...
3
by: GRB | last post by:
My webiste has integrated windows authentication. I need to pass a clients credentials (username, password) to my site without the login pop up. I send the client to an anonymous page, get an...
2
by: hulinning | last post by:
Hi, I create my Webservice in 2003 VS and test in Windows 2000 and Windows XP Pro without any problem. When I deploy it over Windows 2003 server, It fails to connect to the WS. I got Anonymous...
2
by: mbrand | last post by:
When trying to connect to my web service from a client application, the System.Net.CredentialCache.DefaultCredentials doesn't authenticate properly. I can see in the event viewer on the server...
0
by: Jesper Lund Stocholm | last post by:
I have created a WCF-service running on IIS. The virtual directory has anonymous access disabled and requires integrated windows authentication. The proxy to the service is auto-generated using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.