Visual Studio Owin+mvc+webapi+odatav4+identity+oauth2.0+angularjs 1.x Learning Notes

Source: Internet
Author: User

In 2016,. NET will have a lot of big updates for ASP 5

Before that I was developing with the old. NET (WebForm + IIS)

In order to deal with the new features of. NET, I have specifically studied the basic MVC Owin and so on.

Next I will write some study notes on the subject.

MVC & Owin Setup Step

1.New empty project and add folders and code references for "MVC".

2.Install "Microsoft.Owin.Host.SystemWeb" (this was for Host in IIS)

3.Remove Global.asax and App_start

4.Add a Startup.cs file with below code

usingSYSTEM.WEB.MVC;usingSystem.Web.Routing;usingMicrosoft.owin;usingOwin; [Assembly:owinstartupattribute (typeof(test. Startup)]namespacetest{ Public classMvcrouteconfig { Public Static voidregisterroutes (routecollection routes) {routes. Ignoreroute ("{Resource}.axd/{*pathinfo}"); Routes.         Mapmvcattributeroutes (); }    }      Public Partial classStartup { Public voidConfiguration (Iappbuilder app) {arearegistration.registerallareas ();         Mvcrouteconfig.registerroutes (routetable.routes); }    }}
View Code

Visual Studio Owin+mvc+webapi+odatav4+identity+oauth2.0+angularjs 1.x Learning Notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.