?
Solved

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

Posted on 2006-06-15
2
Medium Priority
?
820 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
ExpertAdmin earned 750 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

770 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