469,609 Members | 1,657 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

How to access image into the server folder

(Type your message here)
I am using asp.net. I am not storing image in sql server.I storeall the image in one folder. I want to access image from thatfolder to my client machine. Images folder (\Data_Image) storein the same place into the application root (server machine)like c:\inetpub\wwwroot\mywebapp\Data_Image. I am using repetercontrol for show images. I already use server.Mappath but stillwhen I run my application on client machine it still look forthe image on client machine itself.
can anybody solve my problem.

--------------------------------
From: Manish Songar
Email: m_******@yahoo.com

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>rJScYp8+50mg+FWmS9fiow==</Id>
Nov 19 '05 #1
1 2168
I hate to tell you this, but your application root is not
"c:\inetpub\wwwroot\mywebapp\Data_Image". Your application is a web
application that resides in virtual directories. A URL points to a virtual
directory on the server, not a file location. If you use a file location,
that's what you're going to get. Take a look at the URL for your page. Do
you see any "C:" in there? A browser can display either local (to the local
file system) or remote (virtual directory via HTTP URL) files. How does the
browser know when they are local to the file system? When the URL is a file
path.

When building cars, it's best to know something about how the road works.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Manish Songar via .NET 247" <an*******@dotnet247.com> wrote in message
news:Oi**************@TK2MSFTNGP09.phx.gbl...
(Type your message here)
I am using asp.net. I am not storing image in sql server.I store all the
image in one folder. I want to access image from that folder to my client
machine. Images folder (\Data_Image) store in the same place into the
application root (server machine) like
c:\inetpub\wwwroot\mywebapp\Data_Image. I am using repeter control for show
images. I already use server.Mappath but still when I run my application on
client machine it still look for the image on client machine itself.
can anybody solve my problem.

--------------------------------
From: Manish Songar
Email: m_******@yahoo.com

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>rJScYp8+50mg+FWmS9fiow==</Id>
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Ian B | last post: by
1 post views Thread by Manish Songar via .NET 247 | last post: by
1 post views Thread by Manish Songar via .NET 247 | last post: by
35 posts views Thread by Stan Sainte-Rose | last post: by
3 posts views Thread by Thomas Satzinger | last post: by
9 posts views Thread by Wayne Smith | last post: by
reply views Thread by Solution2021 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.