简体   繁体   English

我的c#windows表单应用程序和azure

[英]my c# windows form application and azure

i have an azure database and its connected to my c# application, i used App.config to create the connection string. 我有一个azure数据库,它连接到我的c#应用程序,我使用App.config来创建连接字符串。 when i run my program it becomes very slow, but when i connect to a local sql server its very fast. 当我运行我的程序它变得非常慢,但当我连接到本地SQL服务器时它非常快。 How do i make my azure connection on my application fast? 如何快速在我的应用程序上进行天蓝色连接?

My App.Config 我的App.Config

<?xml version="1.0"?>
<configuration>
  <configSections>
  </configSections>
    <connectionStrings>
  <clear />
  <add name="fudz" connectionString="Data Source=[my server];Initial Catalog=[databasename];Persist Security Info=True;User ID=[my user name];Password=[my password];Encrypt=true;TrustServerCertificate=False;Connection Timeout=30;"/>
</connectionStrings>
<startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration>

It is likely to be a the network latency between your machine and Azure database. 它可能是您的计算机和Azure数据库之间的网络延迟。 You can use certain network tools like ping , tracert , etc to see the network latency. 您可以使用某些网络工具(如pingtracert等)来查看网络延迟。 You can then look at increasing your network connection speed (usually, via your ISP). 然后,您可以查看提高网络连接速度(通常是通过ISP)。

You can also select the Azure hosting that is closest to your location in which you are running your application 您还可以选择最接近您运行应用程序的位置的Azure托管

Azure locations - https://azure.microsoft.com/en-us/regions/?cdn=disable Azure位置 - https://azure.microsoft.com/en-us/regions/?cdn=disable

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

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