SignalR 3.0.0 won't generate the Javascript hub proxy - signalr

I'm using a new build of 3.0, which is not RTM (December 2015), with the RC1 bits of the rest of ASP.NET 5. I have the .AddSignalR() method in my start up, but I'm not getting the /signalr/js proxy. It comes up as 404. Any suggestions?

You need app.UseSignalR() also in your Startup.Configure().

Related

How Syncfusion.blazor could work using refrences?

image view
i have installed syncfusion.blazor component from nuget package and its updated in references, but when I am trying to use it its showing refrence couldnot be found, what could be the possible reason and solution ?
From what I've tested, it looks like you created a blazor webassembly app based on .Net Core 3.1(out of support).
But if you check the syncfusion.blazer 20.4.0.50 nuget package, you can find that it is based on .Net 6.0 or .Net 7.0.
At least try to use .Net 6.0, .Net Core 3.1 is out of support.
Based on the given screenshot, you have registered the Syncfusion Blazor service in the server project (DMSBlazor.Server). To resolve this issue, you should register it in the client project's ~/Program.cs file. For more details, refer to this link.

.NET Core 5.0 Console with WebAPI

I once build a .NET Core Console App that contained a web host, so I could make controllers without using IIS. Isn't that possible in 5.0?
I need it to run as a service later. It used to be so easy :-)
I can't find any guides to that, but I can find guids addressing version 2.1.
Latest .NET Core project templates (and .NET 5 ones) use Kestrel by default.
You can find the related documentation here.
You can also find here specific documentation about running ASP .NET Core as a service in both Windows and Linux, and in the case of Windows, with and without IIS.

ASP .NET 2.0.50727 in the server response header. How to be sure is EOL?

I found this version of ASP .NET in the header Server as a response from a web server. How can I verify if this version has still an active support or it is ended? On the microsoft website I can't find official info on this specific version.
I did a quick google and I quickly found this
https://support.microsoft.com/en-us/lifecycle/search?alpha=.net%20framework
Support for .NET Framework 2.0 ended on July 12, 2011.
Which is for all versions of it.
You should try to move up to 3.5 SP1 at minimum.

SignalR support in .NET 4

Does SignalR support .NET 4.0. Or is it support only from .NET 4.5 upwards. Is there any link which provides with minimum requirements for SignalR.
This is not the case any more, and the 2.x releases require .NET 4.5.
https://github.com/SignalR/SignalR/issues/1723
The last .NET 4.0 support for SignalR is version 1.2.2. Version 2 only works with .NET 4.5
Open the NuGet Package Manager Console and type:
Install-Package Microsoft.AspNet.SignalR.Client -Version 1.2.2
Install-Package Microsoft.AspNet.SignalR -Version 1.2.2
This will install the SignalR (Client and Server) in your selected project (web project) automatically.
Yes .NET 4.0 supports SignalR. The minimum requirements:
*Visual Studio 2010 SP1
*Since template installer is not available in VS2010 you need to install SignalR NuGet package
One thing to watch here is client/server .Net versions.
Most people know (but it's worth repeating) signalR can be hosted on Windows 2008R2 upwards. Windows 2008R2 has IIS7 and thus when hosted on IIS7 signalR cannot use WebSockets (as the old Windows http stack has no support for WebSockets). So that's ServerSentEvents or LongPolling. Not great for performance.
Windows 2012 upwards (and thus at least IIS8) offers support for WebSockets, which gets the amaziong C10K perf we're all after.
Now the interesting bit.
.NET clients.
If you only care about the browser skip this bit.
Any .Net clients that connect to a signalR back-end MUST use
Windows8 upwards to use WebSockets The Microsoft networking stack (for
.Net) in Windows7 does not contain WebSockets.
So don't use signalR with WebSockets if your client is Windows7.
OR... like us you'll need to use a custom WebSocket stack coupled with WebClient to handle the http handshake.
Hopefully this will help someone else!
You can download entire web stack from codeplex and SignalR from github and compile it under .net4.0
There is one sample project at http://www.bluelemoncode.com/2013/02/default.aspx
It is good SignalR sample and working vs 2010 sp1 and .net framework 4.0. working properly.
http://www.bluelemoncode.com/file.axd?file=2013%2f3%2fSignalR_OneOneChat.zip
The minimum requirements for SignalR is described here,
Which means your client can be WinForm/WPF application running on Windows XP.

ASP.net error message when using REST starter kit

I've written some code using the REST starter kit and it works fine on my development machine. However, when I upload it to our server the page gives me the following error message...
CS1684: Warning as Error: Reference to type 'System.Runtime.Serialization.Json.DataContractJsonSerializer' claims it is defined in 'c:\WINNT\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll', but it could not be found
I've removed code line by line and it appears that the following line of code is triggering the error...
HttpContent newOrganizationContent = HttpContentExtensions.CreateXmlSerializable(newOrganizationXml);
Really haven't got a clue how to fix it. I assumed it might be because it needs a newer version of the framework to run, but looking in IIS it says it's running version 2.0.50727 which I think is the lates version because it says that even when we're using framework 3.5
Very confused, any ideas?
Jon
At first I thought this was possibly because the server you're deploying to didn't have .NET Framework 3.5SP1 installed and only .NET 3.5RTM.
However, upon checking a .NET 3.5 RTM System.ServiceModel.Web.dll assembly I see that the System.Runtime.Serialization.Json.DataContractJsonSerializer is actually defined.
The compiler warning CS1684 suggests that there is a System.ServiceModel.Web.dll assembly in the server's GAC, but one that doesn't have the System.Runtime.Serialization.Json. DataContractJsonSerializer defined.
So things I would check:
Check that the deployment server is running at least .NET 3.5 RTM and that a beta or release candidate isn't in use or hasn't been left over.
In Visual Studio 2008 make sure you select a "Target Framework" of .NET 3.5 in the project properties.
One final check you could do to see if the problem lies with the server's framework install is to knock up a simple application to consume the DataContractJsonSerializer directly. There's an example on the MSDN documentation page for the class:
DataContractJsonSerializer Class (MSDN)
As a last resort, if the server is under your control then I'd uninstall .NET Framework 3.5 and then re-install from:
Microsoft .NET Framework 3.5 Service Pack 1 (Full Install)
Update:
As per your comments:
If you're running a beta of 3.5 then chances are that DataContractJsonSerializer isn't in the System.ServiceModel.Web.dll assembly.
I seem to remember back around the CTP, betas and release candidates there were late breaking changes in this area. I vaguely remember the DataContractJsonSerializer was one of these late additions/changes due to the increased popularity of JSON and community pressure. My memory is a bit vague but it rings a bell.
To replace the DLL you need to unregister the current version from the GAC then register the RTM one using the GACUTIL.exe tool. I wouldn't advise mixing RTM and beta bits, you're leaving yourself open to unpredictable behavour.

Resources