Solved

response.redirect problem in IE

Posted on 2011-02-27
6
911 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

758 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

20 Experts available now in Live!

Get 1:1 Help Now