Rothariger
Regular
- Joined
- Apr 7, 2004
- Messages
- 66
Hello, i have two webapplications (webapp1 and webapp2), webapp1 its with integrated security, and webapp2 its with basic auth, i must from webapp1 login in webapp2 but i cant... :S
i have this code...
obviusly the response.redirect erease all the headers i add, then i dont know how to get redirected, from this page... :S
some one can help me???
thanks!
i have this code...
Code:
Dim strURL As String = "http://localhost/webapp2/webform1.aspx"
Response.ClearHeaders()
Response.ClearContent()
Dim Wapp2WebRequest As System.Net.HttpWebRequest = CType(System.Net.WebRequest.Create(strURL), System.net.HttpWebRequest)
Wapp2WebRequest.Timeout = 10000
Wapp2WebRequest.MaximumAutomaticRedirections = 50
Dim cCache = New System.Net.CredentialCache
cCache.Add(New Uri(strURL), "Basic", New System.Net.NetworkCredential("User", "Pass", "domain"))
Wapp2WebRequest.Credentials = cCache
Wapp2WebRequest.PreAuthenticate = True
Dim Wapp2WebResponse As System.net.WebResponse
Wapp2WebResponse = CType(Wapp2WebRequest.GetResponse(), System.net.WebResponse)
Dim i As Integer
Response.AddHeader("Location", strURL)
For i = 0 To Wapp2WebRequest.Headers.Count - 1
Response.AddHeader(Wapp2WebRequest.Headers.Keys(i).ToString, Wapp2WebRequest.Headers.Item(i).ToString())
Next
Response.Redirect(strURL)
obviusly the response.redirect erease all the headers i add, then i dont know how to get redirected, from this page... :S
some one can help me???
thanks!