Web API configurations work in debug but not in iis

247 views Asked by At

I'm making a Web API project and I'm using iis. I made the project and then I needed to add bundling to it. I used system.web.optimization file and webgreas DLLs from the default MVC project that is created by visual studio. There was an error for the required version of the webgreas DLL and I had to add the following configurations to the web.config file and it all worked fine when debugging.

<runtime>
<assemblyBinding xmls="urn:schemas-microsoft-com:ASM.v1">
    <dependentAssembly>
         <assemblyIdentity name="WebGrease" publicKeyToken="..." />
    <bindingRedirect oldVersion="1.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />

After publishing to iis the configurations I made just didn't allow the deployed server to run and the error pops up when you try to go to any path: Directory does not exist Parameter name: directory virtual path

My question is if runtime tag can or can't be used in iis and how to fix this and import the DLLs correctly. (Preferably without using nuget)

0

There are 0 answers