Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > render an image from another server

Reply
Thread Tools

render an image from another server

 
 
rich
Guest
Posts: n/a
 
      02-12-2009
We have a web app on an IIS(6) web server.
We store some images on another server (for documents and images)
which is on the same network as the web server.
There is NO domain for this network.

We’ve already lost a couple of hours trying to get the images from the
one server to render in our web app and just can’t do it.
So, in our ASP app, we are referencing the image in this way:

<img src="file://///192.168.1.110/documents/abc.jpg">

I don’t really want to install IIS on the document server do i?

I have tried setting up the same “internet” user from the web server
on the document server, but it prefixes the username with the server
name and doesn't seem to work.

I've tried different ways to reference the file location (file://, \
\servername\image.jpg, etc.)
I've setup mapped network drives
I've set permissions to "everyone", "full control"
Nothing works.

Any ideas?
 
Reply With Quote
 
 
 
 
Michael Fesser
Guest
Posts: n/a
 
      02-12-2009
..oO(rich)

>We have a web app on an IIS(6) web server.
>We store some images on another server (for documents and images)
>which is on the same network as the web server.
>There is NO domain for this network.
>
>We’ve already lost a couple of hours trying to get the images from the
>one server to render in our web app and just can’t do it.
>So, in our ASP app, we are referencing the image in this way:
>
><img src="file://///192.168.1.110/documents/abc.jpg">


Try file://192.168.1.110/documents/abc.jpg

Micha
 
Reply With Quote
 
 
 
 
Andy Dingley
Guest
Posts: n/a
 
      02-13-2009
On 12 Feb, 20:24, rich <(E-Mail Removed)> wrote:
> We have a web app on an IIS(6) web server.


Irrelevant. This is just a matter for the client web browser and the
media server. The web server sends a HTML page to the browser, which
contains URLs in the <img src="..." > attribute. Then the _browser_
requests this from the media server, without involving the web server
any more.

Do you have a URL to an image that works? e.g.
file://192.168.1.110/documents/abc.jpg
or
http://192.168.1.110/documents/abc.jpg

If you do, then paste that into the HTML on the web server - that's
all you need.

It's not _quite_ all. Stick with "simple" characters and you'll be OK,
but if you have embedded spaces or punctuation in a filename or URL,
you'll have to "percent encode" this when you turn it into a href or
src attribute for the HTML. "foo bar" becomes "foo%20bar"

If you can't get either of these URLs to work FROM THE BROWSER, then
you have a problem. Even if you can access these from the web server,
they need to be accessible from the browser as well.

If you have a file server that's not accessible from the browser, then
you could also configure the web server so that it serves web content
for some virtual directory as coming off that file server. In that
case the HTTP aspect doesn't see the difference at all and just sees
"a big web server" through URLs like this:
<img src="/media/abc.jpg" >

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-13-2009
Andy Dingley wrote:

> Do you have a URL to an image that works? e.g.
> file://192.168.1.110/documents/abc.jpg
> or
> http://192.168.1.110/documents/abc.jpg


The former cannot work, in WWW terms. Any file: URL indicates a resource to
be accessed in a machine-dependent manner, by definition, so it by
definition won't work on the World Wide Web. It may work inside a computer
or inside a local network. More info:
http://www.cs.tut.fi/~jkorpela/ftpurl.html

The latter postulates that the image is on an HTTP server, which is fine but
something that the OP explicitly wanted to avoid.

> If you can't get either of these URLs to work FROM THE BROWSER, then
> you have a problem.


Even if you can make them work on a browser, you have a problem at least
with the first one, the ftp: URL, since it won't work on other people's
browsers, except perhaps very locally.

> If you have a file server that's not accessible from the browser, then
> you could also configure the web server so that it serves web content
> for some virtual directory as coming off that file server. In that
> case the HTTP aspect doesn't see the difference at all and just sees
> "a big web server" through URLs like this:
> <img src="/media/abc.jpg" >


I don't quite see the point here, especially since it postulates that the
image is on the same server as the referring HTML document - something that
was specified as not being the case (see the Subject line).

But a different idea popped into my mind: if running an HTTP server is too
much work (and it really requires some time and care), maybe an FTP server
is more feasible. Then you could use ftp: URLs. Not very modern, but
possible.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      02-13-2009
Gazing into my crystal ball I observed rich <(E-Mail Removed)>
writing in news:13b7c090-25fd-4530-b4c9-3761e35a3417
@t13g2000yqc.googlegroups.com:

