I got a main website(Net 4.5.2) in my IIS. Then I create separate webapi(Net 4.7.2) and run it as virtual application inside the main website. But, when I test the webapi to GET a data, it will give me an error about missing assembly reference. Below is the error.
Parser Error Message: Could not load file or assembly 'System.Web.Optimization' or one of its dependencies. The system cannot find the file specified.
Then I install this missing assembly to the webapi and then its working perfectly.
So, the problem is:
- Why do I need to install this assembly even my webapi doesn't used this assembly?
- Is it related with the web api run as virtual application inside my main website? or because of different version?
- How do I skip this without need to install unused assembly to the webapi?