In the past, my web applications use a MembershipProvider inherited from ActiveDirectoryMembershipProvider. With OWIN in place in MVC5, I understand we are not supposed to do it the old way.
The problem came when I tried to create a new application. It asks for "On-Premises Authority" and "App ID URI"!
In the past, our custom membership provider just make queries directly from the database. No WS service is in place. Is there a way we can do the same for an MVC5 application?
Related
I'm building an application with two parts: a windows service that runs all the time with the ability to email people when a notification arrives for them and a CRUD application built in Blazor in which they can see their notifications.
Right now I have my windows service working with my DB so it knows when something new is added. I was wondering if it would be possible to have my windows service tell my CRUD application when a new entry is added to the DB so I don't need a bunch of DB connections for each user of the CRUD application.
I can just use the one in the windows service and just tell all the CRUD apps to update when a new row appears in the DB using the service. I've been doing some googling but haven't found any great answers yet.
I have built a small web application with asp.net core 2.0 MVC. In this web application, I did not implement any authentication methods so far.
Right now I have an MSSQL database running in the background and I can add/view/edit/delete users from the database.
I adapted this tutorial and followed it pretty closely. However I also added some functionality like localization and stuff, and everything is running pretty smoothly.
My next goal is to enable authentication and authorization. The authentication part shall be straightforward. The goal is that the application will be running as an intranet solution. This means the authentication method just shall check if the Windows User is existing in the previously mentioned database. I don't want to create a separate login. However, it might be that there is a Windows user in the active directory, which is not part of the database. This User should just be able to see a default error page.
I made quite a huge research and I also tried a lot of different stuff, however, I do absolutely not find any "database first" tutorial for this part or any other documentation which explains what to do.
I actually "just" want to teach the asp.net core 2.0 identity framework that it shall look into my user-table and check if the current windows user is existent and if not to forward him to the error page.
A second step would be to load all the roles which this user is assigned to from the mapping table.
Any kind of help would be highly appreciated.
Dosc Microsoft has a lot of posts regarding authentication for ASP.NET Core. Here are some of the links to get you started:
ASP.NET Core Authentication
ASP.NET Core Authentication Identity
and a lot more.
I am new in MVC3. When i create a new default ASP.NET MVC 3 project template.
There is a AccountModels.cs and AccountController.cs C# class that handle data from a ASPNETDB.MDF DB file, there is a connection string (XML) in Web.config file, but i can't understand how it handle those data where is the Query or LINQ, How AccountModels.cs or AccountController.cs file know those DB tables Can anyone make me understand step by step? please someone help me please.
Sorry for my bad English.
It is using Microsoft Membership Provider.
From the doc:
ASP.NET membership gives you a built-in way to validate and store user
credentials. ASP.NET membership therefore helps you manage user
authentication in your Web sites. You can use ASP.NET membership with
ASP.NET forms authentication by using with the ASP.NET login controls
to create a complete system for authenticating users.
Basically it has quick straight forward configuration and creates a couple of tables in your database to keep user data.
It is flexible, but the interfaces are not very well segregated and if you need to extend it or plug your custom logic you may end up defining a tons of method throwing "Not Implemented" exception
I am trying to convert an existing silverlight application to use a MVC web application versus a regular asp.net web application.
I have taken a look at fiddler and it is not able to access the domain service methods as the service does not exist (this is because these files are autogenerated once they are called with ria services). But with MVC since it looks for the controller if files don't physically exist we are getting this error.
I have tried to ignore svc files by:
routes.IgnoreRoute("{allsvc}", new { allsvc = #"..svc(/.*)?" });
and also have tried;
http://xamlcoder.com/blog/2010/01/15/upgrading-to-wcf-ria-services-asp-net-mvc-2/
With no success. Has anyone been able to successfully do this, if so, how?
Thanks in advance.
Using the Silverlight Business Application template in VS2010 creates a nice default solution with a Silverlight project and an ASP.NET project. It also automatically provides some nice authentication that seems to store usernames/password/etc for newly registered users into your local SQL Server database.
Is it possible to customize the storage mechanism? I already have a data store elsewhere and want to handle the adding/removing etc of details myself.
Yes, you can. WCF RIA Services is using the default ASP.NET Membership provider. So search on the web on how to modify them (via web.config) to connect to another source and it will be transparent for the SL/WCF RIA Services application.
For instance, I've connected them to the Azure Storage (table) instead of the default ASPNETDB database on this application : http://cloudypizza.cloudapp.net . You can test it by creating your own account on clicking on "login".
I've briefly explained how I've done it here on my blog (in French only sorry)
Regards,
David