I guess this is a basic problem which every beginner to Client-Server is looking for: I have developed a C#.NET
Client
-Server
Software.
A basic overview of the application
Application contains a built-in Database, so that if server is not available user can use the database that is available their with their local System. And if the Database is available at Server then the Server database will be used. Both the database synchronize
with each other on a click of button. So I have two connection strings, one is for Local System and another one is for Server. They both are getting dynamically created.
For : Client Setup -> Right now I am using Click One Application
- My client system uses a Local Database which I use to install along with my application.
PROBLEM 1:
I have a SQL Server Express based database deployment. I created a clickone application with prerequisites like SQL Server 2008. When I install my clickone my application gets installed properly without any errors, but while starting the application, it gives me error that my application is unable to find database at C:\Users\Xnor\AppData\Local\Apps\2.0\Data\N24R9574.9H1\V0Q1MX0C.0X9\....
I surfed stackoverflow and found that copying my .mdf
to this location will fix my problem. But why is this happening. Why not it copies itself?
Isn't there any way to attach the DB permanently to my application, so that i can avoid this manual work?
Everywhere its just instructions to copy .mdf
file to that location and that's it. So is there any way that could work, maybe if it is possible and suggestible that .mdf
would be attached in resources and could be used from there. Looking for expert advice, the best way to accomplish it.
For Server:
I use to install Microsoft SQL Server Management Studio Express
and then I use to create Database there for my Server and then IT use to work along with my application.
PROBLEM 2
How can I take these steps down. As telling non-IT people and teaching them to install Microsoft SQL Server Management Studio Express
all the time on server and then creating a Database on that and after that giving its connection string to the application to make it work brings lot many issues.
So my basic requirement is just to give a smooth experience to user while installation. As the guys doing installations are not a tall geeks. They can do Next
Next
Next
but they don't like to do so many configurations. Is there any professional way of doing this. As I guess this is the most important thing with Client-Server softwares and I have never seen such softwares to ask you to do so many configurations.
I am not willing to use Click-one Deployment as it looks very unprofessional and I feel its very limited with features. So kindly suggest some other alternate which can serve to this requirement.
Also I am wondering that this is a very important thing, and there is no ready-made tutorial I was able to find on google and youtube, and I am helpless on finding a right direction on How to automatize this thing, or may be a way so that I can reduce the steps.
I am ready to deploy two setups: One for client and one for server
Kindly let me know if any other information is required. Looking forward for a great support. Regards.