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

L

loga123

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
 
C

Cowboy \(Gregory A. Beamer\)

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!
*********************************************
 
L

loga123

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!













- 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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top