trying to login admin panel error
The view 'Login' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/admin_Login/Login.aspx ~/Views/admin_Login/Login.ascx ~/Views/Shared/Login.aspx ~/Views/Shared/Login.ascx ~/Views/admin_Login/Login.cshtml ~/Views/admin_Login/Login.vbhtml ~/Views/Shared/Login.cshtml ~/Views/Shared/Login.vbhtml
Hello @techliferestore ,
To cater for the error, please consider registering a role, then an admin account into the database directly. Ensure you also add an employee by directly mapping the Employee creation file into the main page. Once done, all is sorted.
Regards.
Can you help me how to connect the db with the project or how to get started with the project. I didn't know R49_MyEcommerceDB file and MyEcommerceDbContext is the same? I have restored R49_MyEcommerceDB in sql server; add new model of data with R49_MyEcommerceDB in visual studio but can't not run. It has the error like this
System.Data.Entity.ModelConfiguration.ModelValidationException: 'One or more validation errors were detected during model generation:
MyEcommerceAdmin.Models.admin_Employee: : EntityType 'admin_Employee' has no key defined. Define the key for this EntityType. MyEcommerceAdmin.Models.admin_Login: : EntityType 'admin_Login' has no key defined. Define the key for this EntityType. MyEcommerceAdmin.Models.genPromoRight: : EntityType 'genPromoRight' has no key defined. Define the key for this EntityType. MyEcommerceAdmin.Models.OrderDetail: : EntityType 'OrderDetail' has no key defined. Define the key for this EntityType. MyEcommerceAdmin.Models.RecentlyView: : EntityType 'RecentlyView' has no key defined. Define the key for this EntityType. MyEcommerceAdmin.Models.PaymentType: : EntityType 'PaymentType' has no key defined. Define the key for this EntityType. MyEcommerceAdmin.Models.ShippingDetail: : EntityType 'ShippingDetail' has no key defined. Define the key for this EntityType. MyEcommerceAdmin.Models.genMainSlider: : EntityType 'genMainSlider' has no key defined. Define the key for this EntityType. admin_Employee: EntityType: EntitySet 'admin_Employee' is based on type 'admin_Employee' that has no keys defined. admin_Login: EntityType: EntitySet 'admin_Login' is based on type 'admin_Login' that has no keys defined. genPromoRights: EntityType: EntitySet 'genPromoRights' is based on type 'genPromoRight' that has no keys defined. OrderDetails: EntityType: EntitySet 'OrderDetails' is based on type 'OrderDetail' that has no keys defined. RecentlyViews: EntityType: EntitySet 'RecentlyViews' is based on type 'RecentlyView' that has no keys defined. PaymentTypes: EntityType: EntitySet 'PaymentTypes' is based on type 'PaymentType' that has no keys defined. ShippingDetails: EntityType: EntitySet 'ShippingDetails' is based on type 'ShippingDetail' that has no keys defined. genMainSliders: EntityType: EntitySet 'genMainSliders' is based on type 'genMainSlider' that has no keys defined. '