ASP.NET core 2.1 API hosted on IIS - asp.net-core

I'm having an issue with my deployment on IIS, in the sense when I start the API from VS 2017 and try the API on Postman it's working fine, but when I deploys it on IIS nothing is happening, could anyone insight me on the proper way to deploy APS.NET CORE 2.1 on IIS.
Thank you

Might want to give this a read: https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS

Related

ANCM in process handler failure in Dotnet core 3.0.1(Blazor) blazor app

I created a project using blazor then published it and hosted it in hostgator, when I visit the url get the error HTTP 500.0 In-process handler load failure I found some related answers here but all were on Dotnet 2.2 which describing modification to web.config file, Dotnet 3.0.1 doesn't have web.config file instead it's appsetting.json please do I fix this
in my own case now do I have to add the web.config myself, please I need help thanks
Unless they have ASP.NET Core 3.1 hosting in place then they don't support it. Therefore Blazor is TU on that host. From what it looks like that don't have it installed without asking about it from their support once that is done then you will have what you need. My guess is they don't support it.

How to enable trace.axd in ASP.NET core?

Our app is based on ASP.NET Core 2.0. It works fine in development environment but we see an oauth error when published to production.
All the documentation on asp.net core seems to point to using ILoggingxxx interfaces. The examples I found typically call logging.AddConsole() method so that the log lines can be viewed in VIsual Studio debug window. I am wondering if the good old trace.axd is still available under asp.net core. If so, I would appreciate the steps to enable tracing. Regards.
trace.axd is exclusive to applications based on .NET Framework and ASP.NET 4.x. It is not available in ASP.NET Core applications at all.

ASP.NET core fails on with

I try to do a performance test on my asp.net core 1.0.1 website. I use loader.io to get 4000 client's to load the website but I get an error on asp.net core. If I run the same code in asp.net 4.6 it runs error on same server. Can anybody tell my why I can't handle same load on my asp.net core site like my asp.net 4.6?
Error:
502 - Web server received an invalid response while acting as a
gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
ASP.NET 4.6: https://thusan.tinytake.com/sf/MTA4Mzg1OF80MzMzNzMz
ASP.NET core: https://thusan.tinytake.com/sf/MTA4Mzg1OV80MzMzNzM0
I'm running both sites from IIS on a Windows 2012 r2.
In ASP.NET 4, IIS hosts the web site in its own process. ASP.NET Core changed this. ASP.NET Core web sites execute as a separate process and IIS uses the ASP.NET Core Module to reverse proxy requests to the ASP.NET Core process. The error you are seeing could be caused by many problems, such as a setup errors or hung requests in the ASP.NET Core process.
If all requests fail, it is probably a setup error. Follow this document to make sure guide you have completed all steps to deploy an ASP.NET Core app to IIS. https://docs.asp.net/en/latest/publishing/iis.html.
If the ASP.NET Core site works for a few requests but fails under stress, checkout some of these recommendations for improving performance. https://github.com/aspnet/IISIntegration/issues/245#issuecomment-242541999

Why publishing to IIS is change for ASP.net core ?

When I publish under Visual Studio 2015 CTP 5 then I don't have to do setting for application pool CLR version.
Now for ASP.net core application and as per documentation (http://docs.asp.net/en/latest/publishing/iis.html) we have to do setting for application pool clr to No managed code.
Why it is like that ?
ASP.NET Core applications no longer run inside IIS but run out-of-process and IIS acts only as a reverse proxy. This functionality is provided by the AspNetCoreModule which is a native IIS module. Since no managed code runs in the IIS process it is recommended to set application pool as "No managed code".
I wrote a detailed blog post describing how ASP.NET Core applications are running with IIS. You can find it here.
This is because ASP.NET Core runs as a plain old command line application outside of the IIS. Therefore, IIS is merely a pass-through to Kestrel, which is the ASP.NET Core web server which runs in it's own separate process. This platform is what provides the cross-platform capabilities of .NET Core.

Can ASP.NET vNext with .NET core be hosted outside of IIS?

For Mono, it is explicit that ASP.NET can be hosted outside IIS on Apache or Nginx
Since the 1.0.0 release is nearby, I was looking at the publishing aspects of open source ASP.NET vNext.
Can ASP.NET vNext be hosted outside of IIS on a *nix server such as Ubuntu?
Yes, ASP.NET Core can be hosted at linux.
Have you tried this documentation, in which helps to install in Ubuntu 14.04?
AspNet Core has its own web server called Kestrel. Anytime you run an Asp.Net Core web app you run it using this server. IIS or Nginx are used as reverse proxies you can use when you want to expose your app in the wild (they can handle authentication etc.). During development you can just Kestrel directly without have to set up IIS or Nginx.
I dont know if it is working with Nginx, but Apache Server has a module called mod_asp which is a bridging component to the .NET runtime. Maybe that one is worth a try.