Currently I am creating a chat. I want to use AspNetCore (2.2) SignalR. I have followed the instructions on https://learn.microsoft.com/en-us/aspnet/core/tutorials/signalr?view=aspnetcore-2.2&tabs=visual-studio but now I am facing the following issue: When I run my client in IIS the following error occurs:
ReferenceError: signalR is not defined[Learn More] script.js
anonymous http://localhost:20610/js/script.js
I searched the web and found out that in NodeJS you have to use
const signalR = require("@aspnet/signalr");
But in my case I am using plain javascript so I thought I don't need to add this line. Am I right?
Here is my html and the beginning of my js code:
<head>
<title>abc</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style/style.css">
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/signalr.min.js"></script>
<script src="js/script.js"></script>
</head>
var connection = new signalR.HubConnectionBuilder().withUrl(base).build();
Are there any suggestions how to get this working?
Thanks :)