I've declared the following in my application:
[assembly: OwinStartup("MyClass", typeof(MyClass), "ConfigureOwin")]
Defined a startup class:
public class MyClass {
public void ConfigureOwin(IAppBuilder appBuilder) {
}
}
And start owin like this:
WebApp.Start<MyClass>("baseUri");
However, it's not working. WebApp always tries to look for a method named 'Configuration' even if I define to look for something else. What could I do?
For me, I needed to add Microsoft.Owin.Host.SystemWeb
as a reference. (Click Manage Nuget Packages and search for it.)
Thanks to this blog post for the tip.
I ran into this issue because I migrated from Web API to Web API with OWIN middleware for ADFS authentication.
If you're using optimizeCompilations="true"
in your web.config
you may need to set it to false
and back to true
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With