473,405 Members | 2,282 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.

root of application A in application B dynamically in .net 2.0

Hi All,

I have 2 web applications running on the same IIS server with
different roots.
Suppose, application A can be run using --http://localhost/A
application B can be run using --http://localhost/B
I have a file test.asp whose path is http://localhost/A/subfolderA/Test.asp

I woild like to access test.asp in one of my TestB.vb pages in the
application B.
I tried using

Dim strURL as string = page.resolveURL("~/subfolderA/Test.asp)

I get error "page can not be found".

I understand that when I use "~" in resolveURL it goes to the CURRENT
application root which is "http://localhost/B" and then trying to
resolving it as http://localhost/B/SubfolderA/Test.asp. As there is
no such page exists, it gives me the error.

How do I get the root of application A in my application B? I would
like to get it dynamically using code.

Any help is greatly appreciated. Thanks

Mar 15 '07 #1
2 1147
If you need to dynamically get paths to send a person from app to app, you
can set up a service in each app that can be queried from the other to get
paths. Then you can redirect, dynamically. Cache the results, if this is a
heavily used app, so you are not constantly tagging the application.

If you really need path information, and the service will not work, you can
dig deper and query IIS. This is overkill for many applictions, so choose
wisely.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"loga123" <vd**********@covansys.comwrote in message
news:11**********************@y66g2000hsf.googlegr oups.com...
Hi All,

I have 2 web applications running on the same IIS server with
different roots.
Suppose, application A can be run using --http://localhost/A
application B can be run using --http://localhost/B
I have a file test.asp whose path is
http://localhost/A/subfolderA/Test.asp

I woild like to access test.asp in one of my TestB.vb pages in the
application B.
I tried using

Dim strURL as string = page.resolveURL("~/subfolderA/Test.asp)

I get error "page can not be found".

I understand that when I use "~" in resolveURL it goes to the CURRENT
application root which is "http://localhost/B" and then trying to
resolving it as http://localhost/B/SubfolderA/Test.asp. As there is
no such page exists, it gives me the error.

How do I get the root of application A in my application B? I would
like to get it dynamically using code.

Any help is greatly appreciated. Thanks
Mar 15 '07 #2
On Mar 15, 7:41 am, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamMwrote:
If you need to dynamically get paths to send a person from app to app, you
can set up a service in each app that can be queried from the other to get
paths. Then you can redirect, dynamically. Cache the results, if this is a
heavily used app, so you are not constantly tagging the application.

If you really need path information, and the service will not work, you can
dig deper and query IIS. This is overkill for many applictions, so choose
wisely.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************"loga 123" <vdevarako...@covansys.comwrote in message

news:11**********************@y66g2000hsf.googlegr oups.com...
Hi All,
I have 2 web applications running on the same IIS server with
different roots.
Suppose, application A can be run using -->http://localhost/A
application B can be run using -->http://localhost/B
I have a file test.asp whose path is
http://localhost/A/subfolderA/Test.asp
I woild like to access test.asp in one of my TestB.vb pages in the
application B.
I tried using
Dim strURL as string = page.resolveURL("~/subfolderA/Test.asp)
I get error "page can not be found".
I understand that when I use "~" in resolveURL it goes to the CURRENT
application root which is "http://localhost/B" and then trying to
resolving it ashttp://localhost/B/SubfolderA/Test.asp. As there is
no such page exists, it gives me the error.
How do I get the root of application A in my application B? I would
like to get it dynamically using code.
Any help is greatly appreciated. Thanks- Hide quoted text -

- Show quoted text -
Thank you for you reply, Gregary. Is there any other way that you
can think of? I am not allowed to make any changes in these
applicatons except for getting the path dynamically. Adding service
or adding another page may not be helpful to me.

btw, how do we query IIS?

Mar 15 '07 #3

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

Similar topics

3
by: Ryan Taylor | last post by:
Hello. I am writing an ASP.NET C# application. I have made a user control so that I can reuse some code. However, I need to be able to determine what the virtual root of the website is, so that...
4
by: Jerry | last post by:
I'm having just a bit of trouble wrapping my brain around the task of working with folders that are above the site's root folder. I let users upload photos (.jpg/.gif files) which can...
19
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However...
6
by: John Kotuby | last post by:
Hi all.. In a VS2005 ASP.NET 2.0 website application I am using a regular HTML anchor (actually a number of them) in a page that produces Excel output because a server control is really not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.