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

Managing timezones

php timezone

I have gone through many timezone/PHP posts, and most suggest storing your datetime fields in UTC, then using the application users timezone offset when storing and displaying datetime information....

Why my rehosted WF4.0 designer does not display the xaml file name on the Designer Surface

xaml workflow workflow-foundation-4

As you can see on the left top corner of the middle pane instead of a workflow xaml file name you see the following _48d3 which I believe is the default class name. What have I done wrong because I

Linux-MIPS syscall-saved registers?

c linux assembly mips system-calls

Which registers are saved across syscalls (not function calls, the actual round-trip to kernelspace via the syscall instruction) on Linux/MIPS?