Solved

response.redirect problem in IE

Posted on 2011-02-27
6
918 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 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

726 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