How to get IIS to recognize OWIN startup class?

后端 未结 4 1405
庸人自扰
庸人自扰 2020-12-24 11:47

My OWIN web service runs beautifully in Visual Studio 2013, but when I publish it to a real IIS site, it acts as if the Configuration method in the startup class has not bee

4条回答
  •  滥情空心
    2020-12-24 12:43

    I also faced same problems when I migrated my already running MVC5 site to a new server. It gave me nightmares, just to recap I had to do all this to get it working

    1. Add [assembly: OwinStartupAttribute(typeof([YourAssemblyName].Startup))] this to the Startup class (after the using statements and before the namespace declaration)
    2. Add these keys to the section of web.config

      
      
      
    3. And lastly as suggested by Martijn Evens add the following to section in web.config

      
      

提交回复
热议问题