Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Sharing images with multiple web sites

Reply
Thread Tools

Sharing images with multiple web sites

 
 
=?Utf-8?B?SmFzb24gQ2FtcA==?=
Guest
Posts: n/a
 
      07-26-2006
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.
 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      07-26-2006
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" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmFzb24gQ2FtcA==?=
Guest
Posts: n/a
 
      07-26-2006
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" <(E-Mail Removed)> wrote in message
> news(E-Mail Removed)...
> > 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.

>
>
>

 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      07-26-2006
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" <(E-Mail Removed)> a écrit dans le message
de news: http://www.velocityreviews.com/forums/(E-Mail Removed)...
> 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.



 
Reply With Quote
 
=?Utf-8?B?SmFzb24gQ2FtcA==?=
Guest
Posts: n/a
 
      07-26-2006
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" <(E-Mail Removed)> a écrit dans le message
> de news: (E-Mail Removed)...
> > 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.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      07-26-2006
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.

 
Reply With Quote
 
=?Utf-8?B?SmFzb24gQ2FtcA==?=
Guest
Posts: n/a
 
      07-26-2006
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.

 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      07-26-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
=?Utf-8?B?SmFzb24gQ2FtcA==?=
Guest
Posts: n/a
 
      07-26-2006
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.

>
>
>

 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      07-27-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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.

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using python to visit web sites and print the web sites image to files imx Python 10 03-14-2007 02:19 PM
sharing states across multiple sites within a server =?Utf-8?B?dGlu?= ASP .Net 0 11-14-2006 03:55 AM
Sites about web-sites ? Jasbird HTML 1 09-28-2006 06:21 PM
ISO: Web sites for images (pay sites preferred) Kevin Buchan ASP .Net 1 02-20-2004 09:34 AM
Multiple sites sharing single web.config file =?Utf-8?B?QlBlYXJzb24=?= ASP .Net 5 02-10-2004 10:46 PM



Advertisments