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!!! 4 6890
a redirect is just a header, you could just do the redirect yourself.
-- bruce (sqlwork.com)
"Rothariger " <Ro********@msn .com> wrote in message
news:FE******** *************** ***********@mic rosoft.com... 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!!!
i didnt understand...
or how can i make the redirect myself?
"Bruce Barker" wrote: a redirect is just a header, you could just do the redirect yourself.
-- bruce (sqlwork.com)
"Rothariger " <Ro********@msn .com> wrote in message news:FE******** *************** ***********@mic rosoft.com... 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!!!
hey bruce, i try
Response.Status = "301 Moved Permanently"
Response.AddHea der("Location", strURL)
before the for cicle, and after it, but it makes the same as
response.redire ct... i need that the IIS get its credentials...
"Rothariger " wrote: i didnt understand...
or how can i make the redirect myself?
"Bruce Barker" wrote:
a redirect is just a header, you could just do the redirect yourself.
-- bruce (sqlwork.com)
"Rothariger " <Ro********@msn .com> wrote in message news:FE******** *************** ***********@mic rosoft.com... 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!!!
Rothariger wrote: 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...
[...]
A redirect must be issued from the server-side, but your code runs on
the client-side. That won't work.
Cheers,
-- http://www.joergjooss.de
mailto:ne****** **@joergjooss.d e This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Robert Mark Bram |
last post by:
Hi All!
Does this mean the page will never cache:
Response.ExpiresAbsolute = Now() - 1;
Assuming this is in a login page, what effect does this have?
Rob
:)
|
by: Craig Haywood |
last post by:
Hi there,
Can anyone please give me an actual example in code on how to add a header
for the "HTTP/1.1 202 (Accepted)" response code
I have searched the web high and low and all I can find is example in the
format of:
response.addheader (custom header, value)
|
by: Joseph |
last post by:
Hello. I have this problem. See I have a transformed XML
file and I checked its contents prior to outputting it to
excel file via responseset. here is the gist of the code:
XmlReader reader = myEsiCommand.ExecuteXmlReader();
reader.MoveToContent();
string myCSV = reader.ReadInnerXml();
//Load the xml fragment into the document
XmlDocument xmlDataDoc = new XmlDocument();
|
by: S.Kartikeyan |
last post by:
I read previous posts in the group regarding
Response.AddHeader("content-disposition","filename:somefilename");
My aim is to send a file from aspx page with some file name.
when the page is opened in Internet Explorer it should display
the OpenFileDialog asking me to whether to open|save the file.
When i do it and access the page from internet explorer it shows the
DialogBox asking me whether to open or save the file .When i say open
|
by: S.Kartikeyan |
last post by:
I have a GetDotUlsStudentFile.aspx page which is accessed by another
aspx page like this.
Response.Redirect("GetDotUlsStudentFile.aspx?v=mms://myserver.mydomain/courses/xyz.wmv");
In GetDotUlsStudentFile.aspx i do a
Response.AddHeader(Content-Disposition to server a .ulsstudent
fileopendialog box prompt when accessed.
With some versions of internet Explorer i am getting xyz.ulsstudent
file as expected.
But with latest version of...
| |
by: Frank Bishop |
last post by:
I am having problems downloading an Excel file after I export it with
another procedure. When I look at the file after export, it looks fine,
but when I use the sub below, it rearranges all the data in the excel
file to an unreadable glob. Help appreciated.
Thanks,
Frank
<code>
Sub DisplayDownloadDialog()
Dim ExportPath As String
|
by: Incorrect filenames in download link. |
last post by:
Hi experts,
I am giving filename as "clearbenefits.infosys.txt" to
Response.AddHeader as filename parameter. After clicking the download link
filename on dialogbox is showing as "clearbenefits.infosys.txt". How can i
avoid this. Can any one help me.
I am using IE6 version, Is this is a explorer problem or coding
problem.
Code:
|
by: Trapulo |
last post by:
I've this statement in my output's creation:
Response.Clear()
Response.ContentType = "application/vnd.google-earth.kml+xml kml"
Response.AddHeader("Content-Disposition", "inline; filename=Log_" &
activityLogID & ".kml")
The strage is that on my development server all works (IE try to open the
|
by: Andyza |
last post by:
With reference to the ASPFAQ 2161 article -
http://classicasp.aspfaq.com/general/how-do-i-prompt-a-save-as-dialog-for-an-accepted-mime-type.html
Does the 'Content-Disposition' code work if the user is using
JAVASCRIPT as the SERVER SIDE scripting language, i.e.:
<%@LANGUAGE=JAVASCRIPT%>
If I add this header to a page that uses Javascript as the server-side
scripting language:
|
by: Tony |
last post by:
I've searched the web & can't find an answer to this.
Is it possible to successfully use Response.AddHeader for a robots meta tag?
For example, I want to do
<%
IF request("PageID") = 252 THEN Response.AddHeader "robots", "noindex"
:
%>
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |