Is it possible already to use ASP.NET 5 aka ASP.NET Core 1.0 with SignalR?
I saw that it's not yet implemented, but there's a SignalR.Server (version 3) repo on github. It contains a couple of samples, but I cannot yet find a full sample with a controller with a hub... :(
I've managed to find examples of how to add SignalR to the project.json file with the line "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final", I have added services.AddSignalR() and app.UseSignalR() to my Startup.cs file, I have also injectd the IConnectionManager into the controller, but I have no idea how the controller then goes about sending data to clients...
Here is several samples for SignalR 3.0:
Any samples for mvc6 with signalr?
The ASP.NET 5 (vNext) application sample, Real-Time Data Editing
ASP.NET 5 and SignalR 3
Update (09/17/2016): Here is sample for ASP.NET Core RTM 1.0 :
GETTING STARTED WITH SIGNALR CORE
Related
You might ask why I would want to use old SignalR in ASP.Net Core. Well, I have an old MVC 4 app that I cannot completely rewrite and want to use it in conjunction with a new ASP.Net Core 3.1 app with the 2 apps potentially communicating via Web API and SignalR. Since ASP.Net SignalR is not compatible with Asp.Net Core SignalR I would need to run ASP.Net SignalR in my ASP.Net Core app. If this is not possible, then I certainly could not write the new app in ASP.Net and not ASP.Net Core. Just trying to understand possibilities.
After a little further work, I don't believe that this is possible
I am a bit confused as to why there is no Individual User Accounts authentication option in the latest ASP.NET Core Web API template.
Is it still possible to implement individual user accounts the way that the MVC template does or would it not make sense?
Let's say I am creating a stand-alone web API that is going to have all of my business logic and data layer that accesses the database which has the AspNet Identity tables. I plan on making calls to this API w/ an MVC app.
I know one way of doing this is to create an asp.net MVC app w/ individual user accounts auth and simply build the API right within the MVC app using a controllers/api folder. However, I don't want to do it this way because I want the API to be its own standalone project that can be hosted on a completely different server and accessed by multiple applications, not just an MVC app.
Can someone lead me in the right direction on how authentication typically works in this scenario since there is no template?
Individual User Accounts authentication option for the ASP.NET Core Web API is available in .NET Core 2.0 Preview 1.
Unfortunately .NET Core 2.0 Preview 1 isn't available in VS 2017 release.
But you can install Visual Studio 2017 Preview (you can use it side-by-side with VS 2017 stable version) :
I think you can use IdentityServer4 which allows implementing single sign-on and access control for ASP .NET Core Web APIs using protocols like OpenID Connect and OAuth2. It offers integration with ASP.NET Core Identity and Entity Framework Core.
You will need to install to the following nuget package:
Install-Package IdentityServer4
and add the IdentityServer middleware to the HTTP pipeline:
app.UseIdentityServer();
You can find several quick start samples here or follow this article.
I'd like try out MVC 6 on a new project, but one of the requirements is using ADFS for authentication. Is this possible yet with MVC6? I tried using Microsoft.Owin.Security.WsFederation in an MVC6 project, but I get the following error:
Failed to resolve the following dependencies for target framework 'Asp.Net,Version=v5.0':
Microsoft.Owin.Security.WsFederation 3.0.0
Does anyone know if there's a ASP5MVC6 compatible package for ADFS auth?
ASP.NET 5 (including ASP.NET MVC 6) does not yet have support for ADFS authentication, but it is in the plans (I work on the ASP.NET team).
This question might be ridiculous. Sorry for that.
I have worked with ASP.NET MVC application. Now I would like to start with AngularJS and ASP.Net Web API 2 in my next web application.
In my previous MVC projects, I selected Empty with the MVC checkbox checked.
What project template should i choose to start with?
Thank you.
There is the AngularJS SPA Template available in MSDN.
It has already 18K downloads, used by many, and constantly updated (last update from two weeks ago).
To add WebAPI 2.0, just right-click on the project > Manage NuGet Packages > Find and reference Microsoft ASP.NET Web API 2.1 Web Host
Then activate it in Startup.cs
Select
New project/Web/Asp.NET web application
Then select WEB API (you can change authentication from here)
Your project is created.
Now open nugget packages manager and update to "Microsoft ASP.NET Web API x.x" (currently 2.2).
I'm working on a API and using ASP.NET Web API in order to expose it. I tried to add a service reference to a Named Piped service that is responsible for authentication and authorization, but I couldn't reference it on my code.
That Named Pipe service is working properly and is used on a wide variety of projects. That is the first time we try to use it with ASP.NET MVC 4. It's working very well on another project that uses ASP.NET MVC 3.
Like you could see on the following image, I'm able to add the service reference. But It didn't appear on Object Browser or auto-complete!
When I try to invoke that service, it just does not show up anywhere.
It appears to be a problem with ASP.NET MVC 4 projects and Named Pipes service references.
I really don't know if that is a well know / documented behavior, but I wasn't able to find anything useful related to that question on the internet.
I could add a reference to that service using Visual Studio 2012 on any kind of project, except ASP.NET MVC 4 ones. The problem is specifically related to ASP.NET MVC 4 projects.
I tried to add the reference using Visual Studio 2010 and I had the same problem: working pretty well with ASP.NET MVC 3 and any other kind of project. Again, the problem is specifically related to ASP.NET MVC 4 projects.
Is anyone having the same problem? How could I go through it?
Since it appears to be a Visual Studio / ASP.NET MVC bug I just found an workaround.
I just figure out that I could use svcutil command line tool in order to generate the code for service client and data structures. Here are the syntax for the command:
> svcutil net.pipe://my_sevice/mex /namespace:"*, MyNamespace"
It generated the following files:
SecurityService.cs
output.config
Then I just imported the generated SecurityService.cs file into my current project and did a merge of the binding configurations available on the generated output.config with my own web.config.