asp.net membership with MVC4 - asp.net-membership

I have a project running on production with asp.net.
Now I need to create another project to administrate the site. So I decided to go with MVC4.
I have to use the same database, which has all the membership tables (aspnet_users and etc).
BUT MVC4 uses only 6 tables (Memberships,Profiles, and so on) with no 'aspnet_' in the left.
Now my problem is when I try to validate(Membership.Validate(username,password)) users in the existing database, the provider don't find the users. Because the provider is trying to search in the 'Memberships, users' table not in the 'aspnet_membership, aspnet_users' table.
In this case how would I integrate a new MVC4 project with my existing database ??

MVC4 / .NET 4.5 Membership provider uses SimpleMembership which has different table structures entirely.
However, it is apparently possible to change your provider back to the old .NET 2 provider in your web config - see here.

Related

ASP.NET Core Identity in existing database not working

I am using Identity to create user accounts within my ASP.NET Core application, i already have a database. I followed this tutorial to achieve this task. All the table are created correctly after migration and i scaffolded Identity with the following command since i already have a database:
dotnet aspnet-codegenerator identity -dc WebApp.Models.ApplicationDbContext --files "Account.Register;Account.Login;Account.Logout"
After running this command the Areas folder with its files are created correctly. But when i run the application and click on Register the Register page is not displaying just the url changes but nothing appears
Same thing occurs when i click on Login.
Where is the problem?

Database system in website builder such as Wix or Squarespace

Are you familiar with website builder?
There are bunch of website builder companies such as wix, squarespace, duda, odoo,shopify, weebly...
Here, when we create account first, they assign subdomain of their website.
For instance, companyname.shopifyapp.com, xxx.squarespace.com
I think there are over 1 million customers for some websites.
Can anyone tell about database system of those websites?
If new customer signup and get his website, then will they save all his data in one big db including website template, setting and so on ?
I think if then, we can identify all data by subdomain or user id in one db.
Or they will generate code and database dynamically for each user?
Thanks.

MVC4 application can not see any membership section

Just installed VS 2012(Ultimate) and created a MVC4 application.
When I looked into web.config, I can not find any membership, role or profile providers sections.
Curious to know where they are set.
Thanks.
Actually it takes the value from machine.config. And the default provider is 'AspNetSqlMembershipProvider'
Thanks

How to publish MVC3 project on IIS 7

Hello everyone I want to ask how to publish a MVC3 project on IIS 7
I have done these steps:
Installed neccessary dlls
Microsoft.Web.Infastructure
System.Web.Helpers
System.Web.Mvc
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Deployment
System.Web.WebPages.Razor
Changed Framework
But it still does not publish
When you deploy it you can keep your projet in root folder where local disk C: or whatever and please dont forget to which framework you are using and you can change the framework at application pool
Requested URL: /Views/Home/Index.cshtml
Your requested URL is wrong. You cannot directly access Views. You should pass through a controller action, so the correct url that you need to type in your browser is /home/index.
You may take a look at some of the tutorials about ASP.NET MVC here: http://asp.net/mvc

Implementing a Role Based Login with Menu in ASP.Net MVC3?

Hi all this is the first time i am working on an MVC application,can any one provide me some ideas it will be greatfull...i have to develop a page where
How can I implement role based login to users with the menu assigned to them in asp.net MVC 3. Consider I have three table UserInfo(UserId, UserName, Password,RoleId,MenuID) and Role(RoleId, RoleName).,Menu (MenuID,MenuName).
I want to validate user from Database(UserInfo Table) and also want to retrieve roles from that table. And want to use like ,how i ahve to design my project and controllers,views and models
Need your help and idea....
you can use .net login control for log in and manage the roles.
Open your application in VS2010 then go to to Project menu then open the ASP.Net Configuration, and add roles as per you need.
Roles.IsUserInRole("RoleName")
like this you will check the logged in user role and change your menu setting.
Hopefully this is helpfull for you.

Resources