Running Web API on IIS 6 - c#

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?

Related

.NET5 WebApi project infinite loading on IIS

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

Is it possible to configure HTTPS for .net core API in IIS only ( whitout "heavy" .net core modification)?

I did a very little .net core web API , my goal is to receive a XML from a POST and to write this XML on my HDD.
I would like to use HTTPS.
When i created my project in VS, i checked the HTTPS support and if i run the application in debug mode, https is enabled and OK ( with IIS Express).
Since my API is OK, i published it on IIS ( Not IIS express).
It works in HTTP.
I modify IIS in order to enable HTTPS support and modify my appsettings.json in order to add the
"https_port": 444
I rebooted the IIS server and if i try to run https://localhost:444 i got :
HTTP Error 503. The service is unavailable.
I searched about how to enable https on IIS for asp.net core and i only got some tutorials with heavy code modifications. I'm looking for the "simplest" way to enable https and i wonder if i could enable https only through modify IIS configuration.
Is it possible ?
I use .net core app 3.1
Thanks a lot guys :)

HTTP Error 403.14 - Forbidden - ASP.NET Core 3.1 MVC

I have an ASP.NET Core 3.1 MVC application connected to a SQL database and it's
working perfectly when I launch it from Visual Studio with the IIS
Express profile.
I'm trying for more than a week just to publish it on IIS on my dev machine and I keep getting the error
HTTP Error 403.14 - Forbidden
I've done the below troubleshooting and searched for more with no result.
I make sure that my Windows account is a member of the administrators and IIS_users.
Install from Windows feature IIS services as attached picture.
Install SDK and .NET and runtime packages.
Made sure that the .NET Framework version value is v4.0
Note: after publishing to a folder, I deleted the web.config file since it's .NET Core 3.1.
note2: I have added a screenshot of my IIS how it looks after adding the website on it.
Please guide me on how could I fix this and many thanks in advance.

MVC .NET Web service no access to Sharepoint Site on deploy mode

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

Running ASP.NET MVC 6 Web API from IIS

I create a MVC 6 Web API project that is running as expected from Visual Studio, when I'm however deploying to production I'm getting a
An error occured while starting the application
error.
I did the following on the production machine
Installed ASP.NET 5 from https://get.asp.net
Made sure that the production environment is running the same dnx version
that the application was published with
Installed HttpPlatformHandler 1.2
Set the application pool .NET CLR Version to No Managed Code
Pointed the root location to the wwwroot folder
Is there anything else that I'm missing?
When you run into 500 errors, remember that ASP.NET 5 application can be self hosted,
Open a command prompt
Browse to the application directory
Type in web.cmd
I had some reference problems within my application that was listed in my command prompt which I subsequently fixed and everything worked as expected.
500 can be thrown by different failures. Take a look on http://docs.asp.net/en/latest/publishing/iis.html what u've missed in your configuration.
And you should call it ASP.NET Core 1

Categories