asp.net mvc启动页面问题? [英] asp.net mvc start up page issue?

查看:132
本文介绍了asp.net mvc启动页面问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vs 2013 web express中创建了一个项目,即asp.net 4.5 mvc 4应用程序。基本上我们知道在mvc应用程序中没有像启动页面那样的东西。我们可以从路由配置文件中设置视图控制器。默认是家庭索引。现在我添加了一个wcf服务供一些使用。建立它。检查服务代码是否正常工作我将svc文件设置为启动页面,这样它将打开一个wcf测试客户端,我可以检查我的服务方法等等。一旦我满意这个,我在控制器中调用wcf服务来获取数据将其传递给视图并再次运行项目。现在奇怪的事情发生了:



i已经设置了wcf服务作为起始页面现在想要首先运行的家庭控制器已经在路由配置中定义但它提供了服务优先级而不是路由配置。这只是一个视觉工作室问题。现在我怎样才能在Visual Studio中撤消启动页面,以便我的家庭控制器可以调用。临时我通过添加一个html文件并将其设置为起始页面来应用解决方案,因此它至少不会打开wcf测试链接,当浏览器中的html页面打开时,我删除文件名并根据我的视图和控制器重新键入url 。



有没有人知道如何解决这个问题?

i am creating a project in vs 2013 web express which is asp.net 4.5 mvc 4 application. basically we know that in mvc application there is nothing like start up page. we can set view controller from route config file. default is home index. now i added a wcf service for some use. build it. to check if service code works fine i set svc file as a start up page so it will open a wcf test client where i can check my methods of services etc. once i satisfied with this i call the wcf service in my controller to get data pass it to the view and run the project again. now the weird thing happen :

i have already set wcf service as a start page now want home controller to run first which is already define in the route config but it gives service a priority and not to the route config. this is just a visual studio problem for now. now how can i undo the start page in visual studio only so that my home controller will call. temporary i apply a solution by adding a html file and set it as a start page so it will at least not open the wcf test link and when html page open in the browser i remove the file name and retype url based on my view and controller.

does any one know how to solve this problem ?

推荐答案

试试这个方式



右键单击您的项目 - >转到属性窗口 - >转到网络标签 - >清除特定页面



谢谢
try this way

Right Click on your project --> go to properties window -->go to web tab-->clear the specific Page

thanks


这篇关于asp.net mvc启动页面问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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