ravindra
ravindra

Reputation: 357

File In Use Error While Publishing Web API In VS 2015

I want to publish Web API (ASP.NET MVC 6) on a test server. But I get an error

FILE IN USE.

I tried this:

  1. I published my web api using FILE SYSTEM deployement scenario
  2. But when I tried to publish commited changes next time(except first time), it throws the error mentioned above
  3. I came to know that it is because file was being used by running site

I want to know that is my file system deployement approach wrong?

Is there any other standard and generic approach?

Whatever it may be, please guide me

Upvotes: 0

Views: 61

Answers (1)

Andrei Dragotoniu
Andrei Dragotoniu

Reputation: 6345

If your api is already running then trying to copy files over the existing ones will cause the issue you see.

You will need to stop the api and more than likely do an IisReset in a command prompt, this should remove all file locks and allow you to run the update.

Upvotes: 1

Related Questions