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. File System (about stream reader)

File System (about stream reader)

Scheduled Pinned Locked Moved C#
helpcsharpasp-net
7 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
    Syed Shahid Hussain
    wrote on last edited by
    #1

    I used a StreamReader and forgot to close it. Now when I try to do any file operation at that page(ASP.NET), I receive an Error message "file is using by another process". I have chaged the names of Variable,Text file and location but no success. Any one can solve my problem. Thanks Syed Shahid Hussain

    N J 2 Replies Last reply
    0
    • S Syed Shahid Hussain

      I used a StreamReader and forgot to close it. Now when I try to do any file operation at that page(ASP.NET), I receive an Error message "file is using by another process". I have chaged the names of Variable,Text file and location but no success. Any one can solve my problem. Thanks Syed Shahid Hussain

      N Offline
      N Offline
      Nader Elshehabi
      wrote on last edited by
      #2

      Hello I'm missing some details in your post: 1- Is this ASP or C#?? This is the C# forum BTW 2- Is the a web application, or windows application? 3- Is your application on a localhost or a remote server? 4- Is your application in a debug or release mode?

      Regards:rose:

      S 1 Reply Last reply
      0
      • S Syed Shahid Hussain

        I used a StreamReader and forgot to close it. Now when I try to do any file operation at that page(ASP.NET), I receive an Error message "file is using by another process". I have chaged the names of Variable,Text file and location but no success. Any one can solve my problem. Thanks Syed Shahid Hussain

        J Offline
        J Offline
        John Petersen
        wrote on last edited by
        #3

        You propably need to restart the iis before you can operate on the file again.

        Kind Regards, John Petersen

        S 1 Reply Last reply
        0
        • N Nader Elshehabi

          Hello I'm missing some details in your post: 1- Is this ASP or C#?? This is the C# forum BTW 2- Is the a web application, or windows application? 3- Is your application on a localhost or a remote server? 4- Is your application in a debug or release mode?

          Regards:rose:

          S Offline
          S Offline
          Syed Shahid Hussain
          wrote on last edited by
          #4

          Hi 1 Web Page: ASP.Net with C# (Client want to save record in a txt file) 2 Web Apllication 3 localhost 4 i dont khow. Thanks for reply God Bless You Syed Shahid Hussain

          N 1 Reply Last reply
          0
          • J John Petersen

            You propably need to restart the iis before you can operate on the file again.

            Kind Regards, John Petersen

            S Offline
            S Offline
            Syed Shahid Hussain
            wrote on last edited by
            #5

            Thanks but I have checked with the restart of my computer. Error again same. God Bless You. Shahid

            1 Reply Last reply
            0
            • S Syed Shahid Hussain

              Hi 1 Web Page: ASP.Net with C# (Client want to save record in a txt file) 2 Web Apllication 3 localhost 4 i dont khow. Thanks for reply God Bless You Syed Shahid Hussain

              N Offline
              N Offline
              Nader Elshehabi
              wrote on last edited by
              #6

              Hello Well, there are several ways of unlocking a shared file. It may take sometime to know who exactly is locking a certain file, but in your case you said you already changed the path in your code and variables, etc.. restarted you computer.. So to cut things short: 1- Restart in safe mode 2- Move the file to another location or delete it -I prefer backing it up first- 3- Restart in normal mode 4- Try you app 5- If it works, enjoy your life:) BTW: If you need more help I suggest reposting your question in ASP .Net forum[^], maybe you get more help. Also if it doesn't work, keep me posted.

              Regards:rose:

              S 1 Reply Last reply
              0
              • N Nader Elshehabi

                Hello Well, there are several ways of unlocking a shared file. It may take sometime to know who exactly is locking a certain file, but in your case you said you already changed the path in your code and variables, etc.. restarted you computer.. So to cut things short: 1- Restart in safe mode 2- Move the file to another location or delete it -I prefer backing it up first- 3- Restart in normal mode 4- Try you app 5- If it works, enjoy your life:) BTW: If you need more help I suggest reposting your question in ASP .Net forum[^], maybe you get more help. Also if it doesn't work, keep me posted.

                Regards:rose:

                S Offline
                S Offline
                Syed Shahid Hussain
                wrote on last edited by
                #7

                Thanks Friend. But I had tired of it and I now I have made all new. I deleted the web page and txt file and develop a new page. I think it is the only solution of the situation. Now it is working correct. Thanks for your time. God Bless You Syed Shahid Hussain

                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