Use Adminlite + ASP. NET MVC5 (C #) + Entityframework + AutoFac + AutoMapper to write an api interface document management system,I. Demonstration:
Interface view: http://apidoc.docode.top/
Interface Background: http://apiadmin.docode.top/
Log on to the administrator, 123456
Ii. Technologies used:
1. AdminLite (Bootstrap-based responsive UI template)
② ASP
REST: A software architecture style that is designed and developed for Web applications that reduces the complexity of development and increases the scalability of the system. (This Web API makes it easy to implement restful HTTP services, currently in three major Web service implementations, because RESTful Web services are significantly more concise compared to complex soap and XML-RPC, More and more Web services are beginning to be designed and imp
with Google DHC650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/82/B5/wKiom1deyIXRH6aMAAA64QyvxHc413.png "title=" Qq20160613225136.png "alt=" Wkiom1deyixrh6amaaa64qyvxhc413.png "/>If nothing is passed, it is validated against the validation rules above.650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/82/B4/wKioL1deye_wOztiAAA8hgpHD3A410.png "title=" Qq20160613225255.png "alt=" Wkiol1deye_woztiaaa8hgphd3a410.png "/>If an email is sent, it verifies that the email is correct.Fi
[Web API series tutorial] 3.1-practice: process data (create a project)Preface
This guide will teach you basic skills for creating Web applications on the backend using ASP. NET web APIs. This Guide uses Entity Framework 6 as the data layer and knockout. js as the client's JavaScript Application. This Guide also shows how to deploy an application to Azure App ser
In ASP. NET Web API, partial fields in the object are displayed through Uris.
Sometimes we may not want to display all fields in an object. For example, the client sends the following request:Locaohost: 43321/api/groups/1/items? Fields = idLocaohost: 43321/api/groups/1/items? Fields = id, nameAbove, for the Item class
ASP. net mvc 5.0 has been released for a period of time. It is ready to refactor the original MVC project and record the basic permission verification.
Environment: Windows 7 Professional SP1 + Microsoft Visual Studio 2013 (MVC 5 + Web API 2)
Modify Web. config and add the Forms authentication mode. Add the following configuration to the system. web node:
System.Web.Security;
[AttributeUsage(Attribut
jquery requests, which are serialized using json.stringify, and must be specified in the Transport format contenttype$.ajax ({URL:'/api/sysuser?token= ' +token, type:' PUT ', data:JSON.stringify ({"UserID": ID,"UserName": $ (' #inputUserName '). Val (),"Cellphone": $ (' #inputCellPhone '). Val (),"Email": $ (' #inputEmail '). Val (),"Telephone": $ (' #inputTelePhone '). Val (),"ShowName": $ (' #inputShowName '). Val (),"Roleid": $ (' #selectRole '). V
Run ASP. NET Core Web API application in docker (with AWS Windows Server 2016 widt Container case), dockerawsEnvironment preparation
1. Amazon EC2 Windows Server 2016 with Container
2. Visual Studio 2015 Enterprise (Update required for Profresianal)
3.. NET Core 1.0.0-VS 2015 Tooling Preview 2. Click here to install
4. Microsoft. NET Core SDK, which can be downloaded and installed on the official Microsoft
If you do not set the Web API to return data formatters, browser access to the interface will be different from the browser and different forms of results, because the default header of IE browser is Application/json, so when using IE browser to access the interface, You always need to download the JSON file. Of course you can also modify the return data form on the server.In the Application_Start () method of the global file, add the following phra
simpler to find this type and then deserialize the instance of this type directly.Looked for, found that the original is Microsoft.AspNet.WebApi.Core in the Httperror:namespacesystem.web.http{[XmlRoot ("Error")] Public Sealed classhttperror:dictionarystring,Object>, IXmlSerializable { PublicHttperror (); PublicHttperror (stringmessage); PublicHttperror (Modelstatedictionary modelstate,BOOLincludeerrordetail); PublicHttperror (Exception Exception,BOOLincludeerrordetail); Public stringExc
need to check the Modeltype property first. if typeof (DateTime)) { = inputformatterresult.success (DateTime.Parse (Val)); } Else { = inputformatterresult.success (int. Parse (Val)); Now apply this input format class. Public void configureservices (iservicecollection services) { = = { o.inputformatters.add (new custinputformatter ());
The ASP. NET Web API uses swagger to generate online help test documentsSwagger generating the ASP. NET Web APIObjective
Swagger UI is an API for online document generation and testing, and is now found to be the best.
Why is it useful? Demo Portal
Support A
certificate do not refresh, right-click on the certificate, as follows:The solutions to both of these errors are:1 ) The solution to the error isInstall the certificate to the computer's trusted area, then open the Certificate Manager, which will run at the beginning:certmgr.mscSelect the certificate and right-click the operation.ChooseFollow the prompts, and when you enter the password, this is the password to create the certificateEnter the correct password and follow the instructions.However
1. Modify the Web. config directly, but this is for all Action.Method 2.Add a category with the content shown below:Using system;using system.collections.generic;using system.linq;using system.web;using System;using System.web.http.filters;namespace workflow.filters{Public class Allowcrosssitejsonattribute: ActionFilterAttribute {public override void OnActionExecuted (Httpactionexecutedcontext ActionExecutedContext) { if (actionexecutedcontext.response! = null)
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.