We were not able to get the OWIN Web API service deployed using the Windows service (as described in https://stackoverflow.com/a/167379/ ). After numerous attempts to solve the problem, we decided to simply create an ASP.NET web API site and deploy it through IIS.
When launched locally, all actions are reachable. However, if we publish a site (using Build → Publish or any version of it), we observe the following:
- When we get to the machine name and port, we will be presented with a list of directories for the virtual directory.
- When we request a controller action, the site returns an HTTP message of 503. The service is unavailable.
- Errors are not logged in the Windows application event log on the target server.
- The same thing happens when the request is executed on the hosting server or on the client machine.
The ACL URL was created as follows:
netsh http add urlacl http:
The firewall does not block the port (since we can go to it through step 1 above). The ACL URL exists, and everyone in the company has access to it (as they should). We do not know why this is happening, and cannot find a suitable answer.
Can anyone suggest a reason or a possible solution that we could miss?
UPDATE
The following (abbreviated) warning information appeared in the Windows application event log after removing logic from controllers and republishing it:
Event code: 3005
Event message: An unhandled exception has occurred.
Exception information:
Exception type: HttpException
Exception message: Could not find a part of the path 'D:\websites\LoggingWebApi\bin\roslyn\csc.exe'.
It is interesting. Publish doesn't seem to be distributing the Roslyn compiler with the assembly.
2
:
[HttpGet]
[Route("Status")]
public string Status()
{
return "Online";
}
Roslyn bin HTTP 503. .
( ), JSON, .