[英]ASP.NET Core MVC equivalent of Start Action Specific Page
In ASP.NET Webforms
or ASP.NET MVC
projects, I can select the page/route that is being called in the browser when I press F5 for debugging, as shown in the screenshot below. 在
ASP.NET Webforms
或ASP.NET MVC
项目中,当我按F5进行调试时,我可以选择浏览器中调用的页面/路由,如下面的屏幕截图所示。
What is the equivalent in ASP.NET Core MVC
? ASP.NET Core MVC
的等价物是什么? I'm using IIS Express
with SSL
for local debugging. 我正在使用带有
SSL
IIS Express
进行本地调试。 In the launchSettings.json
I have an applicationUrl
defined as this: 在
launchSettings.json
我有一个applicationUrl
定义如下:
"iisExpress": {
"applicationUrl": "http://localhost:59563/",
"sslPort": 44333
}
When I start debugging, https://localhost:44333
is called. 当我开始调试时,调用
https://localhost:44333
。 My goal is to that https://localhost:44333/MYROUTE
is beging called upon starting the debug mode. 我的目标是在启动调试模式时调用
https://localhost:44333/MYROUTE
。
Where can I specify that I want https://localhost:44333/MYROUTE
to be my start URL for debugging? 我在哪里可以指定我想要
https://localhost:44333/MYROUTE
作为调试的起始URL?
You can change the launchsettings.json (in Visual Studio usually shown when you expand the "Properties"-Node in the solution explorer. There you can set the launchUrl in the according launch profile: 您可以更改launchsettings.json(在Visual Studio中,通常在解决方案资源管理器中展开“属性”-Node时显示。在那里,您可以在相应的启动配置文件中设置launchUrl:
{
"iisSettings": {
"iisExpress": {
"applicationUrl": "http://localhost:59563/",
"sslPort": 44333
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"launchUrl": "https://localhost:44333/YOURROUTE"
}
}
You can select the launch profile using the small black arrow next to the debug-button: 您可以使用调试按钮旁边的黑色小箭头选择启动配置文件:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.