`
mlzboy
  • 浏览: 739459 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

asp.net preview 5 bug[转]

阅读更多

We've had some trouble using the latest ASP.NET MVC Preview 5. For reasons unknown any attempt to open a view (e.g. Default.aspx, not the code-behind) in Visual Studio 2008 would cause a fatal .NET runtime error and the Visual Studio process would simply be killed. Dead. Gone.



Annoying.

I spent a good amount of time trying to figure out why this could be, and though there were a few leads on the web none of the proposed solutions out there fixed the problem. So, I asked the senior developer on my team, Steve Friend, to have a look. Sic' em, Steve!

Steve noticed that Scott Guthrie's Preview 5 Example Application wouldn't cause any problems at all. Nor would any MVC project added to the same solution as Guthrie's application. However, all other MVC projects created from scratch with Visual Studio would suffer from the symptom described at the top of this post.

Steve examined the differences between ScottGu's application and a 'fresh' MVC app, and discovered that removing two of the DLLs from the fresh MVC app's /bin folder solved the problem. He documented this on our internal wiki, and I've copied-and-pasted his fix here. Thanks Steve!


-------------
Creating a new project
In Visual Studio create a new MVC project (File > New > Project, then select Visual C# > Web then select ASP.Net MVC Web Application). This will create a fairly large default project containing a number of folders and files relating to the MVC pattern structure (i.e. models, views and controllers).

Once you have done this you will need to build the project and create a new website in IIS (see IISSetup for details of how to do this), but before you do that, run through the instructions below to avoid the bug that seems to ship with default projects.

The bug
If you double click on any view page (i.e. a aspx page) in order to edit it in Visual Studio the application crashes.

The fix
In the solution explorer select "Show all files" to reveal the bin folder. In there you will the following dlls (and possibly more, if you have already built your project/solution):

* Microsoft.Web.Mvc.dll
* System.Web.Abstractions.dll
* System.Web.Mvc.dll
* System.Web.Routing.dll

Delete "System.Web.Abstractions.dll" and "System.Web.Routing.dll".

 

http://www.babel-lutefisk.net/2008/09/fix-for-aspnet-mvc-preview-5-bug-with.html

 

这个问题弄了两天,就是用preview的代价吧,preview是不是就是以前的CTP?

分享到:
评论

相关推荐

    asp.net mvc

    Changes in ASP.NET MVC 2 Release Candidate 5 Changes in ASP.NET MVC 2 Beta 6 Changes in ASP.NET MVC 2 Preview 2 6 Changes in ASP.NET MVC 2 Preview 1 7 Known Issues 7 Disclaimer 8 This document ...

    dot net core 3.0 preview 3 for windows

    例如,dotnet-runtime-3.0.0-*win-\*exe用于执行.NET Core应用程序,而aspnetcore-runtime-3.0.0-*win-\*exe则包含运行ASP.NET Core应用所需的组件。 8. **兼容性与升级**:.NET Core 3.0 Preview 3是一个预览版,...

    AspNetMVCPreview2

    "AspNetMVCPreview2-setup.msi" 是ASP.NET MVC的一个早期预览版本,可能包含了该框架的一些早期特性、改进和bug修复。使用这个安装包,开发者可以在早期阶段了解和评估ASP.NET MVC框架,为后续的开发工作打下基础。 ...

    基于extjs的.NET3.5控件Coolite 1.0.0.34580(Preview预览版)

    the native ASP.NET .Enabled property. See http://www.coolite.com/forums/FindPost22963.aspx 59. Removed the static Instance method from Ext.Net.MessageBox class. The MessageBox class was ...

    vs2008 mvc AspNetMVCPreview3-setup.msi

    标题中的"vs2008 mvc AspNetMVCPreview3-setup.msi"指的是Visual Studio 2008中用于开发ASP.NET MVC应用程序的Preview3版本的安装程序。ASP.NET MVC是一个基于模型-视图-控制器(MVC)设计模式的Web应用程序框架,由...

    Programming Excel With Vba And .net.chm

    Programming Excel with VBA and .NET Preface Part I: Learning VBA Chapter 1. Becoming an Excel Programmer Section 1.1. Why Program? Section 1.2. Record and Read Code Section 1.3. Change ...

    MicrosoftAjaxLibrary_Preview6.zip

    总的来说,"MicrosoftAjaxLibrary_Preview6.zip" 提供了对ASP.NET AJAX库的早期访问,帮助开发者提前适应和测试新特性,提高Web应用的性能和用户体验。通过阅读客户端参考手册、查看示例代码以及理解Readme文档,...

    DotNetCore.1.0.0-SDK

    3. **ASP.NET Core**:全新设计的Web开发框架,轻量、高性能,支持跨平台。 4. **命令行接口(CLI)工具**:简化了.NET Core的开发流程,提供了一套统一的命令行工具进行项目管理。 5. **项目文件格式(project.json...

    FastReport设计工具+开发指南

    2. **兼容性**:确保与.NET 4.0的兼容性,可能包括对Windows Forms、WPF和ASP.NET的支持。 3. **API更新**:可能会有新的API接口或者现有接口的改进,以便开发者更好地利用FastReport的功能。 4. **修复bug**:针对...

    DotNetTextBox所见即所得编辑器控件 v3.3.1

    <br> 2007/8/5 Version 3.2.7 Free <br>Updates: 1) 修正插入MSN、QQ、ICQ在线状态图标时会出现焦点缺失的BUG。 2) 修正远程上传图片后自动生成文件名不正确的BUG。 3) 修正使用...

Global site tag (gtag.js) - Google Analytics