problem uploading document

C

craigc

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
 
W

William Buchanan

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
 
J

Jacob

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.
 
C

craigc

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
 
C

Craig

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top