Setup .net REST API in IIS

I am currently hosting an API as an Azure App service. But I want to move it into my Virtual Machine and run it in IIS.
I already set it up as I would with any website but for some reason the page does not come up. Is there anything in specific I need to do to run the service?
LVL 1
AleksAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kevin CrossChief Technology OfficerCommented:
What do you currently have setup/enabled in IIS?

For example, if you developed this as ASP.NET Web Api using .NET 4.0, something like this walkthrough may help.
http://www.c-sharpcorner.com/UploadFile/2b481f/how-to-host-Asp-Net-web-api-on-iis-server/
Pay close attention to sections like #4:
Now edit the "Basic settings" in the "Edit Application Pool" in the right panel. In it we select the ".NET Framework version" that is ".NET Framework v4.0.30319" and "Managed pipeline mode" as "Integrated".

In addition, make sure that when you installed IIS, you enabled ASP.NET as shown in https://docs.microsoft.com/en-us/biztalk/core/how-to-enable-asp-net-4-0-for-published-web-services.  Specifically, your App Pool must be set to the correct version of .NET and IIS itself must have the ASP.NET extensions enabled/allowed under ISAPI and CGI Restrictions.
0
AleksAuthor Commented:
I appreciate it. Ill try it now.
0
AleksAuthor Commented:
That is pretty much the same way I would setup a website but I get this:

HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Kevin CrossChief Technology OfficerCommented:
What is the default page name?  Make sure that name is in the list of default documents within IIS.  If you are wanting to allow directory listing in certain folders, you will have to set security for it to do so.  In other words, the error is guiding you correctly here.
0
AleksAuthor Commented:
Where is the default document usually?  I got the source files of the Visual Project but I am not familiar with the structure.
Should I point to the bin/release folder?
0
AleksAuthor Commented:
Can I copy the files used to create the project or should I publish it locally and then copy the files to the server?
0
Kevin CrossChief Technology OfficerCommented:
You should be publishing it, correct. Or at least bringing over valid web files and not the Visual Studio project related files.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AleksAuthor Commented:
Ok. I just did that, but I am getting page cannot be found. do you know usually to which directory i should be pointing ?
0
AleksAuthor Commented:
Publishing to the website directly worked.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
iis7

From novice to tech pro — start learning today.