I'm just starting to get into some Service programming (WCF). I've successfully tried out the Microsoft WCF tutorial and got mathematical results from the service. Now I'm trying to set up a SQL Server Express database on the Service side so that it can allow the client to either retrieve data from the database or submit data via the service function calls and returns.
However, when I attempt to connect to the database on the service side, I get an error.
I selected Microsoft SQL Server Database File for the database type and Windows Authentication.
The connection string looks like this: "Data Source=.\\SQLEXPRESS; AttachDbFilename=(filepath);Integrated Security=True;Connect Timeout=30;User Instance=True"
When I Test the connection, I get this:
"An attempt to attach an auto-named database file for (filepath) failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
I'm guessing this is because I'm attempting it with a SQL Server 2008 Express file rather than a SQL Server 2008 file (I had to select the All Files *.* filter in order to see my database file for selection). Is there any way to experiment with a WCF Service programmed in C# accessing a SQL Server 2008 Express file?
Thanks for any insight.