Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > can't connect to sql server
 

can't connect to sql server

Dear all

I refer a dll in my windows application project , in that dll i make all the db connection and dbrelated operations. I can connect to the sql server from my development pc , but when i make the setup project and install it in another pc i cannot connect to the same sql server. the sql server is in different machine not in my development pc. what may be the problem?
how can i over come this?
edwin lazar  Sunday, July 12, 2009 8:39 PM
You have a design / architectural issue that is best solved by having the user run this as a configuration step after the install. The issue is that custom actions run with the LocalSystemn account, and usually that aacount has no network access privileges. The alternative is is to modify your MSI file (with Orca) so that your custom action runs with impersonation:

http://msdn.microsoft.com/en-us/library/aa368069(VS.85).aspxand see msidbCustomActionTypeNoImpersonate

but then on Vista and later it won't run with admin privileges.
Phil Wilson
PhilWilson  Monday, July 13, 2009 8:11 PM
You have a design / architectural issue that is best solved by having the user run this as a configuration step after the install. The issue is that custom actions run with the LocalSystemn account, and usually that aacount has no network access privileges. The alternative is is to modify your MSI file (with Orca) so that your custom action runs with impersonation:

http://msdn.microsoft.com/en-us/library/aa368069(VS.85).aspxand see msidbCustomActionTypeNoImpersonate

but then on Vista and later it won't run with admin privileges.
Phil Wilson
PhilWilson  Monday, July 13, 2009 8:11 PM

I add the localized resources in the setup project application folder, then the project is working fine inside my network.

thank you for your reply

edwin lazar  Tuesday, July 14, 2009 7:55 AM

You can use google to search for other answers

Custom Search

More Threads

• C# Project Deployment Issue
• Install multiple instances of an msi on one box?
• access javascript functions from web browser control
• Runtime Gridview without Datasource
• Click once deployment stopped working ... HELP!
• positioning of messageboxes
• COM isolation warnings
• Click Once overhead?
• Problems running embedded Windows Control with Server 2003?
• install latest version of product without uninstalling previous version