与在本地工作的informix数据库连接但在服务器上托管网站时无法正常工作

时间:2014-07-11 06:00:09

标签: asp.net database-connection informix

我在vs2012中开发了网站,并与informix数据库建立了连接。数据库安装在远程服务器中,我有连接到它的凭据,但访问权限有限。 问题是,当我在本地电脑上运行项目时,一切都运行良好,但是当我在远程服务器上上传相同的代码时,它无法正常工作。

这是我的网络配置。

<connectionStrings>

    <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Server=abc\SQLServer2008;Database=bdname;User ID=un;Password=pw;" />
    <add name="TrackingDBConnectionString" providerName="System.Data.SqlClient" connectionString="Server=abc\SQLServer2008;Database=Tracking;User ID=un;Password=pw;Connect Timeout=200; pooling=true; Max Pool Size=200" />

  </connectionStrings>
  <appSettings>


    <add key="ConnMembers" value="Host=host;Server=server;Service=123;Protocol=onsoctcp;Database=dbnm;Uid=un;Pwd=pw;" />
    <add key="ConnClaims" value="Host=host;Server=server;Service=123;Protocol=onsoctcp;Database=dbnm;Uid=un;Pwd=pw;" />
  </appSettings>
  <system.web>
    <customErrors mode="Off"></customErrors>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <pages>
      <namespaces>
        <add namespace="System.Web.Optimization" />
      </namespaces>
      <controls>
        <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
      </controls>
    </pages>
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>

不知道如何接近。 任何帮助,将不胜感激。 谢谢。

1 个答案:

答案 0 :(得分:0)

在客户端计算机上,您可能已经安装了Informix客户端。使用SetNet32(Informix客户端的一部分)配置远程服务器。还有ODBC驱动程序。配置与远程服务器的ODBC连接,并检查它是否有效。