473,796 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Developing multiple applications

I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but
to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the
reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way
to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be
able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian
Nov 19 '05 #1
10 1354
Adrian,

Try this:

<img src="~/images/image1.gif" runat="server">

--
Tu-Thach
"Adrian" wrote:
I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but
to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the
reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way
to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be
able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian

Nov 19 '05 #2
Either develop on a test server so that you can have multiple sites defined
in IIS and don't have to worry about this, or when you're working on this
site, set that physical directory to be the root of your site in IIS and
switch to the other one when you're working on that.

Ray at work

"Adrian" <Ad****@discuss ions.microsoft. com> wrote in message
news:A6******** *************** ***********@mic rosoft.com...
I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian

Nov 19 '05 #3
try this out "../images/image1.gif"

Create folder structure like this and use above path.

C:\inetpub\wwwr oot\
Testapp1 folder
images
css
js

Testapp2 folder
images
css
js
Let me know if it doesn't works out.

"Adrian" wrote:
I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but
to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the
reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way
to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be
able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian

Nov 19 '05 #4
try this out "../images/image1.gif"

Create folder structure like this and use above path.

C:\inetpub\wwwr oot\
Testapp1 folder
images
css
js

Testapp2 folder
images
css
js
Let me know if it doesn't works out.

"Adrian" wrote:
I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but
to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the
reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way
to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be
able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian

Nov 19 '05 #5
You've been given a couple of suggestions.

The real answer, however, is that you shouldn't
create an application in the root directory.

*All* applications should be located in subdirectories of the
root directory, which should *never* be an application itself.

That way, using
<img src="/images/image1.gif">
would work in *all* applications, because there
wouldn't be a reference below any application's directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"Adrian" <Ad****@discuss ions.microsoft. com> wrote in message
news:A6******** *************** ***********@mic rosoft.com...
I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but
to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the
reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way
to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be
able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian

Nov 19 '05 #6
You've been given a couple of suggestions.

The real answer, however, is that you shouldn't
create an application in the root directory.

*All* applications should be located in subdirectories of the
root directory, which should *never* be an application itself.

That way, using
<img src="/images/image1.gif">
would work in *all* applications, because there
wouldn't be a reference below any application's directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"Adrian" <Ad****@discuss ions.microsoft. com> wrote in message
news:A6******** *************** ***********@mic rosoft.com...
I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but
to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the
reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way
to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be
able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian

Nov 19 '05 #7
Hmm... Thanks, this seems to make a lot of sense... Ok, I will do a suicidal
attempt and move the app 1 in its own dir and cancel the application at the
root level. If I never reply it means it didn't work and I jumped out the
window :-) I'm kidding, I will backup first...

Thanks again!!
Adrian

"Juan T. Llibre" wrote:
You've been given a couple of suggestions.

The real answer, however, is that you shouldn't
create an application in the root directory.

*All* applications should be located in subdirectories of the
root directory, which should *never* be an application itself.

That way, using
<img src="/images/image1.gif">
would work in *all* applications, because there
wouldn't be a reference below any application's directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"Adrian" <Ad****@discuss ions.microsoft. com> wrote in message
news:A6******** *************** ***********@mic rosoft.com...
I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but
to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the
reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way
to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be
able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian


Nov 19 '05 #8
Hmm... Thanks, this seems to make a lot of sense... Ok, I will do a suicidal
attempt and move the app 1 in its own dir and cancel the application at the
root level. If I never reply it means it didn't work and I jumped out the
window :-) I'm kidding, I will backup first...

Thanks again!!
Adrian

"Juan T. Llibre" wrote:
You've been given a couple of suggestions.

The real answer, however, is that you shouldn't
create an application in the root directory.

*All* applications should be located in subdirectories of the
root directory, which should *never* be an application itself.

That way, using
<img src="/images/image1.gif">
would work in *all* applications, because there
wouldn't be a reference below any application's directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"Adrian" <Ad****@discuss ions.microsoft. com> wrote in message
news:A6******** *************** ***********@mic rosoft.com...
I have a really newbie question... I developed an asp.net application. By
default, it was created here:

c:\inetpub\wwwr oot\

Now, I wanted to create another application, completely independent. I
placed it here:

c:\inetpub\wwwr oot\testapp\

The problem is that now, in the second application any reference to "/"
doesn't refer to the root of the second application, as I would expect, but
to the root of the main application... For instance if I have this:

<img src="/images/image1.gif">

I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
Instead, it points to:
c:\inetpub\wwwr oot\images\imag e1.gif

