.NET Remoting or Direct Connection to SQL Server 2005 Express

Hi,
 
I'm currently designing an application that I want to be able to connect to a SQL Server 2005 Express either locally, over the LAN or through the internet.

What is the best way to go about this:-

1. Should I allow the client application to connect directly to the SQL Server 2005 Express database whether the database be on the local machine, over the LAN or through the internet.

2. Should I use .NET Remoting by use of a server application to allow connection to the SQL Server 2005 Express database whether they be local, over the LAN or through the internet.

3. Should I architect the client application to connect to the SQL Server 2005 Express database directly if local and .NET Remoting if over the LAN or through the internet.

Web services is not an option because I cannot guarantee that the user will have IIS.

Thanks in advance.

Geoff.


Answer this question

.NET Remoting or Direct Connection to SQL Server 2005 Express

  • Andy En

    Hi and thanks for your comments. Yeah I recognise SQL Server 2005 Express has limitations but I thought I would explain the application a little more to give you an idea of how I want to use the database.

    My application is basically going to be a hobbyist catalogue so it will mainly be single user but there is protential within the application to attract small businesses to use the application up to as many as 10 users on a LAN with a couple connecting over the internet. The user can create as many databases as they want and can instruct the application to connect to any of them, one at a time whether they be local or remote.

    Regardless of how big the installation is I wanted to ensure that the user could connect to the database locally, over the LAN or through the internet. Based on these requirements should I design the application to:

    Local

    1. Connect to the SQL Server 2005 Express database directly.
    2. Connect to a server application which in turns connects to the SQL Server 2005 Express database and serves the data. (.NET Remoting)

    LAN

    1. Connect to the SQL Server 2005 Express database directly.
    2. Connect to a server application which in turns connects to the SQL Server 2005 Express database and serves the data. (.NET Remoting)

    Internet

    1. Connect to the SQL Server 2005 Express database directly.
    2. Connect to a server application which in turns connects to the SQL Server 2005 Express database and serves the data. (.NET Remoting)

    If the answer is develop a .NET Remoting server application to allow connection to the SQL Server 2005 Express database over the Internet and probably through the LAN, should I just do the same for local as well and save a lot of coding to do both

    Geoff.

  • Mart10

    If its possible, then yes its a better sollution.

    Can you give some references about this

    From what I know it was possible to host a webservice on a windows service application, you would need to reference IIS API and the service would be like a secondary web server application. The advantages are flexibility and more control of the web server environment.

    IMO the advantages of webservices versus remoting are:
    - If you can't install a windows service to be the remoting server
    - If you want to avoid your communication port being blocked by a firewall
    - You want interoperability with other systems

    Remoting can use HTTP channel too and will avoid firewall blocking, but I don't like this option, think that webservices are better suited on this scenario.

    The main advantage of remoting is the reduced data transfer if you use a binary channel.

    If its possible to not have a web server installed and still use web services, its great! Paste some links please.

    Best regards.

    Fernando Cardoso

  • JLG

    Thanks for your comments.

    Yeah sure... here's a link:

    http://www.msdn.microsoft.com/webservices/webservices/building/wse/default.aspx

    Look on the right under the Essensials links for more information, WSE can run over tcp as well as http but you can also create your own transports as well like udp or even smtp.

    Let me know what you think.

    Geoff.

  • Mage1

    Yes, I would use remoting on these scenarios if you want to hide the credentials to access the SQL Server. You can have a configuration screen on your software to locate the Server.

    If you don't need to hide the credentials and want to give full control to your users to choose the right credentials to access your SQL Server, them Direct Connection is a better option.

    Best regards.

    Fernando Cardoso

  • Corneliu Barsan_MS

    Hi, Thought I would give an update...

    .NET Remoting was probably the best choice to go with at the time but after further reading I keep getting told .NET Remoting is more suited for LAN applications than the internet. Now my application needs to connect to the database locally, over the LAN or through the internet. Web Services were more suited to internet but I knew at the time that I would need IIS loaded on the users machine to use Web Services and this was definately a no no for my application.

    With the introduction of WSE 3.0 (I think this was possible in 2.0 but missed that one Tongue Tied) you can build a web service into a windows service application, this really rocks because I don't need IIS installed afterall and I will be inline with the upcoming Indigo roadmap.

    So my client application will talk to a web service running on a windows service application either locally, over the LAN or through the internet.

    What do you think; will this work better

    Geoff.

  • Jack Catheline

    I think your first response was incorrect. SQL Server 2005 does not have any limitations on the number of simultaneous users. You are limited to 1 CPU, 1 GB of memory and 4GB per database, but there is no connection limitation.

    --
    Sincerely,
    Stephen Dybing
     
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Please reply to the newsgroups only, thanks.
    SQL Server 2005 Express have limitations on the number of simultaneous users, I don't know if it will be an issue to you...

    I think that you have two options based on your control of the SQL Server instance:

    1 - If you will have control of the SQL Server instance and don't use the Express edition, the webservices are the best option.
    2 - If you dont have control of the SQL Server instance or if you use the Express edition, use remoting to communicate with the SQL, that way you will not expose SQL location if not needed and will have a single way to access your SQL.

    Best regards.

    Fernando Cardoso

  • Shivan4u

    Uh, SQL Server 2005 Express is what I meant, not SQL Server 2005. :-) -- Sincerely, Stephen Dybing This posting is provided "AS IS" with no warranties, and confers no rights. Please reply to the newsgroups only, thanks. "Steve Dybing [MSFT]" wrote in message news:uD5vrXW7FHA.1616@TK2MSFTNGSA02.privatenews.microsoft.com... I think your first response was incorrect. SQL Server 2005 does not have any limitations on the number of simultaneous users. You are limited to 1 CPU, 1 GB of memory and 4GB per database, but there is no connection limitation. -- Sincerely, Stephen Dybing This posting is provided "AS IS" with no warranties, and confers no rights. Please reply to the newsgroups only, thanks. wrote in message news:8eade803-9882-49e5-a787-66fe5e50255c@discussions.microsoft.com... SQL Server 2005 Express have limitations on the number of simultaneous users, I don't know if it will be an issue to you... I think that you have two options based on your control of the SQL Server instance: 1 - If you will have control of the SQL Server instance and don't use the Express edition, the webservices are the best option. 2 - If you dont have control of the SQL Server instance or if you use the Express edition, use remoting to communicate with the SQL, that way you will not expose SQL location if not needed and will have a single way to access your SQL. Best regards. Fernando Cardoso
  • Anand Nathan

    SQL Server 2005 Express have limitations on the number of simultaneous users, I don't know if it will be an issue to you...

    I think that you have two options based on your control of the SQL Server instance:

    1 - If you will have control of the SQL Server instance and don't use the Express edition, the webservices are the best option.
    2 - If you dont have control of the SQL Server instance or if you use the Express edition, use remoting to communicate with the SQL, that way you will not expose SQL location if not needed and will have a single way to access your SQL.

    Best regards.

    Fernando Cardoso

  • .NET Remoting or Direct Connection to SQL Server 2005 Express