0

I am using webforms and whenever I load page for the first time, console says signalr/signalr/hubs not found.

I have Startup.cs

public void Configure(IAppBuilder app)
{
   app.MapSignalR();
}

When problem remained the same, I added "IAppBuilder app" parameter to Application_start in my Global.asax.cs file and inside I wrote app.MapSignalR();

My javascript on page load :

<script src="/Scripts/jquery-1.6.4.js"></script>
<script src="/Scripts/jquery.signalR-2.4.1.js"></script>
<script src="/signalr/signalr/hubs"></script>
<script type="text/javascript">

    $(function() {
    });

</script>

Can't find hubs folder in file structure

UPDATE : I found out that it's an auto-generated file.

I replaced

<script type="text/javascript">

with

<script src='<%: ResolveClientUrl("~/signalr/hubs") %>'></script>

Still nothing.

Guga Todua
  • 462
  • 2
  • 11
  • 27
  • Have a look here: https://stackoverflow.com/questions/18143599/can-signalr-be-used-with-asp-net-webforms to the @objectNotFound response to that question. – Kiril1512 Feb 11 '20 at 15:45
  • @Kiril1512 Did everything it says. Problem remains the same. signalr/hubs is not found on localhost:1234/signalr/hubs. Path seems correct. – Guga Todua Feb 12 '20 at 08:39

0 Answers0