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. General Programming
  3. WPF
  4. How to get the physical path or fullpath of the file in silverlight?

How to get the physical path or fullpath of the file in silverlight?

Scheduled Pinned Locked Moved WPF
helptutorialquestioncareer
6 Posts 6 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.
  • N Offline
    N Offline
    nitincn
    wrote on last edited by
    #1

    Hi all.. I ran into an issue while implementing BITS, the problem is while creating a job in BITS we have to send the local path (physical path like c:/doc/sample.txt) but Silverlight will not give us the physical path or fullpath. It says access denied. How to get the physical path or fullpath of the file in silverlight? Thanks Nitin C.N

    realJSOPR A K 3 Replies Last reply
    0
    • N nitincn

      Hi all.. I ran into an issue while implementing BITS, the problem is while creating a job in BITS we have to send the local path (physical path like c:/doc/sample.txt) but Silverlight will not give us the physical path or fullpath. It says access denied. How to get the physical path or fullpath of the file in silverlight? Thanks Nitin C.N

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      Silverlight doesn't allow access to client-side files. If you're talking about a server side file, look at the HtmlPage.Document object - you might be able to get it from that. What is "BITS"?

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      L P 2 Replies Last reply
      0
      • realJSOPR realJSOP

        Silverlight doesn't allow access to client-side files. If you're talking about a server side file, look at the HtmlPage.Document object - you might be able to get it from that. What is "BITS"?

        .45 ACP - because shooting twice is just silly
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        bits[^] :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

        Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

        1 Reply Last reply
        0
        • realJSOPR realJSOP

          Silverlight doesn't allow access to client-side files. If you're talking about a server side file, look at the HtmlPage.Document object - you might be able to get it from that. What is "BITS"?

          .45 ACP - because shooting twice is just silly
          -----
          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
          -----
          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          John Simmons / outlaw programmer wrote:

          What is "BITS"?

          Background Intelligent Transfer Service[^].

          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

          As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

          My blog | My articles | MoXAML PowerToys | Onyx

          1 Reply Last reply
          0
          • N nitincn

            Hi all.. I ran into an issue while implementing BITS, the problem is while creating a job in BITS we have to send the local path (physical path like c:/doc/sample.txt) but Silverlight will not give us the physical path or fullpath. It says access denied. How to get the physical path or fullpath of the file in silverlight? Thanks Nitin C.N

            A Offline
            A Offline
            Abhinav S
            wrote on last edited by
            #5

            In addition to John's answer, if you are using WCF to communicate to BITS (Im not sure what that is), you can get the path via WCF.

            The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick - Silverlight *.XCP files. Visit the Hindi forum here.

            1 Reply Last reply
            0
            • N nitincn

              Hi all.. I ran into an issue while implementing BITS, the problem is while creating a job in BITS we have to send the local path (physical path like c:/doc/sample.txt) but Silverlight will not give us the physical path or fullpath. It says access denied. How to get the physical path or fullpath of the file in silverlight? Thanks Nitin C.N

              K Offline
              K Offline
              Kunal Chowdhury IN
              wrote on last edited by
              #6

              Hi Nitin, I think, I already answered your query through Twitter & my Blog. You can't get the physical path in Silverlight (assume you want the client side path). If you want server side path, it is easy to do in your server side code & return thru service call. But, as it is Silverlight, I assume, you want the path of client PC. No, you can't. There are some security reason while the application is running inside the browser sandbox. If you install it as fully trusted out-of-browser application, you can get it. Read the Article for some reference: File Explorer using Silverlight 4 COM Interoperability[^]. It may help you.

              Don't forget to Click on [Vote] and [Good Answer] on the posts that helped you.


              Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial

              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