Need help with deployment issue

L

louisryder23

We have developed a NET 2.0 WinForms app (Visual Studio Professional
2005 SP1/SQL Server 2005) that is ready for deployment at our
facilities.

The easiest deployment method we found is :
- use the ClickOnce publishing and copy the publish output to a shared
folder on the server (Windows 2003)
- from the client workstations (Windows XP) , browse to a mapped drive
(Z:) that is mapped to the shared folder on the server containing the
install files, and run Setup.exe

This method works fine, and whenever we have updates to the
application, we just copy the new publish output to the shared folder,
and then whenever a client runs the application next, it offers to
update the application on that client.

Now the problem we encountered is:
- We are using a configuration file that has the SQL Server connection
string stored in it. eg.
appname.exe.config

After doing a publish (at the development location), we need to be
able to customize the connection string on a site to site basis. But
this won't work as the installer gives an error about the file being
modified / hash mismatch.

Has anyone faced a similar problem and how have you worked around it?

Any recommendations?

Thanks in advance,
Louis Ryder
 
J

Jesse Houwing

Hello louisryder23,
We have developed a NET 2.0 WinForms app (Visual Studio Professional
2005 SP1/SQL Server 2005) that is ready for deployment at our
facilities.

The easiest deployment method we found is :
- use the ClickOnce publishing and copy the publish output to a shared
folder on the server (Windows 2003)
- from the client workstations (Windows XP) , browse to a mapped drive
(Z:) that is mapped to the shared folder on the server containing the
install files, and run Setup.exe
This method works fine, and whenever we have updates to the
application, we just copy the new publish output to the shared folder,
and then whenever a client runs the application next, it offers to
update the application on that client.

Now the problem we encountered is:
- We are using a configuration file that has the SQL Server connection
string stored in it. eg.
appname.exe.config
After doing a publish (at the development location), we need to be
able to customize the connection string on a site to site basis. But
this won't work as the installer gives an error about the file being
modified / hash mismatch.

Has anyone faced a similar problem and how have you worked around it?

Instead of reading the ConnectionString from the app.config, store it in
the user or machine settings with a default that comes from the app.config.

That way, when you start the application, you can save the correct connectionstring,
which is stored in the AppSettings folder for that application.
 
L

louisryder23

Instead of reading the ConnectionString from the app.config, store it in
the user or machine settings with a default that comes from the app.config.

That way, when you start the application, you can save the correct connectionstring,
which is stored in the AppSettings folder for that application.

The problem is: we need to have the connection string set only once by
the sites system administrator. Then when the application is installed
from the shared folder (publish output) , it should somehow pick this
connection string. Possible? Since we cannot modify files in a publish
- how else can we do it? Any ideas?
 
J

Jesse Houwing

Hello louisryder23,
The problem is: we need to have the connection string set only once by
the sites system administrator. Then when the application is installed
from the shared folder (publish output) , it should somehow pick this
connection string. Possible? Since we cannot modify files in a publish
- how else can we do it? Any ideas?

You could get the connectionstring from UDDI or store it in the registry.
You can retrieve a connectionstring from anywhere.

You can also store the connectionstring on a shared folder at the specified
site. or have the user pick which site he's in at the first run and store
all the connectionstrings in the config.

You have a lot of options there!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top