In a web api 2 application we develop, when running the web server, for some reason Owin Startup method happens more than once. Is there a specific cause for this? Where should I look into in order to prevent it?
Thanks!
Set a breakpoint when it starts up and check the call stack window on each time it stops on the breakpoint. This will tell you where it is getting called from.
I have also seen this happen when you have added the OWIN startup detection set up and you also add in an explicit start up in code - for example in your WebApi config. Ordering could also be a problem.
检查在类中添加的Assembly属性,因此首先注册owin然后触发并且它也是静态的
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.