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

Sharing images with multiple web sites

Since we are unable to use IIS on our developer workstations due to security
policy, we would like to use the internal web server baked into VS.NET 2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them. I'm
not able to create a virtual directory in "Cassini", so that's not a viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server and
reference them via HTTP, but that won't be a nice solution from a deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so hopefully
you will have some guidance on this issue. I must be overlooking the obvious.
Jul 26 '06 #1
11 1266
Use an absolute URL, such as
http://yourdomain.com/yourimageweb/images/image.jpg

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
"Jason Camp" <Ja*******@discussions.microsoft.comwrote in message
news:DC**********************************@microsof t.com...
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.

Jul 26 '06 #2
The absolute URL would change from development to staging to production, so I
would then have to go and change all reference before deployment from one
platform to another. I don't like this idea.

"Kevin Spencer" wrote:
Use an absolute URL, such as
http://yourdomain.com/yourimageweb/images/image.jpg

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
"Jason Camp" <Ja*******@discussions.microsoft.comwrote in message
news:DC**********************************@microsof t.com...
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


Jul 26 '06 #3
My personal preference would be likely still just to automate the copy using
a tool such as "robocopy" (downloable from MS, allows to synchronize
directories) either on demand or at logon time depending on the update
frequency (are they updated so often ?) or as part of the build process.

The application could be also written to accomodate both scenarios (the
location could be configurable, the application could redirect to an
alternate location in dev mode).

You could also try a Windows admin group (you have little know options such
as hardlinks or mount points though I believe it wouldn't work on a network
share).

Good luck
--
Patrice

"Jason Camp" <Ja*******@discussions.microsoft.coma écrit dans le message
de news: DC**********************************@microsoft.com...
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.

Jul 26 '06 #4
I would think this would get very messy because we have 40 web applications
that utilize the same images. A virtual directory would be beautiful, but
unfortunately you can't do that with the web server embedded in VS.NET 2005.
Another problem would be one of source control. These web sites would be a
mixture of source controlled and unbound files. I think this too would get
very confusing.

"Patrice" wrote:
My personal preference would be likely still just to automate the copy using
a tool such as "robocopy" (downloable from MS, allows to synchronize
directories) either on demand or at logon time depending on the update
frequency (are they updated so often ?) or as part of the build process.

The application could be also written to accomodate both scenarios (the
location could be configurable, the application could redirect to an
alternate location in dev mode).

You could also try a Windows admin group (you have little know options such
as hardlinks or mount points though I believe it wouldn't work on a network
share).

Good luck
--
Patrice

"Jason Camp" <Ja*******@discussions.microsoft.coma écrit dans le message
de news: DC**********************************@microsoft.com...
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


Jul 26 '06 #5
Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the app,
the setting can be changed in only one place.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jason Camp" wrote:
Since we are unable to use IIS on our developer workstations due to security
policy, we would like to use the internal web server baked into VS.NET 2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them. I'm
not able to create a virtual directory in "Cassini", so that's not a viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server and
reference them via HTTP, but that won't be a nice solution from a deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so hopefully
you will have some guidance on this issue. I must be overlooking the obvious.
Jul 26 '06 #6
Will this solution display the images at design time?

"Peter Bromberg [C# MVP]" wrote:
Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the app,
the setting can be changed in only one place.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jason Camp" wrote:
Since we are unable to use IIS on our developer workstations due to security
policy, we would like to use the internal web server baked into VS.NET 2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them. I'm
not able to create a virtual directory in "Cassini", so that's not a viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server and
reference them via HTTP, but that won't be a nice solution from a deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so hopefully
you will have some guidance on this issue. I must be overlooking the obvious.
Jul 26 '06 #7
Yes, as long as your web.config at design time is pointing to the actual
locations of the images.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
"Jason Camp" <Ja*******@discussions.microsoft.comwrote in message
news:11**********************************@microsof t.com...
Will this solution display the images at design time?

"Peter Bromberg [C# MVP]" wrote:
>Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the app,
the setting can be changed in only one place.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jason Camp" wrote:
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put
them. I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an administrative
and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.

Jul 26 '06 #8
Would you please give me a code snippit on this? If this works at design time
I'm ready to roll.

"Kevin Spencer" wrote:
Yes, as long as your web.config at design time is pointing to the actual
locations of the images.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
"Jason Camp" <Ja*******@discussions.microsoft.comwrote in message
news:11**********************************@microsof t.com...
Will this solution display the images at design time?

"Peter Bromberg [C# MVP]" wrote:
Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the app,
the setting can be changed in only one place.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jason Camp" wrote:

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put
them. I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an administrative
and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


Jul 26 '06 #9
Hi Jason,

Here's an example from an ASP.Net web application I have worked on:

<add key="ImagePath" value="http://www.airtraveler.com/airtraveler"/>

This is combined with the image file name in the app to create the URL of
the images in the app.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
"Jason Camp" <Ja*******@discussions.microsoft.comwrote in message
news:42**********************************@microsof t.com...
Would you please give me a code snippit on this? If this works at design
time
I'm ready to roll.

