none
Is the Entitty framework possible with a database across a firewall? RRS feed

  • Question

  • We are trying to come up with some standards on how our applications are written, both internal and external.  The MVC pattern looked useful but it is most efficient when it uses the Entity framework.  That is fine for our internal applications but for our external applications they are set outside of the firewall with the datadase inside the fire wall. Can the Entity Framework handle this somehow or do we just choose to do the external applications by some other method.

    Any pointers as to how this should be done?

    Thursday, April 26, 2012 1:50 PM

Answers

  • EF just uses the underlying db. So if for example the connection string defines a fixed port to use so that you unblock only this port, it will work with EF (EF won't know about this, it just opens a connection as defined using the connection string).

    Now wether or not unblocking this port makes sense depends on your context. If they are "real" external applications you should likely use a web service, if they are "external" but yet in house you could perhaps decide to unblock this particular port possibly for particular IP addresses etc...

    It is REALLY unrelated to EF. It's a bit as if you asked if writing to a file with C# would work with a particular hard drive model. C# doesn't care, it just calls a function that opens a file and ultimately it goes lower at the driver level but C# doesn't care at all nor needs to know anything on the hard drive hardware.

    It seems rather you should post to an admin Windows group or a to a group related to administering the db you are using...


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".

    • Marked as answer by Terry Showers Thursday, April 26, 2012 5:54 PM
    Thursday, April 26, 2012 3:59 PM

All replies

  • Hi,

    You should rather ask in a forum about the db you'll use. Either you have to enable particular port(s) so that the db can be reached (for example http://support.microsoft.com/kb/287932) or if this is a no go you'll have to expose this another way (as a web service, not sure how "external" are those applications i.e. they are Windows applications at some far away external sites ?).

    Stricly speaking it's unrelated to EF as it happens at a lower layer and EF just uses whatever is at the lower layer...


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".


    Thursday, April 26, 2012 3:25 PM
  • So, the question is, if we can open a port will the entity framework work for us or is it just the wrong way to go about it and we should use web services or something else?

    We are trying to determine if we should continue to research the Entity Framework to do this or if it is a deadend for what we want to do.


    showet

    Thursday, April 26, 2012 3:42 PM
  • EF just uses the underlying db. So if for example the connection string defines a fixed port to use so that you unblock only this port, it will work with EF (EF won't know about this, it just opens a connection as defined using the connection string).

    Now wether or not unblocking this port makes sense depends on your context. If they are "real" external applications you should likely use a web service, if they are "external" but yet in house you could perhaps decide to unblock this particular port possibly for particular IP addresses etc...

    It is REALLY unrelated to EF. It's a bit as if you asked if writing to a file with C# would work with a particular hard drive model. C# doesn't care, it just calls a function that opens a file and ultimately it goes lower at the driver level but C# doesn't care at all nor needs to know anything on the hard drive hardware.

    It seems rather you should post to an admin Windows group or a to a group related to administering the db you are using...


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".

    • Marked as answer by Terry Showers Thursday, April 26, 2012 5:54 PM
    Thursday, April 26, 2012 3:59 PM
  • On 4/26/2012 9:50 AM, Terry Showers wrote:
    > We are trying to come up with some standards on how our applications are
    > written, both internal and external. The MVC pattern looked useful but
    > it is most efficient when it uses the Entity framework. That is fine for
    > our internal applications but for our external applications they are set
    > outside of the firewall with the datadase inside the fire wall. Can the
    > Entity Framework handle this somehow or do we just choose to do the
    > external applications by some other method.
    >
    > Any pointers as to how this should be done?
    >
     
    You should never expose the database to the public internet, and this
    has nothing to do with EF.
     
    You should be using some kind of N-Tier design pattern with UI layer
    facing the public, while the Business Logic and Data Access layers are
    behind the firewall in the infrastructure.
     
    UI layer
    MVC or MVP
    Service Layer
     
    ===== behind the firewall =====
     
    legacy Web service or WCF Web service
    Business Logic layer
    Data Access layer
    EF Model
     
    OR
     
    UI layer
    MVC or MVP
    Business Logic layer
    Service Layer
     
    ====== behind the firewall ========
    legacy Web service,  WCF Web service, or application server
     
    Data Access layer
    EF model
     
     
    Friday, April 27, 2012 3:47 AM