Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2004, 08:33 AM
Authorized User
 
Join Date: Nov 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default display image from server.....

Hi,

I'm having a big problem in displaying images from the server or over LAN & WAN. I am writing a client application, it will retrieve images from a folder which stored in the server and display that images on my page and this folder is not within wwwroot\inetpub. the image folder is outside the wwwroot\inetpub, e.g: c:\images\...

I have found code from the web (in vbscript) but it couldnt be used. Which is:

imageA = replace(the path where the images is stored, server name, ip address)
response.write imageA

Can someone here able in provide me the solution in displaying images over LAN & WAN?? I am in hurry for this solution... plz.. :(

Advanced thanks for those who able to help.


 
Old May 17th, 2004, 08:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The easiest way to do this is to map the network folder with images as a Virtual Directory under IIS. To do that, right-click your Web site and choose New | New Virtual Directory. Follow the instructions, name your folder NetworkImages (for example) and browse to the network path where the images are located. You'll also need to set the required security permissions on the disk with the images.

From this point, your images are available as http://localhost/NetworkImages or http://YourServerName/NetworkImages.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old May 18th, 2004, 01:37 AM
Authorized User
 
Join Date: Apr 2004
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can find this solution in Professional ASP Of Wrox
If you dont have this book you can find it in MSDN 2001


 
Old May 18th, 2004, 01:40 AM
Authorized User
 
Join Date: Apr 2004
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Or you can dowload the source code of this book and you will under...

 
Old May 23rd, 2004, 06:12 AM
Authorized User
 
Join Date: Nov 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have solved the previous problem partially, where I'm able to view the image. Whoever, the image can only be displayed over LAN.

I am having a problem in displaying image over WAN.

However I have shared that particular image folder on my server. but nothing was displayed.

Is it because of the security restriction on my server when the page view over the WAN??

 
Old May 24th, 2004, 05:19 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sharing is probably not enough.

The account that IIS runs under (usually IUSR_MachineName for an ASP app and ASPNET for an ASP.NET app) needs permissions to access the shared folder on the other server.

It can be a bit tricky to make both machines to accept each other's users. You probably need to duplicate the IUSR_MachineName account on the remote server as well, and set an explicit password on both accounts.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old May 24th, 2004, 07:07 AM
Authorized User
 
Join Date: Nov 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for trying to help.

however, I am fairy new in asp.... can u provide me a sample on how to duplicate the IUSR_MachineName on the remote server??

 
Old May 24th, 2004, 07:49 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi again,

Take a look at this FAQ:
http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=276

It deals with ways to allow IIS to access remote resources.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
How To Display Image from SQL Server ? kutel ASP.NET 2.0 Professional 3 July 30th, 2007 02:58 AM
How to Display the image from the image field. mikeparams SQL Server 2000 1 October 29th, 2004 02:23 AM
display image over the server... cici Classic ASP Professional 0 May 15th, 2004 08:38 AM
display an image gorney .NET Web Services 0 December 29th, 2003 01:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.