"Kevin Spencer" wrote:
>Yes, as long as your web.config at design time is pointing to the actual
locations of the images.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
"Jason Camp" <Ja*******@discussions.microsoft.comwrote in message
news:11**********************************@microso ft.com...
Will this solution display the images at design time?

"Peter Bromberg [C# MVP]" wrote:

Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the
app,
the setting can be changed in only one place.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jason Camp" wrote:

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into
VS.NET
2005.
The problem that I am currently running into is that we have many
web
applications that share common images and I don't know where to put
them. I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an
administrative
and
maintenance nightmare. We could store these images on a separate
server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between
development,
staging and our production environments. If we use <%=location%in
the
tags
to find the location at runtime, then the images won't show up in
the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.



Jul 27 '06 #10
As you wish... It left you with the other option, i.e. just have the
application get the files from a configurable location...

--
Patrice

"Jason Camp" <Ja*******@discussions.microsoft.coma écrit dans le message
de news: 3A**********************************@microsoft.com...
>I would think this would get very messy because we have 40 web applications
that utilize the same images. A virtual directory would be beautiful, but
unfortunately you can't do that with the web server embedded in VS.NET
2005.
Another problem would be one of source control. These web sites would be a
mixture of source controlled and unbound files. I think this too would get
very confusing.

"Patrice" wrote:
>My personal preference would be likely still just to automate the copy
using
a tool such as "robocopy" (downloable from MS, allows to synchronize
directories) either on demand or at logon time depending on the update
frequency (are they updated so often ?) or as part of the build process.

The application could be also written to accomodate both scenarios (the
location could be configurable, the application could redirect to an
alternate location in dev mode).

You could also try a Windows admin group (you have little know options
such
as hardlinks or mount points though I believe it wouldn't work on a
network
share).

Good luck
--
Patrice

"Jason Camp" <Ja*******@discussions.microsoft.coma écrit dans le
message
de news: DC**********************************@microsoft.com...
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put
them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an administrative
and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.



Jul 27 '06 #11
I understand the web.config portion, just don't know how to code the aspx
side so that the image will show up in the designer. At runtime (viewed in
browser) the proposed solution will work, but it doesn't seem to work at
design time.

"Kevin Spencer" wrote:
Hi Jason,

Here's an example from an ASP.Net web application I have worked on:

<add key="ImagePath" value="http://www.airtraveler.com/airtraveler"/>

This is combined with the image file name in the app to create the URL of
the images in the app.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
"Jason Camp" <Ja*******@discussions.microsoft.comwrote in message
news:42**********************************@microsof t.com...
Would you please give me a code snippit on this? If this works at design
time
I'm ready to roll.

"Kevin Spencer" wrote:
Yes, as long as your web.config at design time is pointing to the actual
locations of the images.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
"Jason Camp" <Ja*******@discussions.microsoft.comwrote in message
news:11**********************************@microsof t.com...
Will this solution display the images at design time?

"Peter Bromberg [C# MVP]" wrote:

Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the
app,
the setting can be changed in only one place.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jason Camp" wrote:

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into
VS.NET
2005.
The problem that I am currently running into is that we have many
web
applications that share common images and I don't know where to put
them. I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an
administrative
and
maintenance nightmare. We could store these images on a separate
server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between
development,
staging and our production environments. If we use <%=location%in
the
tags
to find the location at runtime, then the images won't show up in
the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


Jul 27 '06 #12

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

Similar topics

1
by: CanardWC | last post by:
Hello, Just a little problem. I want to share a shopping cart between 2 php sites for example foo and fii. There'is no login / password solution wanted, so i must use cookie and session. If...
7
by: codeslayer | last post by:
Greetings to everyone in ‘forum-land': I have a problem that has plaguing me to no end. It is a CSS-related question, and I have not seen this question posted anywhere in forums or through...
1
by: dgermano | last post by:
I need some info to make sure I avoid problems with my webfarms. Currently I'm running 3 separate sites, each with their own webfarm of 2-3 webservers. All of these sites are using the same...
5
by: BPearson | last post by:
Hello I would like to have several sites share a single web.config file. To accomplish this, I would point the root of these sites to the same folder. Is there any reason why I might not want to...
4
by: Anders K. Jacobsen [DK] | last post by:
Hi I have some common UserControls i want to share between to sites (on the same mashine but on diffrent virtual paths). right now i have on solution file with aprox 10 projects. 2 of these is...
5
by: Nils Hedström | last post by:
Sorry about my last post. There seems to be a bug in my newsreader-software. My company (companyA) has bought companyB. The website of companyA is www.companyA.com and comanyB's website is...
10
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images....
0
by: Emily | last post by:
Imagine a world where everybody shares and has faith in each other. We have all struggled at one time or another with our jobs or careers and have wondered if there was a better way to make a...
3
by: Dave | last post by:
I have an ASP 3.0 website on which the images are displaying intermittently. In other words, when I request a page, the image is blank. There is no missing image place marker (rectangle with a...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...
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.