Hello, i have a problem, i must to make a response.redirect, 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.ClearHeaders()
Response.ClearContent()
Dim ReportWebRequest As System.Net.HttpWebRequest =
CType(System.Net.WebRequest.Create(strURL), System.net.HttpWebRequest)
ReportWebRequest.Timeout = 10000
ReportWebRequest.MaximumAutomaticRedirections = 50
Dim cCache = New System.Net.CredentialCache
cCache.Add(New Uri(strURL), "Basic", New
System.Net.NetworkCredential("user", "pass", "domain"))
ReportWebRequest.Credentials = cCache
ReportWebRequest.PreAuthenticate = True
Dim ReportWebResponse As System.net.WebResponse
ReportWebResponse = CType(ReportWebRequest.GetResponse(),
System.net.WebResponse)
Response.RedirectLocation = strURL
Dim i As Integer
For i = 0 To ReportWebRequest.Headers.Count - 1
Response.AddHeader(ReportWebRequest.Headers.Keys(i).ToString(),
ReportWebRequest.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!!!
Bruce Barker - 18 Jul 2005 18:00 GMT
a redirect is just a header, you could just do the redirect yourself.
-- bruce (sqlwork.com)
> Hello, i have a problem, i must to make a response.redirect, with a fixed
> header (authentication header) but i dont know how to do it... i make
[quoted text clipped - 32 lines]
>
> thanks to all!!!
Rothariger - 18 Jul 2005 18:11 GMT
i didnt understand...
or how can i make the redirect myself?
> a redirect is just a header, you could just do the redirect yourself.
>
[quoted text clipped - 36 lines]
> >
> > thanks to all!!!
Rothariger - 18 Jul 2005 18:45 GMT
hey bruce, i try
Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", strURL)
before the for cicle, and after it, but it makes the same as
response.redirect... i need that the IIS get its credentials...
> i didnt understand...
>
[quoted text clipped - 40 lines]
> > >
> > > thanks to all!!!
Joerg Jooss - 18 Jul 2005 21:55 GMT
> Hello, i have a problem, i must to make a response.redirect, with a
> fixed header (authentication header) but i dont know how to do it...
> i make this, but im stuck here...
[...]
A redirect must be issued from the server-side, but your code runs on
the client-side. That won't work.
Cheers,

Signature
http://www.joergjooss.de
mailto:news-reply@joergjooss.de