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. Not Opening File

Not Opening File

Scheduled Pinned Locked Moved ASP.NET
5 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.
  • V Offline
    V Offline
    vishnukamath
    wrote on last edited by
    #1

    Hi, I have a Temp Folder in my solution and i copied one file into Temp Folder, i need to open copied file through code. I tried with File.Open(),but it is not opening file. Please suggest me better way to do this. Regards Vishnu

    S N S R 4 Replies Last reply
    0
    • V vishnukamath

      Hi, I have a Temp Folder in my solution and i copied one file into Temp Folder, i need to open copied file through code. I tried with File.Open(),but it is not opening file. Please suggest me better way to do this. Regards Vishnu

      S Offline
      S Offline
      StianSandberg
      wrote on last edited by
      #2

      string content = System.IO.File.ReadAllText("myFile.txt"); --------------- www.serverside.no

      1 Reply Last reply
      0
      • V vishnukamath

        Hi, I have a Temp Folder in my solution and i copied one file into Temp Folder, i need to open copied file through code. I tried with File.Open(),but it is not opening file. Please suggest me better way to do this. Regards Vishnu

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        vishnukamath wrote:

        I tried with File.Open(),but it is not opening file.

        Are there any exceptions? Showing what you have done may help us to point out problems/solutions.


        I know the language. I've read a book. - _Madmatt

        1 Reply Last reply
        0
        • V vishnukamath

          Hi, I have a Temp Folder in my solution and i copied one file into Temp Folder, i need to open copied file through code. I tried with File.Open(),but it is not opening file. Please suggest me better way to do this. Regards Vishnu

          S Offline
          S Offline
          Sunasara Imdadhusen
          wrote on last edited by
          #4

          What is the meaning of "Open" file? You want to open it reader or you want to execute file? (suppose i have a word document and you want to open it with Microsoft Word or in memory)

          sunaSaRa Imdadhusen +91 99095 44184 +91 02767 284464

          1 Reply Last reply
          0
          • V vishnukamath

            Hi, I have a Temp Folder in my solution and i copied one file into Temp Folder, i need to open copied file through code. I tried with File.Open(),but it is not opening file. Please suggest me better way to do this. Regards Vishnu

            R Offline
            R Offline
            rt2800
            wrote on last edited by
            #5

            If it is a ASPNET based solution (a website), you will need proper permissions to access temp folder. Check the app pool for your web site and identity/logon-user under which app pool is running. Make sure the identity has rights to access temp folder and files under that folder.

            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