This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- windows auth and web.config - basic msi
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 24, 2009
10:02 AM
windows auth and web.config - basic msi
Hi,
I know how to configure my web.config file with the manual server connection dialog (when the sql connection is asked) but I don't know how to configure my web.config when the customer choose the windows Authentification? it seems that it's not the same property to get the user and the pwd...
furthermore, does some know if it's possible to create a SQL instance instead of browsing it ?
Thanks
I know how to configure my web.config file with the manual server connection dialog (when the sql connection is asked) but I don't know how to configure my web.config when the customer choose the windows Authentification? it seems that it's not the same property to get the user and the pwd...
furthermore, does some know if it's possible to create a SQL instance instead of browsing it ?
Thanks
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 24, 2009
10:20 AM
When you set windows authentication it doesn't have a username and password property because it uses the credentials of the user running the application. Now with web applications this means something completely different. What it means by default is the service account running IIS which is usually the system account. But wait... it's not a good idea to go changing that account to something else just to suit your web application or go off permissioning the system account to the database etc. The best way to do this is to create a new application pool in IIS and assign your website to that application pool. In the properties of the application pool are identity details. If you set your account in there then you should be good to go. You can set all of this up using Installshield built-in functionality and the username and passwords can be set up to use properties from your install dialogs
😄
😄
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 30, 2009
11:12 AM
I tried that but it's not what I want.
here is the web.config line i want to configure:
" connectionString="Data Source='%SERVER%';Initial Catalog=cml3;User Id=%UID%;Password=%PWD%; "
%SERVER% : it's the path for the database file, for that it's ok
%UID and %PWD% refer to the database users and for now I can configure it only when the customer chose sql authentification in the SQL login dialog (using text replacement). So, when the user chose windows auth, the properties i use don't work (IS_SQLSERVER_USERNAME and IS_SQLSERVER_PASSWORD) cause they are not the same (naturally...).
it seems that it use %USERNAME% windows environment property but i'm not sure, and I don't know for the password yet (maybe %PASSWORD% ?).
Even if it is correct, how can i do to select the good property according to the customer's choice? (windows auth or sql auth)
Now my boss wants another option: creating a new server inscription with specific users (like one admin and 2 users). He thinks that will help cause we would know how to configure our web.config ( with for example the "admin" profile )
Thanks again
here is the web.config line i want to configure:
" connectionString="Data Source='%SERVER%';Initial Catalog=cml3;User Id=%UID%;Password=%PWD%; "
%SERVER% : it's the path for the database file, for that it's ok
%UID and %PWD% refer to the database users and for now I can configure it only when the customer chose sql authentification in the SQL login dialog (using text replacement). So, when the user chose windows auth, the properties i use don't work (IS_SQLSERVER_USERNAME and IS_SQLSERVER_PASSWORD) cause they are not the same (naturally...).
it seems that it use %USERNAME% windows environment property but i'm not sure, and I don't know for the password yet (maybe %PASSWORD% ?).
Even if it is correct, how can i do to select the good property according to the customer's choice? (windows auth or sql auth)
Now my boss wants another option: creating a new server inscription with specific users (like one admin and 2 users). He thinks that will help cause we would know how to configure our web.config ( with for example the "admin" profile )
Thanks again
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 30, 2009
11:30 AM
when using windows integrated security the connection string looks a little different.
normally you would use something like this
"Data Source=Your_Server_Name;Initial Catalog= Your_Database_Name;UserId=Your_Username;Password=Your_Password;"
in windows integrated security it would look like this.
"Data Source=Your_Server_Name;Initial Catalog=Your_Database_Name;Integrated Security=SSPI;"
there may be other configuration that needs to occur that I am not aware of as we don't use the integrated security.
normally you would use something like this
"Data Source=Your_Server_Name;Initial Catalog= Your_Database_Name;UserId=Your_Username;Password=Your_Password;"
in windows integrated security it would look like this.
"Data Source=Your_Server_Name;Initial Catalog=Your_Database_Name;Integrated Security=SSPI;"
there may be other configuration that needs to occur that I am not aware of as we don't use the integrated security.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2009
07:22 AM
As stated before when using integrated security it uses the service account to attach to the database. You CANNOT specify a username and password. So the ONLY way to use integrated security is to change the IIS service account and continue to use the default application pool or to create your own application pool and use the credentials in the identity rather than specifying them in a connection string. User Id and password properties can only be used with SQL authentication connection strings. Secondly, if you could specify windows credentials this would mean you will have an open text username and password in an unencrypted file. If you are worried about wanting to use credentials provided by the user in your GUI, then it's worth noting that you can provide your application pool credentials using installer properties (please note this is easier to edit in the table directly because the GUI will show asterisks for the password when you enter your property)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 06, 2009
08:00 AM
Thanks all of you, it's ok now. 😉
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)