Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我的c#windows窗体应用程序和azure_C#_Azure - Fatal编程技术网

我的c#windows窗体应用程序和azure

我的c#windows窗体应用程序和azure,c#,azure,C#,Azure,我有一个azure数据库,它连接到我的c#应用程序,我使用App.config创建了连接字符串。当我运行程序时,它会变得非常慢,但当我连接到本地sql server时,它会非常快。如何在我的应用程序上快速建立azure连接 我的App.Config <?xml version="1.0"?> <configuration> <configSections> </configSections> <connectionString

我有一个azure数据库,它连接到我的c#应用程序,我使用App.config创建了连接字符串。当我运行程序时,它会变得非常慢,但当我连接到本地sql server时,它会非常快。如何在我的应用程序上快速建立azure连接

我的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>

这可能是您的计算机和Azure数据库之间的网络延迟造成的。您可以使用某些网络工具,如
ping
tracert
等来查看网络延迟。然后,您可以考虑提高网络连接速度(通常通过ISP)

您还可以选择离您运行应用程序的位置最近的Azure主机


Azure位置-

习惯这一点,否则请查看Azure Db的不同定价层。在高定价层,性能是否良好。您的C#应用程序是否在您的计算机上运行?还是在Azure中?#mjwills--我的应用程序正在我的机器上运行..好的,谢谢,我会试试这个。我在南非,现在还不在这里。