Reputation: 8183
I am attempting to self host a Asp.Net 4.5 MVC 5 application. Now after some research it seems this cannot be done with this framework, it would require switching it out for Nancy.
I understand that Asp.Net 5 supports this with Owin
. I have been able to convert my MVC project into the new Asp.Net 5 project (with the project.json) and set my runtime version as .net 4.5
"frameworks": {
"net45": {
"dependencies": { }
}
},
This is so I can still use the other .Net 4.5 projects in my solution (otherwise I need to upgrade all of my projects and their dependencies, which some do not support .Net 5 yet). Is there any way to self host like this?
Upvotes: 0
Views: 906
Reputation: 847
Which Asp.Net 5 build are you targeting in your app? For the RC2 builds the hosting API has changed somewhat and therefore other examples you find online may not work anymore, please see here for more information on that, it also explains how other's are using IIS to self-host so hopefully that will prove useful to you: Changes to hosting API
It would also be helpful to know which server you're planning on using to self-host your app. Generally Kestrel is used but this should always be behind a Web Server such as Nginx, Apache or IIS, and never exposed directly.
Upvotes: 0