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
- :
- Dynamic IP Address in web.config
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
‎Jul 15, 2010
01:33 AM
Dynamic IP Address in web.config
Please help me how to get the IP address of the local machine (assuming local machine has IIS installed) where setup.exe is installed using install shield setup.
I want to change the host ip address through XML File Changes wizard in the Install shield basic project just like the below example.
I knew the following code/property will dynamically get the sql server's, server name, database name, sql server user id and sql server password.
Data Source=[IS_SQLSERVER_SERVER];Initial Catalog=[IS_SQLSERVER_DATABASE];Integrated Security=False;User ID=[IS_SQLSERVER_USERNAME];Password=[IS_SQLSERVER_PASSWORD]
What is the similar syntax to get the IP address of the local machine?
For eg., My scenario in web.config file is as follows
Regards,
Srivignesh Jaganathan
I want to change the host ip address through XML File Changes wizard in the Install shield basic project just like the below example.
I knew the following code/property will dynamically get the sql server's, server name, database name, sql server user id and sql server password.
Data Source=[IS_SQLSERVER_SERVER];Initial Catalog=[IS_SQLSERVER_DATABASE];Integrated Security=False;User ID=[IS_SQLSERVER_USERNAME];Password=[IS_SQLSERVER_PASSWORD]
What is the similar syntax to get the IP address of the local machine?
For eg., My scenario in web.config file is as follows
Regards,
Srivignesh Jaganathan
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2010
03:39 PM
There's no built-in property for the IP address, but for some approaches using scripting you might look around www.installsite.org in the InstallScript Samples > Network category.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2010
01:02 PM
jsvignesh wrote:
What is the similar syntax to get the IP address of the local machine?
127.0.0.1
Other then using the loopback IP, this is a very bad idea to put the current IP into the web.config. If the machine's IP changes, or it's cloned your application will become broken. It would be better for your webapp to make calls into System.Net.Dns.GetHostByName() at runtime.