asp.net-mvc-2 – 在Visual Studio 2010 RC中更改默认浏览器
发布时间:2020-05-23 11:19:31 所属栏目:asp.Net 来源:互联网
导读:在Visual Studio 2010(RC)中,右键单击.aspx页面后,不再有“浏览”上下文菜单。现在如何更改默认浏览器? 默认情况下,它似乎使用操作系统默认浏览器,但我宁愿在调试ASP.net应用程序时使用IE。 (我正在用ASP.net MVC测试这个) 在MVC项目的.aspx视图中没有“
|
在Visual Studio 2010(RC)中,右键单击.aspx页面后,不再有“浏览”上下文菜单。现在如何更改默认浏览器? 默认情况下,它似乎使用操作系统默认浏览器,但我宁愿在调试ASP.net应用程序时使用IE。 (我正在用ASP.net MVC测试这个) 解决方法在MVC项目的.aspx视图中没有“浏览”选项,因为它们不是直接可浏览的。我倾向于做的是在Site的根目录中添加一个Default.aspx webform,当右键单击它将给你浏览选项。您需要确保更新您的路由,否则IIS / Cassini将尝试提供服务,像这样 public void Page_Load(object sender,System.EventArgs e) {
// Change the current path so that the Routing handler can correctly interpret
// the request,then restore the original path so that the OutputCache module
// can correctly process the response (if caching is enabled).
string originalPath = Request.Path;
HttpContext.Current.RewritePath(Request.ApplicationPath,false);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
HttpContext.Current.RewritePath(originalPath,false);
}
此外,另一个快速是按CTRL-F5(不运行调试),这将启动网站,而不进入调试模式。 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 剃刀 – 错误RZ3007:目标标签名称不能为空或空格
- ASP.NET为什么会话超时,sessionstate超时设置
- entity-framework-4 – 首先在实体框架代码中使用导航属性
- REST API是否区分大小写或非区分大小写?
- asp-classic – HTTP / 1.1新应用程序失败
- asp.net – 转换为VS 2015.1中的Web应用程序
- asp.net-web-api – 从ExceptionLogger引用操作参数
- asp.net-mvc – 将部分视图渲染为字符串MVC4
- asp.net – (客户端)禁用提交按钮的最佳方法是什么?
- owin和oAuth2.0之间的关系是什么?
推荐文章
站长推荐
热点阅读
