2019年6月24日 星期一
2019年6月9日 星期日
MvcHandler.DisableMvcResponseHeader = true; 隱藏版本資訊
https://blog.miniasp.com/post/2009/09/02/ASPNET-MVC-Developer-Note-Part-10-Hide-MVC-Version-from-HTTP-Header
在Global.asax.cs的 Application_Start() 事件方法加入
MvcHandler.DisableMvcResponseHeader = true;
在Global.asax.cs的 Application_Start() 事件方法加入
MvcHandler.DisableMvcResponseHeader = true;
2019年6月3日 星期一
ASP.NET MVC移除不需要的顯示引擎
確定網站不會使用WebForm(aspx),不需要WebFormViewEngine,可以把只留RazorViewEngine
在Global.asax.cs加入以下兩行
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
在Global.asax.cs加入以下兩行
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
訂閱:
文章 (Atom)