惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Vulnerabilities – Threatpost
Cloudbric
Cloudbric
G
GRAHAM CLULEY
S
Securelist
Schneier on Security
Schneier on Security
Help Net Security
Help Net Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Project Zero
Project Zero
Spread Privacy
Spread Privacy
P
Privacy International News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
T
Tailwind CSS Blog
博客园_首页
有赞技术团队
有赞技术团队
Simon Willison's Weblog
Simon Willison's Weblog
Stack Overflow Blog
Stack Overflow Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Latest news
Latest news
T
Tor Project blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Attack and Defense Labs
Attack and Defense Labs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
O
OpenAI News
J
Java Code Geeks
T
Tenable Blog
K
Kaspersky official blog
AWS News Blog
AWS News Blog
S
Security @ Cisco Blogs
The GitHub Blog
The GitHub Blog
T
Threatpost
月光博客
月光博客
H
Heimdal Security Blog
Security Latest
Security Latest
The Hacker News
The Hacker News
Y
Y Combinator Blog
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
C
Cisco Blogs
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
C
CERT Recently Published Vulnerability Notes
D
Docker
Google Online Security Blog
Google Online Security Blog
D
DataBreaches.Net
V
Visual Studio Blog
H
Help Net Security

博客园 - 如是如是

将博客搬至CSDN 钱钟书夫人杨绛:《一百岁感言》 DOM无关事件 用到了反射,还不错。可以取到动态创建类的值 JounceTabRegion Jounce Blendable RestShart Post 方式传递poco给Web api Using ASP.NET Web API with ASP.NET Web Forms How to Migrate from WCF Web API to ASP.NET Web API ASP.NET Web API MVC-REST-SilverLight 之 架构 MVC-REST-SilverLight 之 RestExample.Model.Silverlight\Customer.cs - 如是如是 MVC-REST-SilverLight 之MainPage.xaml.cs MVC-REST-SilverLight 之 ViewModels\MainViewModel.cs - 如是如是 MVC-REST-SilverLight 之Api\CustomerApi.cs - 如是如是 - 博客园 MVC-REST-SilverLight 之 HttpConfiguration MVC-REST-SilverLight 之 MapServiceRoute MEF Export 和 Import 委托 设计模式-访问者
MVC-REST-SilverLight 之 Global.asax.cs
如是如是 · 2012-02-21 · via 博客园 - 如是如是

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

using System.Web.Routing;

using RestExample.Web.Api;

using Microsoft.ApplicationServer.Http;

namespace RestExample.Web

{

// Note: For instructions on enabling IIS6 or IIS7 classic mode,

// visit http://go.microsoft.com/?LinkId=9394801

public class MvcApplication : System.Web.HttpApplication

{

public static void RegisterGlobalFilters(GlobalFilterCollection filters)

{

filters.Add(new HandleErrorAttribute());

}

public static void RegisterRoutes(RouteCollection routes)

{

//忽略对.axd文件的Route,也就是和WebForm一样直接去访问.axd文件

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

HttpConfiguration config = new HttpConfiguration();

//config.

routes.MapServiceRoute<CustomerApi>("api/customers",config);

routes.MapRoute(

"Default", // Route name

"{controller}/{action}/{id}", // URL with parameters

new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults

);

}

protected void Application_Start()

{

AreaRegistration.RegisterAllAreas();

RegisterGlobalFilters(GlobalFilters.Filters);

RegisterRoutes(RouteTable.Routes);

}

}

}