SQL Server Database File and WCF

I have a WCF Service that exposes a method GetCustomers(). The internals of the method uses a Data Layer along with a Business Layer to return a List of Customers. Currently I am using an SQL Server Database file saved on the server. Everything works fine on my local network but I want to move this to the web.

I thought the best method would be to create an IIS WCF Service which makes calls to the current WCF Service's GetCustomers(). I haven't had much experience with the SQL Server Database Files but I figured I would need to move the .mdf file to the IIS WCF Service App_Data folder but I'm not sure how to change the database connectionstring and get all this to work properly. The only thing I can figure is that I will have to re-implement the GetCustomers() method in the IIS WCF Service and point it to the correct database. It seems like I shouldn't have to do this though.

I know that if I where hosting the DB in a full SQL Server implementation that this wouldn't be a problem because the connectionstring wouldn't change. That is not an option at this point.

I think I am making this more difficult than it should be.

Answers


I've got some bad news - you can't access SQL Server data files directly. You have to be running SQL Server.

You're taking the Access approach, which does work without any kind of Access Server - you just point your datasource at the file and you're done. SQL Server files do not work that way.

If your database is small, consider checking out Microsoft SQL Server Express, which has most of the power of SQL Server without the expensive licensing.


Need Your Help

Checkbox is always coming as unchecked

jquery asp.net-mvc kendo-ui kendo-grid telerik-mvc

I have following Kendo Grid ans associated jQuery. On a button click, I need to know whether checkbox is checked. But at present it is showing 'false' always. How can we correct it?

What could go wrong if I convert ANSI encoded files to UTF-8?

asp.net tfs utf-8 ansi

I have an existing ASP.NET 2.0 website, stored in Team Foundation Server 2005. Some of the pages/controls are encoded as ANSI (according to Notepad++) and the Content-Type header is set to:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.