SQL Server Connexion string throw a proxy with EF RRS feed

  • Question

  • I have asked some day later about config of the EF (Entity Framework) to connect to the sql server via proxy.

    I don't have any replay according to my probleme. So if here we can help me please.


    Now I want to get a StringConnexion for EF that allow proxy or the config is included to the StringConnexion.

    The connexion now is using a url,port exemple:,23455 like as follow:

    connectionString="metadata=res://*/Data.DatabasesMappers.MyDBMapper.csdl|res://*/Data.DatabasesMappers.MyDBMapper.ssdl|res://*/Data.DatabasesMappers.MyDBMapper.msl;provider=System.Data.SqlClient;provider connection string="data,23455;initial catalog=MyDB;user id=MyUser;password=ThePassword;MultipleActiveResultSets=True;App=EntityFramework""

    What I could add on the ConnexionString to be able to connect throw a proxy.


    • Moved by Bob Beauchemin Sunday, January 25, 2015 7:42 PM Moved to a more relevant forum
    Sunday, January 25, 2015 11:48 AM


All replies

  • Hi,

    What you need to do, is to ensure your connection string is something like
    		<add name="conn2" connectionString="Data Source=192.?.?.?\your_db_instance;Initial Catalog=your_db_schema;Integrated Security=False;User ID=your_db_login;Password=??????" providerName="System.Data.SqlClient"/>

    within Web.config/app.config file in your project, to ensure the project will work fine with the database.

    Many Thanks & Best Regards, Hua Min

    Sunday, January 25, 2015 12:45 PM
  • I'm using Entity Framework, it generate automatically the StringConnection. My application work file with direct internet access (direct ADSL). But in a company, they connect to the internet throw a proxy. My app don't work (Server timeout).

    So, they configure Internet Explorer or Skype. But on my app, I haven't the config of proxy. They ask me to add this functionality on my app. So I'm searching a way to configure Entity Framework or it ConnectionString to work with a proxy. 

    How can I do that ?


    Sunday, January 25, 2015 3:00 PM
  • You can't connect directly to SQL Server using HTTP. 

    So if you can't get a firewall rule to allow outgoing TCP/IP connections to your SQL Server, you may need to put an OData service between your application and the database server.



    • Marked as answer by nadjibnet Sunday, February 1, 2015 11:25 AM
    Sunday, January 25, 2015 4:24 PM
  • OK, Is it right that the Proxy can be used only for the protocol HTTP. The TCP/IP connection cannot be able pass by a proxy to connect to the server via internet ?
    • Edited by nadjibnet Sunday, January 25, 2015 4:37 PM
    Sunday, January 25, 2015 4:36 PM
  • >The TCP/IP connection cannot be able pass by a proxy to connect to the server via internet ?

    A TCP/IP connection cannot pass through a HTTP proxy.  There are TCP/IP based products that will "proxy" the traffic.



    Sunday, January 25, 2015 6:31 PM