473,405 Members | 2,171 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,405 software developers and data experts.

Change Asp.Net app path

Hello:
Is it possible to dinamically change asp.net application path? I have
two versions of my application, and based on the request i want it to
point to one app or another. I'm thinkin in implement IHttpModule
interface, but all the path related propertys of HttpRequest are
readonly.
Thank you all,

Oscar

Mar 28 '07 #1
4 1410
Why not just re-engineer a single app to make the required determination and
process the request accordingly. Simplify!
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Cubaman" wrote:
Hello:
Is it possible to dinamically change asp.net application path? I have
two versions of my application, and based on the request i want it to
point to one app or another. I'm thinkin in implement IHttpModule
interface, but all the path related propertys of HttpRequest are
readonly.
Thank you all,

Oscar

Mar 28 '07 #2
I would even never have thought to try such a thing ;-). Keep in mind that
ASP.NET does a whole lot of things (session, viewstate, watching files,
loading assemblies, compiling dynamic code, using a application pool etc...)
that would likely make the concept of changing the "current application"
from within "your application" a non sense.

You could still perhaps use a browser redirection or make available the
required functionnaly directly in your second application for example but
IMO your best bet for now is to elaborate on the problem you are trying to
solve so that someone could perhaps suggest a possible solution...

--
Patrice

"Cubaman" <os******************@googlemail.coma écrit dans le message de
news: 11**********************@o5g2000hsb.googlegroups.c om...
Hello:
Is it possible to dinamically change asp.net application path? I have
two versions of my application, and based on the request i want it to
point to one app or another. I'm thinkin in implement IHttpModule
interface, but all the path related propertys of HttpRequest are
readonly.
Thank you all,

Oscar

Mar 28 '07 #3

Nope not possible with IIS 6 and ASP.NET 2.0. Once ASP.NET has set up the
AppDomain the virtual and physical paths are fixed and cannot be changed.

Short of redirecting there's nothing you're going to be able to do to route
requests to other applications.

In IIS 7 (Vista and Longhorn Server later) you will be able to hook modules
at a lower level - basically you can look at every request in IIS and with
that you can potentially route requests to other applications if you are
checking at the root level application.
+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com/weblog

"Cubaman" <os******************@googlemail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
Hello:
Is it possible to dinamically change asp.net application path? I have
two versions of my application, and based on the request i want it to
point to one app or another. I'm thinkin in implement IHttpModule
interface, but all the path related propertys of HttpRequest are
readonly.
Thank you all,

Oscar
Mar 29 '07 #4
On Mar 28, 6:05 pm, "Patrice" <http://www.chez.com/scribe/wrote:
I would even never have thought to try such a thing ;-). Keep in mind that
ASP.NET does a whole lot of things (session, viewstate, watching files,
loading assemblies, compiling dynamic code, using a application pool etc....)
that would likely make the concept of changing the "current application"
from within "your application" a non sense.

You could still perhaps use a browser redirection or make available the
required functionnaly directly in your second application for example but
IMO your best bet for now is to elaborate on the problem you are trying to
solve so that someone could perhaps suggest a possible solution...

--
Patrice

"Cubaman" <oscar.acostamonte...@googlemail.coma écrit dans le messagedenews: 1175091722.793063.166__BEGIN_MASK_n#9g02mG7!__..._ _**********************@o5g2000hsb.googlegroups.co m...
Hello:
Is it possible to dinamically change asp.net application path? I have
two versions of my application, and based on the request i want it to
point to one app or another. I'm thinkin in implement IHttpModule
interface, but all the path related propertys of HttpRequest are
readonly.
Thank you all,
Oscar
Hello Patrice, thaks for your answer. I'm developing a site with two
versions, one for normal browser and other for mobiles browsers. I'd
like to have just one url, so it would be easy to remember for users,
and based on browser type, redirect users to the rigth site. If it
can't be achieved with IHttpModule, which would be the best approach?
Thanks all for you answers and support!
Oscar

Apr 3 '07 #5

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

Similar topics

3
by: Peter Vestergaard | last post by:
Hi Probably a simple question but I have not been able to find out how: I want my python script to generate a path based on some simple lookups and then change my path so that when the script...
5
by: sling blade | last post by:
I have developled my first major app and i am trying to deploy it in to a host server for publication. However the app tries to use the physical path used during development. Is the path...
2
by: Joel D Kraft | last post by:
I'm using controls in my ASP.NET application from a couple of vendors. Between the vendors and thier versioning, I've set up subfolders under my bin directory: bin bin\Infragistics\v5.2...
0
by: svilst | last post by:
How can I change the path of the cookie 'ASP.NET_SessionId'? The path is "/" and I'd like to set the path to particular virtual directory. The following approach does not work: protected void...
1
by: jpr | last post by:
Hello, I have almost ultimate my database which works with forms that export their data to word documents. The code behind the forms indicates that path to which it will find the word...
2
by: MacKris | last post by:
Hi, I'm a chemist trying to use the python script GaussSum.py with gnuplot for creating dataplots, and need some help. Whenever I try to produce a plot from the GaussSum GUI I get the error sh:...
3
by: Chris Mellon | last post by:
This appears to be a change in behavior from Python 2.4 to Python 2.5, which I can't find documented anywhere. It may be windows only, or related to Windows behavior. In 2.4, the current...
5
by: yhlove | last post by:
Hi I'm trying to change element in xml file as described below: the xml file: ---------------- <MyProg> <Path>test1</Path> </MyProg>
5
by: =?Utf-8?B?UGVy?= | last post by:
I want to change the current path in the OpenFileDialog in runtime. When the user presses OK-button I'm checking the selected path if it's valid for my application. If it's not valid I want to set...
2
by: bart.hernalsteen | last post by:
Hi, I want to read the envorinment setting "path" and then on certain conditions change this setting. ex path : "%SystemRoot%\system32;%SystemRoot%;%SystemRoot% \System32\Wbem;C:\Program...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.