Visual Studio中的ASP.NET MVC项目:设置起始URL [英] Visual Studio ASP.NET MVC project: setting the start URL

查看:765
本文介绍了Visual Studio中的ASP.NET MVC项目:设置起始URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑使用VS 2010的ASP.NET MVC 2项目的目标是设置启动URL关于使用运行/调试VS内置的卡西尼Web服务器。

Consider an ASP.NET MVC 2 project with VS 2010. The goal is to set the 'start URL' on run/debug using VS's built-in Cassini web server.

输入网址,因为我想加载,在典型的&放大器;有效的格式,控制器/动作,相较于2010年给出了这样的例外。

Entering the URL as I want to be loaded, in the typical & valid format, controller/action, VS 2010 gives this exception.

试图补救措施:


  • 带和不带斜线开始网址

  • 带和不带斜线结束网址

问:你怎么能一个MVC 2项目指定起始URL

Question: How can you specify the start URL for an MVC 2 project?

技术:


  • 的Visual Studio 2010

  • ASP.NET MVC 2

分辨率:我使用的启动选项错误的领域。所需要的是在特定页与相对URL字段,并没有启动的URL。

Resolution: I was using the wrong field in the startup options. What was needed was the "Specific Page" field with the relative URL, and not Start URL.

推荐答案

开始URL必须是一个完全合格的URL,而不是真正使用经常。它的意思通过打开一个网页,将调用该服务测试Web服务,而不是应用程序本身的一部分。

Start URL has to be a fully qualified URL and is not really used that often. It's meant for testing web services by opening a page that will call into the service, but isn't part of the application itself.

如果你只是希望启动应用程序,它听起来像你想要的,然后使用特殊页字段,然后输入你的相对URL中的某一页上。

If you're just looking to start on a certain page of your application, which it sounds like you want, then use the "Specific Page" field, and enter your relative URL.

这里的项目启动选项文档页面。

这篇关于Visual Studio中的ASP.NET MVC项目:设置起始URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