It seems to me that a lot of people are getting similar problems to this, but I can't find a definitive answer, an actual explanation of how to correct it, just a lot of do's and don'ts !!!
I have created a small C# Windows Form Project using Visual Studio C# Express, SQL Server Express 2008 R2 and MS SQL Server Management Studio using this PC. It works fine as it is and I now want to test it on my laptop.
I clicked Project / Publish & followed the Wizard until it created a Folder called Application Files, a "ClickOnce Application Deployment Manifest" file and a Setup file all within my Published Projects Folder.
I then copied these 3 files to a USB and ran the Setup on my laptop. It installed a number of things and then came up with an MS .net Framework Error message saying "Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately. Cannot open database XXX requested by the login. The Login failed. The Login failed for user AAA"
Indeed, if I click Continue, the program starts to run and works until it tries to access the database, when I get the same message. Can somebody please explain clearly what I am doing wrong, or what I need to do to resolve this problem ?!?