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.

.NET Remoting or Direct Connection to SQL Server 2005 Express
Andy En
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
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
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
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
.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
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
--
Sincerely,
Stephen Dybing
Please reply to the newsgroups only, thanks.
Shivan4u
Anand Nathan
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