Hello, i have a problem, i must to make a response.redire ct, with a fixed
header (authentication header) but i dont know how to do it... i make this,
but im stuck here...
Dim strURL As String = "http://localhost/webapplication1/webform1.aspx"
Response.ClearH eaders()
Response.ClearC ontent()
Dim ReportWebReques t As System.Net.Http WebRequest =
CType(System.Ne t.WebRequest.Cr eate(strURL), System.net.Http WebRequest)
ReportWebReques t.Timeout = 10000
ReportWebReques t.MaximumAutoma ticRedirections = 50
Dim cCache = New System.Net.Cred entialCache
cCache.Add(New Uri(strURL), "Basic", New
System.Net.Netw orkCredential(" user", "pass", "domain"))
ReportWebReques t.Credentials = cCache
ReportWebReques t.PreAuthentica te = True
Dim ReportWebRespon se As System.net.WebR esponse
ReportWebRespon se = CType(ReportWeb Request.GetResp onse(),
System.net.WebR esponse)
Response.Redire ctLocation = strURL
Dim i As Integer
For i = 0 To ReportWebReques t.Headers.Count - 1
Response.AddHea der(ReportWebRe quest.Headers.K eys(i).ToString (),
ReportWebReques t.Headers.Item( i).ToString())
Next
add code here... ;) what could i make next? response redirect clear the
header that i make... i dont know what to do...
thanks to all!!!
header (authentication header) but i dont know how to do it... i make this,
but im stuck here...
Dim strURL As String = "http://localhost/webapplication1/webform1.aspx"
Response.ClearH eaders()
Response.ClearC ontent()
Dim ReportWebReques t As System.Net.Http WebRequest =
CType(System.Ne t.WebRequest.Cr eate(strURL), System.net.Http WebRequest)
ReportWebReques t.Timeout = 10000
ReportWebReques t.MaximumAutoma ticRedirections = 50
Dim cCache = New System.Net.Cred entialCache
cCache.Add(New Uri(strURL), "Basic", New
System.Net.Netw orkCredential(" user", "pass", "domain"))
ReportWebReques t.Credentials = cCache
ReportWebReques t.PreAuthentica te = True
Dim ReportWebRespon se As System.net.WebR esponse
ReportWebRespon se = CType(ReportWeb Request.GetResp onse(),
System.net.WebR esponse)
Response.Redire ctLocation = strURL
Dim i As Integer
For i = 0 To ReportWebReques t.Headers.Count - 1
Response.AddHea der(ReportWebRe quest.Headers.K eys(i).ToString (),
ReportWebReques t.Headers.Item( i).ToString())
Next
add code here... ;) what could i make next? response redirect clear the
header that i make... i dont know what to do...
thanks to all!!!
Comment