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. ASP.NET
  4. Folder Browser(Interesting one)

Folder Browser(Interesting one)

Scheduled Pinned Locked Moved ASP.NET
securityhelpquestion
6 Posts 3 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.
  • R Offline
    R Offline
    rain raj
    wrote on last edited by
    #1

    Hello Genious... I have developed folder browser which only displays the folders and not files in browser window..and let users selects folder path. This user class like Win32SDK and inports dlls like shell32 and shared function _ Public Shared Function SHBrowseForFolder(ByVal bi As BROWSEINFO) As IntPtr End Function and opens the browsing window with idListPtr = Win32SDK.SHBrowseForFolder(bi). Now one interesting thing is that this works in my application perfectly.. but when i publish this on local .. its not even open browser window and page opening gets hang... i think it is may be because security of windows's dll problem.. Any solutions..? please...

    P A 2 Replies Last reply
    0
    • R rain raj

      Hello Genious... I have developed folder browser which only displays the folders and not files in browser window..and let users selects folder path. This user class like Win32SDK and inports dlls like shell32 and shared function _ Public Shared Function SHBrowseForFolder(ByVal bi As BROWSEINFO) As IntPtr End Function and opens the browsing window with idListPtr = Win32SDK.SHBrowseForFolder(bi). Now one interesting thing is that this works in my application perfectly.. but when i publish this on local .. its not even open browser window and page opening gets hang... i think it is may be because security of windows's dll problem.. Any solutions..? please...

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      rain raj wrote:

      I have developed folder browser which only displays the folders and not files in browser window..and let users selects folder path.

      Why do you want to display a folder browser dialog from a web application? What purpose does it serve?

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      R 1 Reply Last reply
      0
      • P pmarfleet

        rain raj wrote:

        I have developed folder browser which only displays the folders and not files in browser window..and let users selects folder path.

        Why do you want to display a folder browser dialog from a web application? What purpose does it serve?

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        R Offline
        R Offline
        rain raj
        wrote on last edited by
        #3

        Hi Paul.. First of all ,Thanks for replying... Ok.. now i will tell you why it is needs... I have requirement like User can be able to select folder path from folder browser.. and then after selecting that, some files will copy from to server to user's selected path(Selected folder) Eg if user selects desktop then user's selected path is like C:\Documents and Settings\Administrator\Desktop and next, some files from my server will copies to users desktop. Is there any other way to get selected folder path from user's local drive then i will always welcome your any sugestions... Thanks..

        P 1 Reply Last reply
        0
        • R rain raj

          Hi Paul.. First of all ,Thanks for replying... Ok.. now i will tell you why it is needs... I have requirement like User can be able to select folder path from folder browser.. and then after selecting that, some files will copy from to server to user's selected path(Selected folder) Eg if user selects desktop then user's selected path is like C:\Documents and Settings\Administrator\Desktop and next, some files from my server will copies to users desktop. Is there any other way to get selected folder path from user's local drive then i will always welcome your any sugestions... Thanks..

          P Offline
          P Offline
          pmarfleet
          wrote on last edited by
          #4

          You can't do this. The browser can't access local resources on the client machine for obvious security reasons. Otherwise, websites could do malicious things with your user's file system. You have to adopt a different mindset when working with web applications. Some of the things you take for granted in Windows applications simply are not possible. The best thing you can do is to provide the facility to download a file or files. You could consider packaging a set of files up into a ZIP archive and then providing the user with the facility to download it.

          Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

          R 1 Reply Last reply
          0
          • P pmarfleet

            You can't do this. The browser can't access local resources on the client machine for obvious security reasons. Otherwise, websites could do malicious things with your user's file system. You have to adopt a different mindset when working with web applications. Some of the things you take for granted in Windows applications simply are not possible. The best thing you can do is to provide the facility to download a file or files. You could consider packaging a set of files up into a ZIP archive and then providing the user with the facility to download it.

            Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

            R Offline
            R Offline
            rain raj
            wrote on last edited by
            #5

            ok.. I got it.. Thanks for this sugestion. i will definately apply your sugestions as it is best.

            Tarak

            1 Reply Last reply
            0
            • R rain raj

              Hello Genious... I have developed folder browser which only displays the folders and not files in browser window..and let users selects folder path. This user class like Win32SDK and inports dlls like shell32 and shared function _ Public Shared Function SHBrowseForFolder(ByVal bi As BROWSEINFO) As IntPtr End Function and opens the browsing window with idListPtr = Win32SDK.SHBrowseForFolder(bi). Now one interesting thing is that this works in my application perfectly.. but when i publish this on local .. its not even open browser window and page opening gets hang... i think it is may be because security of windows's dll problem.. Any solutions..? please...

              A Offline
              A Offline
              amargujrathi2006
              wrote on last edited by
              #6

              Is your application in asp.net? if yes then why you are not using classes in system.io namespace to browse folders.

              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