Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get a redirect to work.

Status
Not open for further replies.

Neeeol

Programmer
May 1, 2007
2
US
I'm having a problem with a redirect. I don't think it's a code problem, so this may be in the wrong forum.

I have a C#/ASP application that uses an ASP page to do a login. It checks the user and password against a SQL database. Upon passing the password check it does a redirect to an HTML page.

It gets through everything except the redirect when I am accessing the page from a remote computer. I can access the login page, I can browse the directories (I enabled that while trying to figure this out) I can even raise the HTML page directly (it doesn't operate because when I open it directly it doesn't have the user id. That's expected.)

The call I'm using is: HttpContext.Current.Response.Redirect("ESMSAdmin.html");

This has worked in the past. It may be a permissions thing, but I can't find it.

Can somebody give me some advice? I've been working on this for three days - I can't find anything. I'm stumped.

Thanks in advance for any help you can provide.
 
I presume you mean an ASP.NET application, or are you really using classic asp? ( the 2 are very different )

Response.redirect does work in both c# asp.net and classic asp.

if you're running classic asp then remove the "HttpContext.Current." as classic asp will not recognise this.

(on a side not, should you really be redirecting to an html page? there is no security on it, which would mean that user would be able to jump straight into that page, without going through the login.)
 
There is security, although I don't know that it would pass muster for a public site. If the user is not passed along in the session variable the page won't operate. Besides, what I didn't mention is that this is not a public website. It will be on an isolated network.

But your suggestion appears to have worked. THANK YOU! THANK YOU! THANK YOU! As you may have guessed, I am not an ASP developer. I was actually working on the ActionScript have of this Flash app that is called from the website. Apparently, the technology has changed since the original ASP was written.

I can't thank you enough. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top