Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/292.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# Firebird ADO网络数据提供程序“;无法完成对主机的网络请求";_C#_Firebird - Fatal编程技术网

C# Firebird ADO网络数据提供程序“;无法完成对主机的网络请求";

C# Firebird ADO网络数据提供程序“;无法完成对主机的网络请求";,c#,firebird,C#,Firebird,启动电脑后的前10或15分钟,我的应用程序通过网络连接到Firebird数据库没有问题。但在“异常”中显示“无法完成对主机app1的网络请求”后,错误。我试图重新安装我的操作系统,但问题再次出现 你能给我一些建议吗 我正在将visual studio 2013与Firebird ADO.NET提供程序一起使用。(还按照建议安装了DDEX)我的连接字符串很简单: `character set=UTF8;data source=app1;Port=3050;user id=SYSDBA;passwo

启动电脑后的前10或15分钟,我的应用程序通过网络连接到Firebird数据库没有问题。但在“异常”中显示“
无法完成对主机app1的网络请求”后,
错误。我试图重新安装我的操作系统,但问题再次出现

你能给我一些建议吗

我正在将visual studio 2013与Firebird ADO.NET提供程序一起使用。(还按照建议安装了DDEX)我的连接字符串很简单:

`character set=UTF8;data source=app1;Port=3050;user id=SYSDBA;password=masterkey;Database=skud_db` 
我还检查了:

  • dns,它解析app1没有问题
  • 服务器和我的电脑上的防火墙规则
  • 3050端口已打开
  • 当这个问题发生时,我试图用相同的连接参数连接FlameRobin。它连接起来没有任何问题
  • 另外,10或15分钟后,我的应用程序恢复正常工作。问题可能在会议中。但我总是在sql查询后在我的应用程序中使用“
    连接.关闭”
    ”。我尝试使用不同的身份验证凭据进行连接,但没有解决我的问题

    还是不明白我的问题在哪里

    以下是我的部分功能:

    string ConnectionString = "character set=UTF8;data source=app1;Port=3050;user id=SYSDBA;password=masterkey;Database=skud_db";
    FbConnection tempConnection = new FbConnection(ConnectionString);
    tempConnection.Open();
    DataSet DS = new DataSet("SUBDIV_REF");
    string SQLCommandText = "SELECT * FROM SUBDIV_REF WHERE VISIBLE=1";
    FbDataAdapter DAREGEVENTS = new FbDataAdapter(SQLCommandText, tempConnection);
    FbCommand CMDREGEVENTS = new FbCommand(SQLCommandText);
    DAREGEVENTS.Fill(DS, "SUBDIV_REF");
    DataTable DT_REG_EV = DS.Tables["SUBDIV_REF"];
    Department.DataSource = DS.Tables["SUBDIV_REF"];
    Department.DisplayMember = "DISPLAY_NAME";
    
    tempConnection.Close();
    
    堆栈跟踪:

    в FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
       в FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.CreateNewConnection(FbConnectionString connectionString, FbConnection owner)
       в FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.CreateNewConnectionIfPossibleImpl(FbConnectionString connectionString, FbConnection owner)
       в FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.GetConnection(FbConnection owner)
       в FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Get(FbConnectionString connectionString, FbConnection owner)
       в FirebirdSql.Data.FirebirdClient.FbConnection.Open()
       в Skud2015.Form1.button1_Click(Object sender, EventArgs e) в c:\Users\baynazarov_as\Documents\Visual Studio 2013\Projects\Skud2015\Skud2015\Form1.cs:строка 110
       в System.Windows.Forms.Control.OnClick(EventArgs e)
       в System.Windows.Forms.Button.OnClick(EventArgs e)
       в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       в System.Windows.Forms.Control.WndProc(Message& m)
       в System.Windows.Forms.ButtonBase.WndProc(Message& m)
       в System.Windows.Forms.Button.WndProc(Message& m)
       в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       в System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       в System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       в System.Windows.Forms.Application.Run(Form mainForm)
       в Skud2015.Program.Main() в c:\Users\baynazarov_as\Documents\Visual Studio 2013\Projects\Skud2015\Skud2015\Program.cs:строка 19
       в System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       в System.Threading.ThreadHelper.ThreadStart()
    
    此外,InnerException/StackTrace:

    в FirebirdSql.Data.Client.Managed.Version10.GdsConnection.Connect()
       в FirebirdSql.Data.FirebirdClient.ClientFactory.CreateManagedDatabase(FbConnectionString options)
       в FirebirdSql.Data.FirebirdClient.ClientFactory.CreateDatabase(FbConnectionString options)
       в FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
    

    firebird.log里有什么东西吗?您是否有防火墙或virusscanner限制您的连接?顺便说一句:奇怪的是,您的第一个故障排除步骤之一是重新安装操作系统:您的计算机是否有(或有)其他问题。我在日志中有这个错误:INET/INET\u error:read errno=10054。正如我在应用防火墙规则之前所说的,这允许我连接(其他方式不连接),我在这台电脑上除了操作系统和Visual Studio之外没有其他东西。为了完全排除操作系统问题,我重新安装了它。错误10054是由对等方重置连接,这通常意味着连接没有正确关闭(例如,应用程序在未关闭连接的情况下退出,或者被防火墙关闭),正如我之前写的,当出现此问题时,我仍然可以使用FlameRobin连接到DB。这意味着不存在阻止连接的防火墙策略。您可以发布异常的stacktrace吗?并指定您正在使用的Firebird.NET提供程序的版本