简体   繁体   English

如何使用相同的解决方案运行/调试多个Web应用程序项目?

[英]How to run/debug multiple web application projects with-in the same solution?

I have 2 web application projects. 我有2个Web应用程序项目。 One is my asp.net MVC app and the other is for the admin related functions which is asp.net web forms Dynamic Data. 一个是我的asp.net MVC应用程序,另一个是管理相关的功能,这是asp.net web表单动态数据。 My MVC app would be the main site, but I would want the webforms to work under an Admin folder of the MVC site. 我的MVC应用程序将是主要站点,但我希望webforms在MVC站点的Admin文件夹下工作。

While debugging the application, I would like the "/admin/Default.aspx" link on the MVC site to link to the default page within my Dynamic Data site. 在调试应用程序时,我希望MVC站点上的“/admin/Default.aspx”链接链接到我的动态数据站点中的默认页面。 How do I accomplish this? 我该如何做到这一点? I know I can test each project independently. 我知道我可以独立测试每个项目。

在visual studio项目中,您可以右键单击文件夹并选择“转换为Web应用程序”来解决我的问题。

The easiest way would be to run them both in separate virtual directories and use Url Rewriting to push requests for the root to the public site. 最简单的方法是在单独的虚拟目录中运行它们,并使用Url Rewriting将根请求推送到公共站点。 You can nest ASP.NET applications, but that generally requires quite a bit of fussing with the configuration file to dodge inheritance issues. 您可以嵌套ASP.NET应用程序,但这通常需要对配置文件进行相当多的讨论以避免继承问题。

You could achieve this behavior via your IIS-Manager. 您可以通过IIS管理器实现此行为。 Click on the Website, navigate to the folder you want to behave like a separate application and use right-mouse click and press "convert-to-application". 单击网站,导航到您想要表现得像一个单独的应用程序的文件夹,并使用鼠标右键单击并按“转换为应用程序”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在单个IIS应用程序池上调试多个Web项目? - How to debug multiple web projects on single IIS application pool? 我应该在一个解决方案中有多个项目,还是对于共享同一数据库的控制台和Web应用程序有多个解决方案? - Should I have multiple projects in a Solution or multiple Solutions for a console and web application that share same database? 如何将同一解决方案中的多个网站项目发布到一个文件夹? - How do I publish multiple web site projects in the same solution to one folder? 如何在同一解决方案中从 MVC 项目调试 Web API 项目 - How To Debug Web API Project From MVC Project In Same Solution 在visual studio中的同一解决方案中运行多个Web表单应用程序 - Run multiple web forms apps in same solution in visual studio 一个解决方案中的多个Web项目,配置转换 - Multiple Web Projects in one solution, Config Transforms 同一解决方案中的多个WebApp项目 - Multiple WebApp projects within the same solution 使用多个项目发布Web应用程序 - Publish Web Application with Multiple Projects 如何在Web解决方案中的项目之间引用类 - How to reference a class between projects in a Web solution 同一解决方案中的项目之间如何共享类? - How are classes shared between projects in the same solution?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM