简体   繁体   中英

ASP.NET Self Hosting or IIS hosting

I have an asp.net web api application should I use Self Hosting or should I host it on IIS. I am looking for better performance and security. Which one should I be using?

I just show the answer from here .

What I've found (basically just pros for IIS hosted):

  • You lose all of the features of IIS (logging, application pool scaling, >throttling/config of your site, etc.)...

  • You have to build every single feature that you want yourself HttpContext?

  • You lose that since ASP.NET provides that for you. So, I could see that making things like authentication much harder WebDeploy?

  • IIS has some nice specific features in 8 about handling requests and warming up the service (self-hosted does not)

  • IIS has the ability to run multiple concurrent sites with applications and virtual directories to advanced topics like load balancing and remote deployments.

And this

Self-hosting is good when you're not on a server -- for example, you want a desktop app to be able to listen for API requests.

But I think you would be able to achive am faster performing and more stable server if it is worth your time. But you need to be carefull not to make basic security mistakes like public accessable configuration files or ddos.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM