ASP.NET error when pulling data from Db???
When I tried to pull data from my Database in a controller (in the index view function) I got the error in the image. Any clue what it is or what to do about it?
3 Replies
The obj folder contains files visual studio is working with as it has the project open. It copies those to bin when it does a build or before debugging. If you are running your project from the bin folder (for exapmle, you ran 'dotnet run') when VS tries to do a build, it can get this error. This can also happen if the last run of your project didn't exit properly, if a virus software has the file locked, or any other reason that causes the file to be locked.
If you have this error in VS, then whatever you think you are running when 'pulling data from the Db' is probably out of date with the code you are editing, as your build(s) are failing.
Try restarting VS
worked, thx guys