项目部署到IIS
IIS:新建Web站点,路径指向Web应用程序根目录,端口默认80端口;
应用程序池:".Net CLR版本"选择.Net CLR版本v4.0.30319,托管管道模式选择"集成"。
Web项目配置
在Rider中选中Web项目,输入F4,打开csproj文件,添加如下配置。
1 <WebProjectProperties> 2 <UseIIS>True</UseIIS> 3 <AutoAssignPort>False</AutoAssignPort> 4 <DevelopmentServerPort>端口号</DevelopmentServerPort> 5 <DevelopmentServerVPath>/</DevelopmentServerVPath> 6 <IISUrl>http://你的IP:端口号</IISUrl> 7 <NTLMAuthentication>False</NTLMAuthentication> 8 <UseCustomServer>False</UseCustomServer> 9 <CustomServerUrl> 10 </CustomServerUrl> 11 <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> 12 </WebProjectProperties>
此时通过IP+端口号便能访问项目
调试
1.Rider右上角找到编辑图标旁边的三个竖点,选择"编辑配置"项,弹出窗口中找到IIS Application下的Web项目名称-IIS,URL输入框中输入"http://你的IP:端口号"。
2.按ctrl+alt+p,弹框输入框中输入w3wp,附加到进程中调试。
3.项目代码打上断点,请求访问测试断点是否进入。
标签:Web,False,IIS,端口号,Rider,调试 From: https://www.cnblogs.com/mingcore/p/17292568.html