Obviously, I could write all my links to include the testapp subdir, but the
reality is that the second application will be deployed on it's own server
and therefore over there it will point to the root. So, I cannot find a way
to develop this on the same machine... Am I missing something?
As a workaround I defined a key in the web.config and I put in there a
"suffix" which I apply to all links and on the developlement machine is
"/testapp" and on the production server it is ""... But really, I should be
able to develop 2 independent applications on the same machine....

Any help would be appreciated,

Thank you,
Adrian


Nov 19 '05 #9
heh, heh...

I hope I see your reply.

;-)

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"Adrian" <Ad****@discuss ions.microsoft. com> wrote in message
news:E6******** *************** ***********@mic rosoft.com...
Hmm... Thanks, this seems to make a lot of sense... Ok, I will do a suicidal
attempt and move the app 1 in its own dir and cancel the application at the
root level. If I never reply it means it didn't work and I jumped out the
window :-) I'm kidding, I will backup first...

Thanks again!!
Adrian "Juan T. Llibre" wrote:
You've been given a couple of suggestions.

The real answer, however, is that you shouldn't
create an application in the root directory.

*All* applications should be located in subdirectories of the
root directory, which should *never* be an application itself.

That way, using
<img src="/images/image1.gif">
would work in *all* applications, because there
wouldn't be a reference below any application's directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"Adrian" <Ad****@discuss ions.microsoft. com> wrote in message
news:A6******** *************** ***********@mic rosoft.com...
>I have a really newbie question... I developed an asp.net application. By
> default, it was created here:
>
> c:\inetpub\wwwr oot\
>
> Now, I wanted to create another application, completely independent. I
> placed it here:
>
> c:\inetpub\wwwr oot\testapp\
>
> The problem is that now, in the second application any reference to "/"
> doesn't refer to the root of the second application, as I would expect, but
> to the root of the main application... For instance if I have this:
>
> <img src="/images/image1.gif">
>
> I would expect this to point to: c:\inetpub\wwwr oot\testapp\ima ges\image1.gif
> Instead, it points to:
> c:\inetpub\wwwr oot\images\imag e1.gif
>
> Obviously, I could write all my links to include the testapp subdir, but the
> reality is that the second application will be deployed on it's own server
> and therefore over there it will point to the root. So, I cannot find a way
> to develop this on the same machine... Am I missing something?
> As a workaround I defined a key in the web.config and I put in there a
> "suffix" which I apply to all links and on the developlement machine is
> "/testapp" and on the production server it is ""... But really, I should be
> able to develop 2 independent applications on the same machine....
>
> Any help would be appreciated,
>
> Thank you,
> Adrian


Nov 19 '05 #10

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

Similar topics

6
1395
by: Tina | last post by:
Hello, I'm currently preparing for the exam 70-315. I'm using the Self-paced training kit "Developing Web Applications with Microsoft Visual C#.NET", but I find it rather difficult. I have programming experience in Lotus Notes and I have developped several 'basic' websites, but .NET and C# are totally new to me. I wonder if it is realistic to take the examen without actually have practical experience with Visual C#.NET.
3
2793
by: Shikari Shambu | last post by:
Hi All, I have a situation where multiple applications are sharing some pages/ controls. So, I have a separate common project that has the common pages/ controls. My question is how do I reference these pages/ controls from my ASP.NET web projects WEbApp1 url http://localhost/app1 C:\Apps\App1
2
228
by: Adrian | last post by:
I have a really newbie question... I developed an asp.net application. By default, it was created here: c:\inetpub\wwwroot\ Now, I wanted to create another application, completely independent. I placed it here: c:\inetpub\wwwroot\testapp\
1
1145
by: Peter | last post by:
I have written several programs that need to run on different schedules. The schedules consist of multiple business rules. Until yesterday I was scheduling most of these applications through the NT scheduler, but now I can no longer do that. My Administer only will allow me to have one scheduled task that launches. So my thought was that I need to create a program that will launch all my applications at different times during the day....
8
2048
by: mc | last post by:
I would like to host two websites on my brinkster developer account. I have configured the multiple applications and they both work fine, they can be access at: - myalias.brinkster.net/site1 and myalias.brinkster.net/site2
0
1201
by: Dutt | last post by:
Writing/Developing Facebook Applications in .NET using Facebook.NET SDK http://msdotnetsupport.blogspot.com/2007/11/writing-facebook-applications-in-net.html
0
9531
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
10459
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10237
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
10187
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
10018
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
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7553
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5446
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...
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.