Occasionally when using a debugger in ASP.NET (or shortly after using the debugger), your solution may return the following error when viewing in a browser:
Cannot create/shadow copy
This is a problem rooted in how solutions build for ASP.NET - they are often built into binaries that are placed in a "shadow" location so that the user may continue editing and saving the code without any consequence to the current built solution. Sometimes this process will not work correctly. A quick solution is to Clean your solution. This can be done in Visual Studio by navigating to Build -> Clean Solution.
However if this problem is occurring enough, it might be worth placing the following code into your web.config:
1 2 3 |
|
This will prevent the solution from making shadow binaries, but you will have to be more careful about editing your solution while testing it.