> We have a web app on an IIS(6) web server.
> We store some images on another server (for documents and images)
> which is on the same network as the web server.
> There is NO domain for this network.
>
> We've already lost a couple of hours trying to get the images from the
> one server to render in our web app and just can't do it.
>


If this is a classic ASP page, you might want to post to
microsoft.public.iis.asp.general, otherwise, try one of the dot net groups,
IIRC they have framework in their name.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
Harlan Messinger
Guest
Posts: n/a
 
      02-13-2009
Michael Fesser wrote:
> .oO(rich)
>
>> We have a web app on an IIS(6) web server.
>> We store some images on another server (for documents and images)
>> which is on the same network as the web server.
>> There is NO domain for this network.
>>
>> We’ve already lost a couple of hours trying to get the images from the
>> one server to render in our web app and just can’t do it.
>> So, in our ASP app, we are referencing the image in this way:
>>
>> <img src="file://///192.168.1.110/documents/abc.jpg">

>
> Try file://192.168.1.110/documents/abc.jpg
>
> Micha


That will be useless for any web client who isn't on the local network
with file system permissions to view that file.
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      02-14-2009
On 13 Feb, 02:46, "Jukka K. Korpela" <(E-Mail Removed)> wrote:

> The former cannot work, in WWW terms.


Although the OP didn't state this, I was assuming (from the IP range)
that they're talking about a purely intranet app.
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      02-14-2009
On 13 Feb, 17:36, Harlan Messinger <(E-Mail Removed)>
wrote:

> Regarding the file: version: Hardly, unless all intended users are
> inside the network (since that's a non-routable IP address) and all have
> file system permission to view that file.


That's a common (intranet) situation though. Rather than building a
corporate document store where the web server understands user access
rights, just reference them from the file server with file:// URLs and
let the fileserver decide what they're allowed to see.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-14-2009
Andy Dingley wrote:

> On 13 Feb, 02:46, "Jukka K. Korpela" <(E-Mail Removed)> wrote:
>
>> The former cannot work, in WWW terms.

>
> Although the OP didn't state this, I was assuming (from the IP range)
> that they're talking about a purely intranet app.


They might mean that, but they _said_ "web", which is short for "World Wide
Web".

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
John Hosking
Guest
Posts: n/a
 
      02-14-2009
Jukka K. Korpela wrote:
> Andy Dingley wrote:
>
>> On 13 Feb, 02:46, "Jukka K. Korpela" wrote:
>>
>>> The former cannot work, in WWW terms.

>>
>> Although the OP didn't state this, I was assuming (from the IP range)
>> that they're talking about a purely intranet app.

>
> They might mean that, but they _said_ "web", which is short for "World
> Wide Web".
>

May I wax pedantic for a moment?

In Microsoftese, "web" doesn't necessarily mean the WWW, no matter
whether any of us think that it should. In FrontPage, the user is
encouraged/instructed/allowed to "create a new web site", or even (in
older versions, say FP9 to "create a new web", in both cases meaning
to produce a site for internal or WWW use. Usually but not always
Microsoft uses a lower-case "w" to refer to these sites, independent of
whether they're published on the WWW.

I claim the above based on my experiences up through FP2002. I don't
know what what used in later versions of FrontPage or any of Microsoft
Expression Web.

In IIS, the entities are referred to "Web Sites" (thusly capitalized),
whether of not they are accessed only locally or via an Internet
connection to the World Wide Web.

Of course, in the case of this thread I think it's hard to make too many
assumptions based on the terminology used. The OP posted to alt.html
(rather than, say, c.i.w.a.h), used GG, hasn't been back yet AFAWK, and
said, "there is NO domain for this network." I'm leaning towards some
internal usage rather than a publicly accessible WWW site, but who knows
for sure?


--
John
Let's not forget the UIP: http://improve-usenet.org/
 
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
Render 404 file not found when going to some pages from one domain but allow access from another? Andy B ASP .Net 0 11-20-2008 10:26 AM
How does a handler render the request to another handler in the MVC of SPRING 2.0.1 framework? rayzyang@gmail.com Java 0 05-30-2007 11:28 AM
Accessing rails render method outside of view / Decorating render Glenn Gillen Ruby 0 11-17-2006 02:30 PM
Page.Render do not render complete page Lau Lei Cheong ASP .Net 1 05-15-2004 04:10 AM
programmatically render a calendar control from another page aymer ASP .Net 0 08-30-2003 05:48 PM



Advertisments