Solved

System.IO.IOException: The process cannot access the file because it is being used by another process.

Posted on 2006-06-15
2
803 Views
Last Modified: 2012-05-05
Hi

I am writing an integration program to a webservice.

I am getting this error when I try to get the response from the webservice and write it into a text file. It was working fine till a week ago and this program runs fine in the live server.
I have closed all other procces in my program. Any help will be much appreciated.

Here is my code snippet.

  catch (Exception e)
        {

            string file = Server.MapPath("error.txt");
            lblError.Text = "There was an error processing your package,please make sure all your values are correct and try again.";
            StreamWriter er = new StreamWriter(file);
            er.Write(Response);
                       er.Close();          
        }

Thanks
0
Comment
Question by:Watson_User
2 Comments
 
LVL 7

Accepted Solution

by:
ExpertAdmin earned 250 total points
ID: 16916279
The good news is that the problem is probably not your code. This is a confirmed bug in the .Net framework.  Read this article to find out how to fix it:

http://support.microsoft.com/?kbid=892544



M@
0
 

Author Comment

by:Watson_User
ID: 16921494
Thanks Much.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now