I recently created an API that will be hosted on a local machine to our intranet. It is built as a .net core webapi project targeting .NET5
I deployed it to IIS using an App pool with the No managed code setting. And I added Authenticated Users as well as IIS_IUSRS to security.
Now when I try post to the api it just keeps loading, and in browser if I open a request it also just loads to no end.
Thanks
Related
I want my C# .net 6.0 application to auto start after server restart or after application pool recycle. I am using clean architecture and react as a frontend. I have published my application on ISS, enabled auto-start, but application doesn't load without opening it's site on a web browser.
I have published my .net 6.0 application on production environment, which consist of:
Windows Server 2016 Datacenter
IIS version 10.0.14393.0. (I have installed Application Initialization feature).
On Appliction Pool of my app i have:
apppool settings
On Site of my app i have:
appsite settings
Problem is: I can't start or auto-start my app without opening its url on web browser. Without opening browser I can't even load my Program class with Main method. I want my app to load with IIS after shutdown or after recycle automatically without needing me to open it's site on browser. Maybe IIS could open my app site automatically. Inside my app in Startup I have some quartz jobs, that will load for now only after I opened my app site in browser. Without opening my app in browser Startup doesn't even load.
I tried Any way to start IIS App (Website) automatically?
but adding InProcess haven't worked.
I tried asp.net application does not auto-start
but System.Web.Hosting.IProcessHostPreloadClient is not available in .net 6.0. Also var client = new WebClient() is obsolete and doesn't work
I have similar problem like described in comment
How to properly autostart an asp.net application in IIS10
I want my app to auto start while being on IIS. Maybe IIS could open ap site? Maybe in launchsettings.json there is an option, to load app without opening browser?
Thank you for your help in advance
I would like to try OutOfProcess hosting for .NET Core Web App (.NET 5) in IIS 8.
I thought all I need to do is to change hosting model to outofprocess in web.config and IIS will forward request to Kestrel which would host the app.
When I use inprocess hosting model, website is accessible at http://localhost:8080/Test2.
When I change hosting model to outofprocess http://localhost:8080/Test2 returns HTTP error 502.5 as captured on screen below. Manually starting the app from command line with
dotnet myApp.dll
makes application available at http://localhost:5000 but I would like to access it thru IIS port.
What do I need to do to access .NET Core App thru IIS when App hosting model is outofprocess?
I've installed hosting bundle for .NET5 and .NET6.
I restarted IIS after configurations change.
I've set folder permission for application pool account, also for
"everyone" group.
Reading MS documentation I guess it is not possible to host application like this without modifications to app source code and publishing it again. To be honest I don't understand this article entirely.
Current host settings [Windows Server 2012 R2]
I've developed a web api (C# .Net core), and (separately, in an entirely different directory/project) I have a client app (vue.js). I should've possibly had this in the same solution to start with but I don't.
I am running the web api in azure, it works fine. And I can run my vue js app anywhere and it can call the web api, also fine.
Question
How can I deploy my vue.js app to the same app service as my web api. They were developed separately since I intend to pass the vue.js app into phonegap shortly and treat it as a separate piece of work, but for the purposes of the web and not mobile, I need both vue.js and .net core to run on the same domain/app service and don't really want to integrate them.
What I've Tried
I have ran 'npm run build' on my vue app and have the dist folder, I've tried adding that to the root of the .net core project before publishing but I can't seem to hit the page when I navigate to the azure address.
A brute force way is to FTP the contents of your Vue app dist folder to the wwwroot folder in your Azure Web App.
I get a 404 Error when I try to run my Web API service on IIS 6. When I run it locally, it works. On IIS, my virtual directory is running .NET 4. The framework that my project is running is 4.0.
I have read many posts on this forum regarding the same issue, but haven't found a solution. Are there any special configuration settings on IIS 6 or code that needs to be written that enables IIS 6 to recognize Web API? Also, do I need to install MVC?
I'm developing a web service MVC .NET application that access to a Sharepoint 2013 site, I'm using the Microsoft.Sharepoint.dll not the client dll. When I run my web service on VS2015 in the IIS Express in release and debug mode I donĀ“t have any problem, but when I deploy the app to my local IIS the web service return an error
The Web application at http://[URL to SharePoint]/ could not be found.
I've tried running it with different URL such as http://localhost/sites/mysite and by domain name http://domain/sites/mysite, and I got the same results, on my VS IIS Express runs without problems but on the deploy IIS not.
The app is running on Framework 4.5 and AnyCpu compilation, I've tried downgrading the framework to 3.5 but without success. What could be the problem?, Is there any special permissions on the VS IIS that I need to enable on my local IIS?
I resolved deploying my application on a new web site in the IIS with the same applicattion pool used by my Sharepoint web site