locked
Visual Studios locks .MDF file when using Web Deployment Project RRS feed

  • Question

  • User-1996777133 posted

    Hello,

    I'm using Visual Studio 2008 and Web Deployment Projects to develop an ASP.NET web site.
    The site uses a LinqDataSource to connect to a database within a database file (.mdf) on my local machine (a different source will be used in the release)
    When I run my website for testing the link works correctly and everything appears kosher but when I stop the debugger and attempt to rebuild the project in VS2008 I get this error from the compiler:

    The process cannot access the file '<filepath>.mdf' because it is being used by another process.

    To build my project again I'm forced to exit VS2008 and re-start it.  Obviously, this is very inconvenient.  What could I be doing wrong?

    Thank you.

    Friday, October 2, 2009 9:35 AM

Answers

  • User1992938117 posted

    Hi,

    For this you should check your system tray where ASP.NET Development Server - Port ---- is running double click on it then stop it and Then Try to Rebuild Website  .. Try it

    Hope helps you..........


    Thanks..

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 2, 2009 9:50 AM

All replies

  • User1992938117 posted

    Hi,

    For this you should check your system tray where ASP.NET Development Server - Port ---- is running double click on it then stop it and Then Try to Rebuild Website  .. Try it

    Hope helps you..........


    Thanks..

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 2, 2009 9:50 AM
  • User-1996777133 posted

    Thanks Rajneesh!

    That works.  But lazy person that am, I still don't like having to do this Smile.  is there a way to make this automatic or to otherwise avoid it?

    Kerry

    Friday, October 2, 2009 9:56 AM
  • User1992938117 posted

    Hi,

    Check this link. Hope helps you..........

    http://forums.asp.net/p/1439543/3270408.aspx#3270408


    Thanks..

    Friday, October 2, 2009 10:06 AM