I write an asp.net 4.0 web application, signalr2
, and after many trials and getting the 404 Error I decided to change my scenario of signalR
to a very simple sample in order to fix the issues on my server.
I was getting Error 404 for http://subdomain.domain.com/signalr . However, this sample works smoothly on my local computer.
<modules runAllManagedModulesForAllRequests="true"/>
route.maphub()
with cross domain origin in global.asax
I was trying all listing article but am getting Error 404. Also see Github signalr FAQ and StackOverflow Article .
Finally, I want to know if maybe the IIS directory browsing with disable status can cause this issue?
MapHubs is a version 1 method- you need to use MapSignalR instead if you're using SignalR 2. See the upgrade tutorial for details:
Are you able to access your hubs folder? In Chrome (not IE, since it will just try to run the JS), navigate to /signalr/hubs on your server. This should show a JavaScript file.
Also, try adding these to your application's Startup class:
app.UseWelcomePage();
This should add a default page to your root directory.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.