?
Solved

response.redirect problem in IE

Posted on 2011-02-27
6
Medium Priority
?
922 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 750 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
AWS Certified Solutions Architect - Associate

This course has been developed to provide you with the requisite knowledge to not only pass the AWS CSA certification exam but also gain the hands-on experience required to become a qualified AWS Solutions architect working in a real-world environment.

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
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 the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Suggested Courses

752 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