Edi Wang

.NET and Azure Developer

Razor

Fix Visual Studio 2015 Razor Editor Blow Up

Visual Studio 2015 has been RTM for one month. However, it blows up very often, such as Razor editor. When I try to open any .cshtml file, it blows up with this error, then the syntax highlight is gone. I tried to uninstall all add-on, even repair install VS2015 can't get it working. The detailed error message is: System.Reflection.TargetInvocationException: Exception has been thrown by the …
Razor

ASP.NET中使用Razor导致自定义Membership失效的解决办法

最近在研究Razor和MVC,打算逐步把博客用Razor重写一边。今天一上手就碰到个蛋碎的问题。不管是在MVC应用程序,还是传统的WebForm项目中添加Razor页(既.cshtml类型的页面),就会导致自定义的Membership Provider失效。如果去掉Membership的配置则一切正常。 具体问题表现在有两个地方报错: 1. 运行时报错:Parser Error Message: Default Membership Provider could not be found. 2. 编译时报错:Error    58    The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an …
Membership Razor Web.Config