简体   繁体   English

IIS Express 调试时启动极慢

[英]IIS Express extremely slow start while debugging

I am working on a C# MVC project that is set up to run using IIS Express.我正在研究一个 C# MVC 项目,该项目设置为使用 IIS Express 运行。 I am using Rider as my IDE and every time i start the project using the "Run" option it starts up quickly without any issues.我使用 Rider 作为我的 IDE 并且每次我使用“运行”选项启动项目时,它都会快速启动而没有任何问题。 However, when starting the project using the "Debug" option the startup is extremely slow 95% of the time - and by extremely slow i mean up to 10 minutes.但是,当使用“调试”选项启动项目时,95% 的时间启动速度非常慢 - 我的意思是非常慢,最多 10 分钟。 The build process itself is very quick and I have narrowed down the issue to IIS.构建过程本身非常快,我已将问题范围缩小到 IIS。 I also tried running the project via Visual Studio with the same effect.我还尝试通过 Visual Studio 运行项目,效果相同。

Some of the modules that are loaded by IIS load extremely slow - not always the same ones, but the usual culprits are: IIS 加载的一些模块加载速度非常慢 - 并不总是相同,但通常的罪魁祸首是:

FeatureToggle.dll
CsQuery.dll
System.Web.Http.OData.dll

I have read almost every single question relating to slow startups on google with no effect.我已经阅读了几乎所有与谷歌上缓慢启动有关的问题,但没有任何效果。 I have tried reinstalling, changing configuration, clearing cache among others.我尝试过重新安装、更改配置、清除缓存等。

The issue has been here since I received the laptop.自从我收到笔记本电脑以来,问题就一直存在。 My co-workers are using the same laptops and have no issues at all.我的同事使用相同的笔记本电脑,完全没有问题。

Any help or suggestions are highly appreciated非常感谢任何帮助或建议

I managed to solve it by following the instructions from this link我设法按照此链接中的说明解决了这个问题

Some assemblies are signed with the Microsoft digital certificate and the delay occurs due to the runtime attempt to verify the certificate.某些程序集使用 Microsoft 数字证书进行签名,并且由于运行时尝试验证证书而出现延迟。

Add the following to your configuration file:将以下内容添加到您的配置文件中:

<configuration>  
    <runtime>  
        <generatePublisherEvidence enabled="false"/>  
    </runtime>  
</configuration> 

Hope this helps someone.希望这可以帮助某人。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM