Wrox Programmer Forums
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2009, 02:46 PM
Registered User
 
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Redirect with authorization

I am trying to redirect users our internal web site to an external web site after they select the information they want. The external web site requires basic authorization that is transparent to the user. I am trying the following code but the authorization header is not being received by the external site. What is the work around for this?
byte[] authBytes = System.Text.Encoding.ASCII.GetBytes("username:password");
String authString = Convert.ToBase64String(authBytes);
Response.AddHeader(
"Authorization", "Basic " + authString);
Response.Status =
"301 Moved Permanently";
Response.AddHeader(
"Location", "http://websitename.net/project.html");





Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms authorization and dynamic redirect LarryB ASP.NET 1.0 and 1.1 Basics 3 September 21st, 2007 02:41 PM
Regarding authorization harshaghanta ASP.NET 2.0 Professional 1 June 5th, 2006 09:18 PM
SMTP Authorization zarol PHP How-To 0 April 5th, 2006 02:56 AM
Authorization @shish ASP.NET 1.0 and 1.1 Basics 0 March 7th, 2006 06:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.