473,626 Members | 3,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.Applica tionPath (ASP.NET 1.1)

I have a testing/development environment and a production environment for an ASP.NET application.

The URLs end up being similar to the following:

http://www.whatever.com/folder/appname for development (running on IIS 5.1)
and
http://app.whatever.com/ for production (running on IIS 6.0)

Both applications presently contain the exact same folder/file structure. Everything is the same. For whatever sets of reasons, the following code is returning different results. On development, the behavior is expected, and the page is displayed

Response.Redire ct(Request.Appl icationPath & "/whatever.aspx")

Deveopment - Redirects to http://www.whatever.com/whatever.aspx

Production - Redirects to http://whatever.aspx

....and we obviously have a problem. I'm probably missing something incredibly simple or my approach is flawed. Just curious what the solution is. Driving me nuts.

Thanks
Nov 1 '06 #1
1 1408
well...you are probably ending up with a //whatever.aspx but I'm surprised that you'd be getting http://whatever.aspx even if that's the case.

The quickest solution is to do:

Response.Redire ct("~/whatever.aspx") ; :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"James" <mi*******@gmai l.comwrote in message news:uZ******** ******@TK2MSFTN GP03.phx.gbl...
I have a testing/development environment and a production environment for an ASP.NET application.

The URLs end up being similar to the following:

http://www.whatever.com/folder/appname for development (running on IIS 5.1)
and
http://app.whatever.com/ for production (running on IIS 6.0)

Both applications presently contain the exact same folder/file structure. Everything is the same. For whatever sets of reasons, the following code is returning different results. On development, the behavior is expected, and the page is displayed

Response.Redire ct(Request.Appl icationPath & "/whatever.aspx")

Deveopment - Redirects to http://www.whatever.com/whatever.aspx

Production - Redirects to http://whatever.aspx

...and we obviously have a problem. I'm probably missing something incredibly simple or my approach is flawed. Just curious what the solution is. Driving me nuts.

Thanks
Nov 1 '06 #2

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

Similar topics

5
2383
by: Vadym Stetsyak | last post by:
Hi, All! For example if I have http://server/myvirtualpath/someotherpath/page.asp and virtual path on the IIS is http://server/myvirtualpath How can I retrieve above mentioned asp application path. I need the same functionality that has ASP.NET (Request.ApplicationPath)
2
3813
by: martin | last post by:
Hi, I am developing a class to help my asp.net application along. The class is part of a seperate project although this project is included in the same solution as my main web application. I wish to use the function "request.applicationpath" from inside my class. In solution explorer I have right clicked on the references node and added a reference to system.web.dll
1
3549
by: Ponnurangam | last post by:
Hi, I have completed a website using Request.ApplicatioPath in a lot of places. eg.: (<img src='<%= Request.ApplicationPath %>/Images/logo.gif' />) It works locally, but doesn't work thru internet after I deployed it. It works if I move the whole website into a sub folder from the root folder.
5
5293
by: Miljana | last post by:
Hi, I have one problem with cookies in ASP.NET application. It seems that I can not retreive cookie from Request.Cookies collection. I put cookie in Response.Cookies collection, and after page post back, when I try to retreive it from Request.Cookies collection, it appears that it does not exists. This problem does not occur on several developing machines we use for developing application, but occurs in another environment (another...
2
2565
by: ad | last post by:
I want to get the Application path, I use the code: string sDir = Request.ApplicationPath ; It run well in code behind, but if I place the code above in Global.asax like: void Application_Start(Object sender, EventArgs e) { string sDir = Request.ApplicationPath ; }
0
1523
by: Chris | last post by:
Hi, i use a masterpage in my application. When navigating to another site without closing the browser and then coming back to the application, the images and css styles are lost. So i did this for the images: <img src="<%=Request.ApplicationPath%>/images/01.gif" /> and this works.
0
1427
by: Chris | last post by:
Hi, When navigating to another site without closing the browser and then coming back to the application, the images and css styles are lost. So i did this for the images: <img src="<%=Request.ApplicationPath%>/images/01.gif" /> and this works. Now my css file (green.css) is in App_Themes/green and i refer to it from
5
1820
by: Rory Becker | last post by:
I have had code in my Application_Start which is intended to run once at the start of my application's life. It loads connection information and similar from a known location. However I recently migrated my app using ------------------------------------------------------------- %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web Site/YourApp" -------------------------------------------------------------
2
3616
by: CKKwan | last post by:
Dear All, Using VS2008 on Vista (IIS7). Request.ApplicationPath return something like "http://localhost:50440/" When deploy into Server 2003 (IIS6), found that Request.ApplicationPath is returning "c:\\Inetpub\..." May I know what has gone wrong?
0
8272
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8205
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8644
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8370
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8514
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4208
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1516
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.