Ok I read the above but the Asp.net forum didn't help
-
Hi folks, A few of you may remember that I announced the loss of my website virginity a few weeks ago. www.ozfarmguide.com. I invited you all to have a look at it and I improved the site from your suggestions. All was going swimmingly until... I tried to use one of the many fileupload controls in the admin section on my site. It doesn't work! None of them do! :wtf: The application crashes as the server just can't find the file I'm looking for. e.g
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Fred\Desktop\cherries.jpg'
. I'm 99% sure there is nothing wrong with my code. Everything was working perfectly locally. Has this ever happened to any of you? I'm absolutly stumped and without this functionality my site s useless!:confused: Thanks ps.please don't chastise me for this.JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
-
Hi folks, A few of you may remember that I announced the loss of my website virginity a few weeks ago. www.ozfarmguide.com. I invited you all to have a look at it and I improved the site from your suggestions. All was going swimmingly until... I tried to use one of the many fileupload controls in the admin section on my site. It doesn't work! None of them do! :wtf: The application crashes as the server just can't find the file I'm looking for. e.g
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Fred\Desktop\cherries.jpg'
. I'm 99% sure there is nothing wrong with my code. Everything was working perfectly locally. Has this ever happened to any of you? I'm absolutly stumped and without this functionality my site s useless!:confused: Thanks ps.please don't chastise me for this.JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
No programming questions in the Lounge!! There, now that I have said that, have you checked that the path and file actually exist? Clearly you need to upload the file to some directory relative to your virtual directory (that holds your website). I'm pretty sure that your webserver doesn't have the directory:
JimBob SquarePants wrote:
'C:\Users\Fred\Desktop\cherries.jpg'.
-------------------------------------------------------- Knowledge is knowing that the tomato is a fruit. Wisdom is not putting it in fruit salad!!
-
Hi folks, A few of you may remember that I announced the loss of my website virginity a few weeks ago. www.ozfarmguide.com. I invited you all to have a look at it and I improved the site from your suggestions. All was going swimmingly until... I tried to use one of the many fileupload controls in the admin section on my site. It doesn't work! None of them do! :wtf: The application crashes as the server just can't find the file I'm looking for. e.g
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Fred\Desktop\cherries.jpg'
. I'm 99% sure there is nothing wrong with my code. Everything was working perfectly locally. Has this ever happened to any of you? I'm absolutly stumped and without this functionality my site s useless!:confused: Thanks ps.please don't chastise me for this.JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
JimBob SquarePants wrote:
please don't chastise me for this.
you might not get much reply at all, there's a war going on in the Soapbox. :-D
Beauty is only a light switch away.
-
No programming questions in the Lounge!! There, now that I have said that, have you checked that the path and file actually exist? Clearly you need to upload the file to some directory relative to your virtual directory (that holds your website). I'm pretty sure that your webserver doesn't have the directory:
JimBob SquarePants wrote:
'C:\Users\Fred\Desktop\cherries.jpg'.
-------------------------------------------------------- Knowledge is knowing that the tomato is a fruit. Wisdom is not putting it in fruit salad!!
I know, I know, I know....... I feel guilty typing this. I'm not actually using postedfile.save to save the file to a directory. The binary data gets resized, converted to system.data.linq.binary and eventually moved to the database. It's not a permissions issue with the database cos I dont get that far. My latest effort is here: http://www.codeproject.com/script/Forums/View.aspx?fid=12076&msg=2657779[^] The resize stuff is further up. I tried it without that and it still didn't work. I'm off to flagellate myself now.......
JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
-
Hi folks, A few of you may remember that I announced the loss of my website virginity a few weeks ago. www.ozfarmguide.com. I invited you all to have a look at it and I improved the site from your suggestions. All was going swimmingly until... I tried to use one of the many fileupload controls in the admin section on my site. It doesn't work! None of them do! :wtf: The application crashes as the server just can't find the file I'm looking for. e.g
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Fred\Desktop\cherries.jpg'
. I'm 99% sure there is nothing wrong with my code. Everything was working perfectly locally. Has this ever happened to any of you? I'm absolutly stumped and without this functionality my site s useless!:confused: Thanks ps.please don't chastise me for this.JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
JimBob SquarePants wrote:
Could not find a part of the path
Hint: This error also means that the user does not have access to the path. The user in this case being teh user under whose context IIS service is running.
Proud to be a CPHog user
-
JimBob SquarePants wrote:
Could not find a part of the path
Hint: This error also means that the user does not have access to the path. The user in this case being teh user under whose context IIS service is running.
Proud to be a CPHog user
So you're (admin) on my server does not have access to the path on my computer?? So it's a permissions issue?? I picked up my first book on asp.net a few months ago. I am a total beginner so was feeling quite happy with myself until this happened. I have googled the crap out of this and am not getting anywhere.
JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
-
JimBob SquarePants wrote:
please don't chastise me for this.
you might not get much reply at all, there's a war going on in the Soapbox. :-D
Beauty is only a light switch away.
Dirk Higbee wrote:
you might not get much reply at all, there's a war going on in the Soapbox.
Read it, Gonna stay away from it. There's a lot of angry people out there!
JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
-
So you're (admin) on my server does not have access to the path on my computer?? So it's a permissions issue?? I picked up my first book on asp.net a few months ago. I am a total beginner so was feeling quite happy with myself until this happened. I have googled the crap out of this and am not getting anywhere.
JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
JimBob SquarePants wrote:
So you're (admin) on my server does not have access to the path on my computer??
No, the server can't access your local PC (at least in the sense of going to c:\users\fred\blah bah)... you need to have code in place to upload the file to the server then do whatever you want with it...
-------------------------------------------------------- Knowledge is knowing that the tomato is a fruit. Wisdom is not putting it in fruit salad!!
-
JimBob SquarePants wrote:
So you're (admin) on my server does not have access to the path on my computer??
No, the server can't access your local PC (at least in the sense of going to c:\users\fred\blah bah)... you need to have code in place to upload the file to the server then do whatever you want with it...
-------------------------------------------------------- Knowledge is knowing that the tomato is a fruit. Wisdom is not putting it in fruit salad!!
_Damian S_ wrote:
No, the server can't access your local PC (at least in the sense of going to c:\users\fred\blah bah)... you need to have code in place to upload the file to the server then do whatever you want with it...
Ok I'll give that a go... wish me luck!
JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
-
Hi folks, A few of you may remember that I announced the loss of my website virginity a few weeks ago. www.ozfarmguide.com. I invited you all to have a look at it and I improved the site from your suggestions. All was going swimmingly until... I tried to use one of the many fileupload controls in the admin section on my site. It doesn't work! None of them do! :wtf: The application crashes as the server just can't find the file I'm looking for. e.g
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Fred\Desktop\cherries.jpg'
. I'm 99% sure there is nothing wrong with my code. Everything was working perfectly locally. Has this ever happened to any of you? I'm absolutly stumped and without this functionality my site s useless!:confused: Thanks ps.please don't chastise me for this.JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************
JimBob SquarePants wrote:
I'm 99% sure there is nothing wrong with my code. Everything was working perfectly locally.
When reading that, i became 99% sure that there was something wrong with your code, and that what's wrong is that you are trying to access the file that was uploaded instead of the uploaded data stream. The only reason that it worked locally, is that the server and client happened to be the same computer.
Despite everything, the person most likely to be fooling you next is yourself.