I'm a newbie when it comes to web hosting/deployment, and I'm trying to understand something about that. I have developed a very basic Web API and Web App in ASP .Net Core 2.0. I would like to upload both of these to my web server (a very basic shared hosting Windows server with a company called HostKing). I would like to copy the Web API to a folder called 'api' and the Web App to a folder called 'app'. So, one would go to httpdocs/api and the other to httpdocs/app. If I publish the API to httpdocs, it works and I can access just fine. For example, I can call the "values" endpoint via a GET request to www.mydomain.com/api/values. But if I publish it to httpdocs/api, then I get a 404 - File or directory not found. when calling www.mydomain.com/api/values
I'm not very clued up about deployment/hosting, but I read that you cannot just create directories and expect them to work - you have to create a "virtual directory" in IIS and map it to a physical directory? So I created a virtual directory called api in my Plesk control panel, but I still cannot access my API. I'm obviously doing something wrong, but being so ignorant in this, I cannot figure out what it is.
P.s. I copied an image into the httpdocs/api directory, and this I can access (viawww.mydomain.com/api/pic.jpg)
The root web.config (in httpdocs) looks like this:
<?xml version="1.0" encoding="utf-8"?><configuration><system.webServer><handlers><add name="aspNetCore" path="C:\Websites\eball.co.za\httpdocs" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /></handlers><aspNetCore processPath="dotnet" arguments=".\eBall.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" /></system.webServer></configuration><!--ProjectGuid: ccf466e4-3193-4fa6-9140-04b89af4c0fc-->
I have no other we.config files anywhere other than this root one.
Any ideas anyone? Thank you...