WPF应用程序启动(或DBContext初始化)速度慢,具有严格的防火墙设置

时间:2022-09-11 16:23:30

The WPF application is a local client application, and the running environment has a very strict firewall setting, even not able to connect to Microsoft domain. When I start the WPF application, it takes a long time(90 seconds) to startup. However, if I plug out the internet cable, it starts up very fast(6 seconds).

WPF应用程序是本地客户端应用程序,运行环境具有非常严格的防火墙设置,甚至无法连接到Microsoft域。当我启动WPF应用程序时,启动需要很长时间(90秒)。但是,如果我插上网线,它启动速度非常快(6秒)。

By debugging the application, I found out the Entity Framework DBContext initialization takes most of the time. It is executed right at the moment of the application starting.

通过调试应用程序,我发现实体框架DBContext初始化占用大部分时间。它在应用程序启动时立即执行。

I have already done the following:

我已经做了以下事情:

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

But that doesn't help. Anybody else met this problem before? Please help me out...

但这没有用。以前有人遇到过这个问题吗?请帮帮我...

1 个解决方案

#1


I think I got a answer: The .net framework ask for certificate revocation list when the application starts and there exists a internet connection. However, the firewall block the request. See more:

我想我得到了一个答案:.net框架在应用程序启动时要求提供证书吊销列表,并且存在互联网连接。但是,防火墙会阻止请求。看更多:

http://social.technet.microsoft.com/wiki/contents/articles/2303.understanding-access-to-microsoft-certificate-revocation-list.aspx

#1


I think I got a answer: The .net framework ask for certificate revocation list when the application starts and there exists a internet connection. However, the firewall block the request. See more:

我想我得到了一个答案:.net框架在应用程序启动时要求提供证书吊销列表,并且存在互联网连接。但是,防火墙会阻止请求。看更多:

http://social.technet.microsoft.com/wiki/contents/articles/2303.understanding-access-to-microsoft-certificate-revocation-list.aspx