Try adding a test path to your runtime configuration:
<configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="bin\server\Debug;"/> </assemblyBinding> </runtime> </configuration>
In addition to the above step, and get rid of the globa.asax error. Open the mark of the Global.asax file and add a line to the top line.
<%@ Assembly Name="<you_web_app_assembly_name_here>" %>
Now you will begin to receive a System.web or BindingProvider error that is not found, etc. There's a weird fix for starting adding assemblies to an assembly tag when compiling.
<compilation debug="true" targetFramework="4.5" optimizeCompilations="false"> <assemblies> <add assembly="Microsoft.AspNet.Identity.Core, Version=2.2.1, PublicKeyToken=31bf3856ad364e35" /> <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Optimization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </assemblies> </compilation>
You will have a few more errors like this, but that will help you.
Reason . The problem I see is that it is possible to change the output path, but Asp.net does the compilation on the fly. Why is the error related to compilation when trying to start a website. Somewhere, run time compilation can only be viewed in the \bin , and so we must specify each assembly referenced by the project.
Update - Unfortunately, you cannot change the bin directory. After looking through all the options and searching, you find that the bin folder of the Asp.net web project is not a regular binary output folder. This is a shared folder where links to binary files are specified directly in the project.
The binaries are compiled when the first request is received by the web server for the Asp.net application. The bin folder is used only as a shared binary links folder, not the actual output folder / folder. The actual On-the-fly compilation output folder in Asp.net is set to %SystemRoot%\Microsoft.NET\Framework\<versionNumber>\Temporary ASP.NET Files by default, which you can change from the compilation tag attribute [tempDirectory][3] in web.config .
After all this research, I came to the conclusion that the option to change the directory from project -> properties -> Build -> Bin appears because of the Asp.net website project template. This gives the user the same look as any other project. But the functionality of the asp.net website remains the same. The bin folder still works the way it was used to work in the old Asp.net website template.