Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Ok I read the above but the Asp.net forum didn't help

Ok I read the above but the Asp.net forum didn't help

Scheduled Pinned Locked Moved Web Development
csharpasp-netcomsysadminhelp
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JimBob SquarePants
    wrote on last edited by
    #1

    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 *******************************************************************

    _ D R G 4 Replies Last reply
    0
    • J JimBob SquarePants

      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 *******************************************************************

      _ Offline
      _ Offline
      _Damian S_
      wrote on last edited by
      #2

      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!!

      J 1 Reply Last reply
      0
      • J JimBob SquarePants

        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 *******************************************************************

        D Offline
        D Offline
        Dirk Higbee
        wrote on last edited by
        #3

        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.

        J 1 Reply Last reply
        0
        • _ _Damian S_

          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!!

          J Offline
          J Offline
          JimBob SquarePants
          wrote on last edited by
          #4

          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 *******************************************************************

          1 Reply Last reply
          0
          • J JimBob SquarePants

            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 *******************************************************************

            R Offline
            R Offline
            Rama Krishna Vavilala
            wrote on last edited by
            #5

            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

            J 1 Reply Last reply
            0
            • R Rama Krishna Vavilala

              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

              J Offline
              J Offline
              JimBob SquarePants
              wrote on last edited by
              #6

              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 *******************************************************************

              _ 1 Reply Last reply
              0
              • D Dirk Higbee

                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.

                J Offline
                J Offline
                JimBob SquarePants
                wrote on last edited by
                #7

                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 *******************************************************************

                1 Reply Last reply
                0
                • J JimBob SquarePants

                  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 *******************************************************************

                  _ Offline
                  _ Offline
                  _Damian S_
                  wrote on last edited by
                  #8

                  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!!

                  J 1 Reply Last reply
                  0
                  • _ _Damian S_

                    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!!

                    J Offline
                    J Offline
                    JimBob SquarePants
                    wrote on last edited by
                    #9

                    _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 *******************************************************************

                    1 Reply Last reply
                    0
                    • J JimBob SquarePants

                      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 *******************************************************************

                      G Offline
                      G Offline
                      Guffa
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups