473,394 Members | 1,702 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,394 software developers and data experts.

Upload problem on share network

Hi,
I'm having a problem uploading an image when running a website from a share network. Could someone please give me some advice?

Here's my code:

*********************************
<Code behind>
string sfullpath = "C:\My Documents\My Pictures\Mypict.bmp";
FileInfo imgFile = new FileInfo(sfullpath);

if (!imgFile.Exists)
{
// Image not existed;
}
else
{
// Do something
}
************************************

Note: Everything is working fine if I run this website locally, but if I run it from another PC, it couldn't find the image file at all. However if I change sfullpath = "C:\Windows\Greenstone.bmp" it works fine. Is there something that I need to set from the web server to solve this problem? Please advice if you have any solutions. Thank you in advance.

Tinhtam
Nov 18 '07 #1
1 765
Shashi Sadasivan
1,435 Expert 1GB
Hi ,
I am not totally sure about this. But when you run the website from your computer, you have access to all the drives.
However when an external request comes to fetch data from the non-website files, It will not allow access to it.
The best thing to do would either keep a folder in your website where files can be uploaded from
Nov 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: brian.oneil2 | last post by:
Is there a way to install this onto a network file share and allow a team to access it? I would say share a CD from a networked CD drive, but there are multiple CD's that would have to be inserted....
4
by: rajesh | last post by:
I am trying to upload a file using .Net's HttpPostedFile.SaveAs() to a share on a remote server. It works fine when the share is on the same server. I looked at the permissions on the share and...
2
by: Tom Wells | last post by:
I have a little file upload page that I have been able to use to successfully upload files to the C: drive of LocalHost (my machine). I need to be able to upload to a network drive from the intranet...
2
by: Siobhan | last post by:
Hi - I create a input box as follows: <INPUT id="inpJobDescEmpSpec" style="BORDER-RIGHT: gray thin solid; BORDER-TOP: gray thin solid; Z-INDEX: 181; LEFT: 232px; BORDER-LEFT: gray thin solid;...
3
by: Mike Kelly | last post by:
Hi. I've built a page using standard ASP.NET 2.0 features and when I upload a large file (>20MB) to our intranet server, I get a paltry 100KB/s on our 100Mb/s LAN. Simply copying the file, I get...
3
by: musosdev | last post by:
Hi guys Okay, I've setup my projects to open and compile fine in VS2005 using FPSE and remote web, but it's *really* slow. So I thought I'd have a go at doing it the normal way, by loading from...
6
by: leandra_s | last post by:
Hello I want to upload files to a server with asp. But the problem is that the server where my asp website stands is a different server then where my upload files must go. Is there a way to...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
2
by: hotflash | last post by:
Hi Master CroCrew, I found a good PURE ASP that will allow you to upload 10MB file to the server and the file contents such as Network, Author, Title, etc... will insert to MS Access at the same...
0
by: cw808 | last post by:
Hi all. I'm new here but hoping I can get some help for my problem. My situation is that I need to upload files through a C# .NET web application to a file server. I done a search and followed...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.