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

problem uploading document

hi,

i have recently migrated an app from my local machine to our dev web
server and i'm trying to upload a document from my local hard drive via
the web server to a sharepoint installation.

i'm getting the following error :

System.IO.DirectoryNotFoundException: Could not find a part of the path
"C:\Documents and Settings\cumminc\Desktop\1.jpg". at
System.IO.__Error.WinIOError(Int32 errorCode, String str) at
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path,
FileMode mode) at timetable.document_upload.btn_upload_Click(Object
sender, EventArgs e) Please Select A File

from searching the web, i believe that this means that i don't have the
correct permissions for the directory.

both our dev web server and the dev sharepoint installation have given
"everybody" full access to the C: drive, so i'm not sure why i would be
getting this error.

does anyone have any ideas as to how i can fix this ? everything worked
just fine on my local machine so i'm assuming that permissions is
indeed the cause.

thanks in advance

c

Mar 9 '06 #1
4 1186
Just a guess..... could you upload the file to a sub folder of your web app?
This would rule out problems with the upload process. You could then try to
move the file to the correct location and see what happens.
Remember your web app runs under the ASPNET user - might be worth
specifically giving this user permissions just to see if that is indeed the
problem.

Will

<cr****@freenet.co.uk> wrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
hi,

i have recently migrated an app from my local machine to our dev web
server and i'm trying to upload a document from my local hard drive via
the web server to a sharepoint installation.

i'm getting the following error :

System.IO.DirectoryNotFoundException: Could not find a part of the path
"C:\Documents and Settings\cumminc\Desktop\1.jpg". at
System.IO.__Error.WinIOError(Int32 errorCode, String str) at
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path,
FileMode mode) at timetable.document_upload.btn_upload_Click(Object
sender, EventArgs e) Please Select A File

from searching the web, i believe that this means that i don't have the
correct permissions for the directory.

both our dev web server and the dev sharepoint installation have given
"everybody" full access to the C: drive, so i'm not sure why i would be
getting this error.

does anyone have any ideas as to how i can fix this ? everything worked
just fine on my local machine so i'm assuming that permissions is
indeed the cause.

thanks in advance

c

Mar 9 '06 #2
Giving everyone access to the c: drive is a huge security risk, at
least if that permission is inherited by subfolders. Normally only the
users themselves and admins have access to users' folders, so check
again that the everyone permission has been inherited. Again everyone
access is a security risk.

Mar 9 '06 #3
thanks for the input guys :

@Jacob : Thanks for the tip - I'm aware of this and would tighten
security again once i get this working !

@ Will : I'm not explicitly setting the upload directory. I'm using the
UploadDocument method of my web service to upload the document to a
sharepoint installation.

As I mention, both servers have wide open permissions at the moment.

thanks again for your input.

c

Mar 9 '06 #4
thanks for your input guys. i have worked out that the upload process
thinks that the file is already on the web server rather than on my
local machine.

all i have to do is find the solution !

thanks for your assistance.

c

Mar 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: William Starr Moake | last post by:
Another problem with absolute paths in the WYSIWYG editor I'm putting together. The function to toggle between WYSIWYG and HTML modes works except for one glitch. If you use a relative path for...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
1
by: Lou | last post by:
I have a web application using vb.net and sql server 2000 in which I generate templates for documents by using the database to fill certain fields with an XSLT file to generate RTF for display on...
7
by: Ankit Aneja | last post by:
I put the code for url rewrite in my Application_BeginRequest on global.ascx some .aspx pages are in root ,some in folder named admin and some in folder named user aspx pages which are in user...
13
by: db | last post by:
Hi@all, I am always thinking that there is no problems that I can not solve. But now i changed my idea...... And I have posted it in javascript group, since i think both javascript and php...
5
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
0
by: wasif | last post by:
I am trying to upload file using ajax and php but having some problems. it always says that there was a problem and file is not uploaded. here is the code form and ajax code <!DOCTYPE html...
1
by: apog | last post by:
Hello, everyone! I have a javascript running perfectly with IE, but nothing seems to happend if I use firefox... anyone knows why? Here is the script: function add_div_field () { var ni =...
14
by: Tom Cole | last post by:
I have a rather complicated business application that uses Ajax. Part of this form requires uploading documents, which I cannot do using Ajax, so I post the form to an IFrame. This part works just...
1
Canabeez
by: Canabeez | last post by:
Hi all, anyone has an idea why IE is not uploading file and FF does? I'm creating a FORM + IFRAME using DOM and trying to upload a file, now Firefox and Chrome do thins perfectly. I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.