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. C#
  4. fetch the physical path of file saved in cache

fetch the physical path of file saved in cache

Scheduled Pinned Locked Moved C#
helpquestion
3 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.
  • S Offline
    S Offline
    sujithkumarsl
    wrote on last edited by
    #1

    Hi, i am trying to implement cache managing using Microsft enterprise library. I want to fetch the physical path of my file saved in cache. i tried with reflection like this

    Stream dcmStream = (IsolatedStorageFileStream)cache["key"];
    string fullPath = dcmStream.GetType().GetField("m_FullPath",
    BindingFlags.NonPublic | BindingFlags.Instance).GetValue(dcmStream).ToString();

    It is not working. Could you help me?

    My small attempt...

    Richard Andrew x64R T 2 Replies Last reply
    0
    • S sujithkumarsl

      Hi, i am trying to implement cache managing using Microsft enterprise library. I want to fetch the physical path of my file saved in cache. i tried with reflection like this

      Stream dcmStream = (IsolatedStorageFileStream)cache["key"];
      string fullPath = dcmStream.GetType().GetField("m_FullPath",
      BindingFlags.NonPublic | BindingFlags.Instance).GetValue(dcmStream).ToString();

      It is not working. Could you help me?

      My small attempt...

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      "It is not working" does not tell what the problem is. What is it doing wrong? Is there an error message, and what is it?

      1 Reply Last reply
      0
      • S sujithkumarsl

        Hi, i am trying to implement cache managing using Microsft enterprise library. I want to fetch the physical path of my file saved in cache. i tried with reflection like this

        Stream dcmStream = (IsolatedStorageFileStream)cache["key"];
        string fullPath = dcmStream.GetType().GetField("m_FullPath",
        BindingFlags.NonPublic | BindingFlags.Instance).GetValue(dcmStream).ToString();

        It is not working. Could you help me?

        My small attempt...

        T Offline
        T Offline
        T M Gray
        wrote on last edited by
        #3

        Why are you caching a stream rather than the file itself? Why do you need the physical path of something in Isolated Storage? Sounds like you are using the wrong tools for what you are trying to accomplish.

        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