I'm programming an angularJS single-page application on ASP.net, using signalR to communicate with the server hosted on Windows Server. It works perfectly on IIS express through visual studio, but does not working when deployed on to local IIS (10.0). I've been trying to solve this issue for two days now, and I have gone absolutely nowhere with it. I also use a generated hub proxy. Here's what I've tried:
-Installed ASP.net
-Ensured all IIS/.NET features were installed on Windows Server
-Validated that the Application pool is .net 4.0 Integrated
Here's my startup class:
using System;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(Quoting.Startup))]
namespace Quoting
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
var hubConfiguration = new HubConfiguration();
hubConfiguration.EnableDetailedErrors = true;
hubConfiguration.EnableJavaScriptProxies = true;
app.MapSignalR();
System.Diagnostics.Debug.WriteLine("SignalR Mapped");
}
}
}
I have tried each of the following, plus every possible combination from older versions of MVC which is not what i'm even programming in...
<script src="/signalr/hubs"></script>
<script src="~/signalr/hubs"></script>
<script src="signalr/hubs"></script>
<script src="/hubs"></script>
<script src=".../signalr/hubs"></script>
<script src="{{appname}}/signalr/hubs"></script>
I have this in my web.config:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
</modules>
</system.webServer>
Jquery:
<script src="Scripts/jquery-3.4.1.js"></script>
<script src="Scripts/jquery.signalR-2.4.1.min.js"></script>
<script src="Scripts/jquery.signalR-2.4.1.js"></script>
<script src="/signalr/hubs"></script> //note: this is what works on IIS express
I'm pretty lost. When I enter in the browser 'localhost:port/signalr/hubs', I get a response on IIS express. However, doing so with my domain, '{domainname}/directory/signalr/hubs' gets 404 not found, and every single combination I can think of will also return 404.