When I am trying to add SignalR in our existing web application (with MVC 4) I am getting below error message on page load.
Message: Unable to get value of the property 'signalR': object is null or undefined
URI: http://dev.casino.bwin.com/signalr/hubs
I tried to navigate to signalr/hubs jquery and it seems to be working fine as my client hub class is available in the javascript.
Any pointers on what i might be doing wrong.
You should be including "Scripts/jquery.signalR-1.0.1.min.js" after jQuery but before the "/signalr/hubs" script.
Look at Javascript + HTML Client section of http://www.asp.net/signalr/overview/signalr-20/hubs-api/hubs-api-guide-javascript-client for reference.
Related
I am working on a custom action for our company's shopping cart website. It is a software that is installed and setup, and we are able to add to it by creating custom actions. I created an ASP.NET (web forms) page that uses SignalR to add to it, but whenever it tries to grab an instance of the hub within javascript, it is always undefined.
In Chrome, I can see signalr/hubs, and there are no 404 not found errors on the page either. It works perfectly fine when running it in debug from VS 2012, but not from within the web site on the server.
I am certain I have deployed all the necessary components, and have tried many approaches to changing the way it finds the hub, but nothing seems to work.
I can provide code samples if needed.
I found the issue. It was related to the name of the hub being misspelled in javascript. Once that got fixed, then the function name needed to be changed in javascript so the first character is lowercase. It is working as intended now.
I have already a web application in mvc 4. My SSRS reports are available in different server. I am trying to show the report in mvc application. Please find the steps which i followed to show the report.
Created a aspx page which contains the report viewer
Added the controller in mvc
Calling a view page from the controller
From the view page i am importing the aspx page using html.partial("aspxpagenamewithoutaspxextension")
When i run the action, I am able to see the report with the parmaters.
After i chosen the parameters, when i clicked on the submit button i am getting the following javascript error.
Sys.WebForms.PageRequestManagerParserErrorException: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.
Please help me to fix this issue. In case if you need more information this i will give.
I was receiving this error and once change we made on the RDLC was to set the property ReportViewer.AsyncRendering=false and that solved the issue for us. By default the ReportViewer.AsyncRendering is set to true which I believe has dependencies on AJAX controls to do what it needs to do... for that reason we set the rendering to false.
You can probably try that and let me know.
I am trying to create a chat application using signalR using VS2012 web in a website.
But its showing me error like this:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:50780/WebApplication1/WebApplication1/signalr/hubs
Uncaught TypeError: Cannot read property 'client' of undefined
I have added RouteTable.Routes.MapHubs(); to Global.asax
But why should its showing me this error when its opening for other's system.
On the page where you're including signalr/hubs:
Change your script tag to look like this:
<script src="~/signalr/hubs"></script>
#drch's answer is also correct (if you're making that mistake) but the more common issue I see is people just doing "signalr/hubs" in their script tag and then the hubs url is then incorrect (in some circumstances).
Ultimately the hubs url resides off of the SignalR endpoint so doing a "~/signalr/hubs" makes the path app relative which should ensure that it retrieves the hubs.js from the correct url.
I know, that I'm late, but for smbd who will finding answers:
I've resolved the problem by registrate .Net frame work to IIS.
Do next steps into console (Win+R):
cd %windir%\Microsoft.NET\Framework\v4.0.30319
aspnet_regiis.exe –i
Source
I'm getting the dreaded "Microsoft JScript runtime error: 'Sys' is undefined" error while trying to develop a site in ASP.NET on .NET framework 4.0. This was working fine until I tried programmatically adding items to a menu, and this started happening. While debugging, I pointed Fiddler at my app and found that the request for the WebResource.axd is returning successfully (code == 200), but the response text is the whole html page and NOT the javascript that it is supposed to be returning, and this is why Sys is undefined.
What's going on here? Any help much appreciated. Thanks.
Solved, thanks to this. I'm using ASP.NET Routing, and I was routing root level requests like http://www.mysite.com/{PageId}, and this matching pattern is so general that it was also matching the request for /WebResource.axd, and that's why the page request for the axd file was being routed to an aspx page instead of the usual handler. Not what I would have expected, but I can see the logic.
The fix is to tell the routing system to ignore this particular kind of request:
RouteTable.Routes.Ignore("{resource}.axd/{*pathInfo}")
I developed an asp.net mvc application. In one of my forms, I'm getting a following
exception:
A public action method 'UpdateBasket' could not be found on controller 'App.Controllers.WebShopController'
But the funny thing is, that form submit works (even in debug mode) and finds an
ActionMethod UpdateBasket and returns View.
The problem is that because of that html generated error
w3c validators and google crawlers can't access the site (I think so, correct me if I'm wrong).
Has anybody got any idea why this error occurs? Thank you.
Perhaps you're using Google Chrome to view the page source and you're encountering its tendency to reissue a "get" request for a post-only URL that your browser just "post"-ed to?
This is the best description I've found.