File System (about stream reader)
-
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
-
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
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:
-
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
You propably need to restart the iis before you can operate on the file again.
Kind Regards, John Petersen
-
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:
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
-
You propably need to restart the iis before you can operate on the file again.
Kind Regards, John Petersen
Thanks but I have checked with the restart of my computer. Error again same. God Bless You. Shahid
-
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
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:
-
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:
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