Solved

response.redirect problem in IE

Posted on 2011-02-27
6
913 Views
Last Modified: 2012-05-11
Hi,

I have just this line of code in an asp file:

<%
      response.redirect "https://username:password@192.168.xxx.xxx:7777/set_param?mng.reboot=1"
%>

where of course username, password and IP are properly filled.

It works fine in any browser except IE (I get this page cannot be found).

How can i get this to work in IE
0
Comment
Question by:arip75
  • 3
  • 2
6 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 34994482
I think I.E prevents you from passing a username and password in this way using a response.redirect.
A workaround is to use javascript to do it on the clientside rather than server side.
set the window.location to your url.
0
 
LVL 25

Accepted Solution

by:
clockwatcher earned 250 total points
ID: 34994486
Microsoft removed it for security reasons... see the following:

  http://support.microsoft.com/kb/834489


If you have access to the client machines, you can set a registry key to re-enable the functionality:

How to disable the new default behavior for handling user information in HTTP or HTTPS URLs
To disable the new default behavior in Windows Explorer and Internet Explorer, create iexplore.exe and explorer.exe DWORD values in one of the following registry keys and set their value data to 0.

    * For all users of the program, set the value in the following registry key:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE
    * For the current user of the program only, set the value in the following registry key:
      HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE


Barring that, you're probably going to be out of luck getting working in IE.   Sorry.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 34994513
<script language='javascript'>
var url = 'http://' + userid + ":" & userpassword + '@192.168.xxx.xxx:7777/set_param?mng.reboot=1';

window.location = url;
</script>

0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:arip75
ID: 35003615
I'm afraid javascript doesn't do the trick

I have tried

<script language='javascript'>
window.location = 'https://192.168.xxx.xxx:7777/set_param?mng.reboot=1';
</script>

and it works.

but if I try

<script language='javascript'>
window.location = 'https://username:password@192.168.xxx.xxx:7777/set_param?mng.reboot=1';
</script>

then it doesn't work.

any idea?

Thanks.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35003629
No i'm afraid that was the last idea,  it seems like the answer is you can't do that unless you're prepared to hack the registry for each client as shown by clockwatcher.
0
 

Author Closing Comment

by:arip75
ID: 35003703
There is no solution, clockwatcher gave me a workaround from the microsoft website which is the closest to what I need.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now