Download ASP.NET MVC 4 for Visual Studio 2010 SP1 and Visual Web Developer 2010 SP1 from Official Microsoft Download Center New Surface Pro 6 Stand out from the ordinary.
-->What's New in ASP.NET MVC 5
One ASP.NET
The Web MVC project templates integrate seamlessly with the One ASP.NET experience. You can customize your MVC project and configure authentication using the One ASP.NET project creation wizard. An introductory tutorial to ASP.NET MVC 5 can be found at Getting Started with ASP.NET MVC 5.
For information on upgrading MVC 4 projects to MVC 5, see How to Upgrade an ASP.NET MVC 4 and Web API Project to ASP.NET MVC 5 and Web API 2.
ASP.NET Identity
The MVC project templates have been updated to use ASP.NET Identity for authentication and identity management. A tutorial featuring Facebook and Google authentication and the new membership API can be found at Create an ASP.NET MVC 5 App with Facebook and Google OAuth2 and OpenID Sign-on and Deploy a Secure ASP.NET MVC app with Membership, OAuth, and SQL Database to a Windows Azure Web Site.
Bootstrap
The MVC project template has been updated to use Bootstrap to provide a sleek and responsive look and feel that you can easily customize. For more information, see Bootstrap in the Visual Studio web project templates.
Authentication filters
Authentication filters are a new kind of filter in ASP.NET MVC that run prior to authorization filters in the ASP.NET MVC pipeline and allow you to specify authentication logic per-action, per-controller, or globally for all controllers. Authentication filters process credentials in the request and provide a corresponding principal. Authentication filters can also add authentication challenges in response to unauthorized requests. See ASP.NET MVC 5 Authentication Filters, Authentication Filters in ASP.NET MVC 5.
Filter overrides
You can now override which filters apply to a given action method or controller by specifying an override filter. Override filters specify a set of filter types that should not be run for a given scope (action or controller). This allows you to configure filters that apply globally but then exclude certain global filters from applying to specific actions or controllers. See New Filter Overrides feature in ASP.NET MVC 5 and ASP.NET Web API 2, How to use the ASP.NET MVC 5 Filter Overrides Feature, and Filter Overrides in ASP.NET MVC 5
Attribute routing
ASP.NET MVC now supports attribute routing, thanks to a contribution by Tim McCall, the author of AttributeRouting. With attribute routing you can specify your routes by annotating your actions and controllers.
New Web Project Experience
Visual Studio enhanced the experience of creating new web projects, starting in Visual Studio 2013. In the New ASP.NET Web Project dialog you can select the project type you want, configure any combination of technologies (Web Forms, MVC, Web API), configure authentication options, add Docker support, and add a unit test project.
The dialog enables you to change the default authentication options for many of the templates. For example, when you create an ASP.NET Web Forms project you can select any of the following options:
- No Authentication
- Individual User Accounts (ASP.NET membership or social provider log in)
- Work or School Accounts (Active Directory in an internet application)
- Windows Authentication (Active Directory in an intranet application)
For more information about the process for creating web projects, see Creating ASP.NET Web Projects in Visual Studio. For more information about the authentication options, see ASP.NET Identity.
ASP.NET Scaffolding
ASP.NET Scaffolding is a code generation framework for ASP.NET Web applications. It makes it easy to add boilerplate code to your project that interacts with a data model.
In versions of Visual Studio prior to 2013, scaffolding was limited to ASP.NET MVC projects. Starting in Visual Studio 2013, you can use scaffolding for any ASP.NET project, including Web Forms. Visual Studio does not currently support generating pages for a Web Forms project, but you can still use scaffolding with Web Forms by adding MVC dependencies to the project. Support for generating pages for Web Forms will be added in a future version.
When using scaffolding, all required dependencies are installed in the project. For example, if you start with an ASP.NET Web Forms project and then use scaffolding to add a Web API Controller, the required NuGet packages and references are added to your project automatically.
To add MVC scaffolding to a Web Forms project, add a New Scaffolded Item and select MVC 5 Dependencies in the dialog window. There are two options for scaffolding MVC; Minimal dependencies and Full dependencies. If you select Minimal dependencies, only the NuGet packages and references for ASP.NET MVC are added to your project. If you select Full dependencies, the minimal dependencies are added as well as the required content files for an MVC project.
Support for scaffolding async controllers uses the async features from Entity Framework 6.
For more information and tutorials, see ASP.NET Scaffolding Overview.
Get Help and Report Issues
- Get help and discuss ASP.NET MVC 5 in the forums
Upgrade from ASP.NET MVC 4
See How to Upgrade an ASP.NET MVC 4 and Web API Project to ASP.NET MVC 5 and Web API 2
Overview
Q. What is in this repository?
A. This is a simple example using an MVC Visual Studio project template with Izenda Embedded into it. This repository is only an example of integrating Izenda into another application. The Visual Studio project template used in this scenario is used as a substitute for your application. This repository shows examples of how you might embed Izenda into your application.
Getting Started
Download the v2.6.20 (https://downloads.izenda.com/v2.6.0-v2.6.24/v2.6.20/) of the API and EmbeddedUI and copy the following:
All files & folders inside:
- APIbin -> Mvc5StarterKitIzendaReferences
The folder itself for:
- APIContent -> Mvc5StarterKitIzendaResources
- APIEmailTemplates -> Mvc5StarterKitIzendaResources
- APIExport -> Mvc5StarterKitIzendaResources
- APIThemes -> Mvc5StarterKitIzendaResources
- EmbeddedUI -> Mvc5StarterKitScriptsizenda
Open SSMS
- Create a new database named Retail
- Run script located at Mvc5StarterKitSQLScriptRetailDbScript.sql
Run Application and login by System Admin Account below:
- Tenant : System
- Username: [email protected]
- Password: Izenda@123
After start up and logging in as Admin Go to Settings on top Nav
- Add Izenda License Key and Token (leave Izenda Configuration Database Connection string set this is using an MDF file included in this kit)
- Go to Data Setup > Connection String add the connection string to the Retail database created above for system and all tenants and move tables/views to visibleMore Info here: How To Set Up A Connection String
- In Data Setup > Advanced Settings > Security Set the Tenant Field to [CustomerID] (please ensure you use the brackets) for each Tenant / CustomerID in the Retail Database are the tenants (DELDG/NATWR/RETCL) and this will filter databased on the current user's TenantIDMore Info here: Updating settings in Performance, Security/Additive Fields and Others group
- For each Role in the tenant set datamodel access (what tables / views each role can access)More Info here: How To Set Up A Role
Tenants, Users, and Roles
For each Tenant the following users / roles are configured all use the same password: Izenda@123
Tenant: DELDG
User: [email protected] Role: employee
User: [email protected] Role: manager
User: [email protected] Role: VP
User: [email protected] Role: employee
User: [email protected] Role: manager
User: [email protected] Role: VP
Tenant: NATWR
User: [email protected] Role: employee
User: [email protected] Role: manager
User: [email protected] Role: VP
User: [email protected] Role: employee
User: [email protected] Role: manager
User: [email protected] Role: VP
Tenant: RETCL
User: [email protected] Role: employee
User: [email protected] Role: manager
User: [email protected] Role: VP
User: [email protected] Role: employee
User: [email protected] Role: manager
User: [email protected] Role: VP
When registering a new user in this sample all users are hardcoded to the manager role here:Mvc5StarterKitControllersAccountController.cs (Line 177)
Please review the following file:mvc5starterkitmvc5starterkitizendaboundarycustomadhocreport.csThis is where you can find samples for:Hidden FiltersFilter Dropdown OverridesSee more information here: All About IAdhocExtension, Hidden Filters, and Filter Dropdown Overrides
The CSS can be configured per tenant and an example is provided see below:This is configured here ~mvc5starterkitMvc5StarterKitViewsShared_Layout.cshtmlAnd folder structures are located here ~mvc5starterkitMvc5StarterKitContent
SQL Scripts
The MVC5Starterkit is pre-set to use locally installed instances of SQL LocalDB (mdf) for the Izenda database and the MVC5Starterkit database. You can configure the kit to use full-fledged sql server instances by following the instructions below.
Creating the Izenda database
This is the database for the Izenda configuration. It contains report definitions, dashboards,etc.
- Create a database named 'IzendaMVC'. You may use any name of your choosing, just be sure to modify the script below to use the new database name.
- Download and execute the IzendaMVC.sql script.
- Modify the izendadb.config file with a valid connection string to this new database.
Creating the Mvc5StarterKit database
This is the database for the Mvc5 application. It contains the users, roles, tenants used to login.
- Create a database named 'Mvc5StarterKit'. You may use any name of your choosing, just be sure to modify the script below to use the new database name.
- Download the Mvc5StarterKit.sql script.
- Modify the web.config (Line 86) file with a valid connection string to this new database.
Post Installation
Exporting
Update the WebUrl value in the IzendaSystemSetting table with the URL for your front-end. You can use the script below to accomplish this. As general best practice, we recommend backing up your database before making any manual updates.
If you do not update this setting, charts and other visualizations may not render correctly when emailed or exported. This will also be evident in the log files as shown below:
[ERROR][ExportingLogic ] Convert to image: System.Exception: HTML load error. The remote content was not found at the server - HTTP error 404