Defining connectionString for remotely hosted SQL Server

后端 未结 3 1429
谎友^
谎友^ 2021-01-01 02:43

At the moment I have the following definition in my Web.config` file:

  
    

        
相关标签:
3条回答
  • 2021-01-01 03:21

    Try using Connection String in this Format

    <connectionStrings>
    <add name="SQLconnString" connectionString="Data Source=246.185.231.253;Initial Catalog=DNAME;User ID=SampleUID;Password=SamplePWD;timeout=6000" />
    </connectionStrings>
    

    This Might help you!

    0 讨论(0)
  • 2021-01-01 03:25

    Modify your connection string as

    connectionString = "data source=sql-database / 10.0.0.11; User ID = myUsername; PassWord = your password "
    
    0 讨论(0)
  • 2021-01-01 03:26

    Server Name: IP-Address\Database-instance,Port

    You can not directly. you need to have TCP/IP enabled and configured the TCP/IP Ports on sql server configuration manager at remote server.

    Go through it: Configurations-Remote-Server

    Or if it already configured then just contact DBA for the hosted server for providing the proper connection string.

    you need to have TCP/IP connectivity .Just launch it, enter the DNS host name or IP address in the Server Name' box and hit Connect. The hosting company needs to have enabling TCP/IP on your SQL Server instance, and them providing you with secure access to the IP address that instance is running on.

    Then it would be in this form:

    connectionString="Data Source=Server_Name;Initial Catalog=Database_Name;
    User ID=XXXX;Password=XXXX;Integrated Security=True;"
    providerName="Provider_Name"
    

    Most administrators do not allow direct access to the SQL Server from outside the firewall. In that case, if you can connect to the host over VPN then you should be able to connect directly to the server with Enterprise Manager or SQL Management Studio.

    0 讨论(0)
提交回复
热议问题