473,394 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Response.Redirect and Server.Transfer

Ok I am going a bit insane here.

I have written a class which handles redirects to certain pages according to
database settings. When I use the response.redirect from within my class I
get this error message

Server Error in '/Application' Application.
----------------------------------------------------------------------------
----

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure that
it is spelled correctly.

I have checked the path and it seams fine. What gets me is that if I put
the page in the same directory structure it works fine. So my default.aspx
and login.aspx pages are in the same dir then works. But if I put my
login.aspx page within a seperate directory (eg pages/login.aspx) then I get
this error.

Anybody seen this before?

Thanks

Gav
Jul 21 '05 #1
3 1565
> Anybody seen this before?
hhhmmm sounds like a absolute vs relative page references problem. What
happens if you try putting the tilde (~) at the front of the string to
represent the webapp path? What happens if you put the absolute
http://localhost/webappname/somedir/somewebpage.aspx? If one or both of
those work then it's most definitely a problem with accessing the page via
relative references.

What did you find?
Jul 21 '05 #2
Hi Flip

I have got it to work right now. Basically I have this under the Default
Web on Server 2003 as a virtual directory. So say its like this
(http://localhost/Application/profiles/login.aspx) I was giving it
profiles/login.aspx and wasnt applying the Application part which is
declared as a virtual directory in IIS

Very weird and I have been trying to get this to work all day.

Dont understand fully why you have to add in the virtual directory name?
Any thoughts?

Gav

"Flip" <[remove_me]ph******@hotmail.com> wrote in message
news:#g**************@TK2MSFTNGP15.phx.gbl...
Anybody seen this before?

hhhmmm sounds like a absolute vs relative page references problem. What
happens if you try putting the tilde (~) at the front of the string to
represent the webapp path? What happens if you put the absolute
http://localhost/webappname/somedir/somewebpage.aspx? If one or both of
those work then it's most definitely a problem with accessing the page via
relative references.

What did you find?

Jul 21 '05 #3
> Dont understand fully why you have to add in the virtual directory name?
Any thoughts?


I think the Application part is the webapp name? I read on the weekend what
IIS sees as the webapp is not what you and I think of as the webapp, but the
"Application" piece is the webapp name as far as you and I are concerned
IMHO. :> Did you hard code it in there? What happens when you try to play
with the "~" tilde character instead? That might be a better suggestion
instead of hardcoding. The tilde is a place holder for the absolute path
which gets translated at runtime.

Here's an interesting link I used before.
http://dotnetjunkies.com/WebLog/jpal.../06/31227.aspx

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a...
6
by: \A_Michigan_User\ | last post by:
Ok, I give up... why do 1-4 work fine... but 5-6 give "can't find" errors? 1. Client-side VBscript code: call navigate("\\209.11.22.33\MyDir") 2. Client-side VBscript code: location.href...
3
by: Justin | last post by:
Hi, Im confused here over the usage of Response.Redirect and Server.Transfer. I used frameset for my work, what are the proper usages of the two methods that seems working similar.. The...
5
by: Paul de Goede | last post by:
I set the Response.Filter in my aspnet application but I have noticed that if you do a Server.Transfer that the filter doesn't get called. And in actual fact the response is mostly empty. It seems...
4
by: Harsh Thakur | last post by:
Hi, I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a...
3
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan...
10
by: Bill | last post by:
In file FIRST.ASP, I've got <% Response.Redirect "SECOND.ASP" %> The redirect is happening, and I'm seeing the content from SECOND.ASP in the browser, but the URL in the browser is still...
2
by: Nathan Sokalski | last post by:
The last two lines of code in the Click event of a Button Control on my page are: Me.WelcomeEmail() Response.Redirect("mainmenu.aspx") The last line of code in Me.WelcomeEmail() is:
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
3
by: jasonheath.net | last post by:
I apologize in advance for the length of this post. I wanted to get as much detail as possible in here. We have 1 web app that contains the functionality to do some single sign-on logic. The...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.