O'Reilly Forums: Choosing Appropriate Sections Of Web.config - O'Reilly Forums
Jump to content
Choosing Appropriate Sections Of Web.config
Development or production server?
- New Member
-
-
Group:
Members
-
Posts:
7
-
Joined:
07-March 09
Posted 07 March 2009 - 06:15 PM
Hi
I've had a good read through this book, but one thing I didn't find was an explanation of the best practice for selecting, say, the appropriate connection string or SMTP server address based on, for example, debug/release configurations, or whether the requested URL is localhost or a production server.
Does anyone know where I can find information on best practice in this scenario?
Regards, Mark
0
- Active Member
-

-
Group:
O'Reilly Author
-
Posts:
23
-
Joined:
17-September 08
-
Gender:Male
-
Location:UK
Posted 09 March 2009 - 05:27 AM
Hi Mark, Yes, customizing your builds so that the right conn strings and smtp servers are in the config file isn't in the book. There are quite a few ways to do it and it's not specifically in the remit of thebook, so I left it out. The Web Deployment Project willl do that for you, but as noted in the book, a WDP essentially just changes the build file for the solution, so you could look straight at that instead. One other option is to create custom sections in your web.config, one for each server and then use the server's IP address to figure out which custom section to use when the website is started. To be honest, I'm not sure if there is a best practice for this, but there are several more suggestions here on Stack Overflow. Hope that helps, Dan
0
- New Member
-
-
Group:
Members
-
Posts:
7
-
Joined:
07-March 09
Posted 09 March 2009 - 06:18 AM
Thanks for your reply Dan.
As I mentioned in an entirely different topic, I am quite happy creating a Web Deployment Project, and I understand how to do the configuration in that way. However, I don't know how to actually execute the deployment project to perform the deployment. How do I do that??
Regards, Mark
0
- Active Member
-

-
Group:
O'Reilly Author
-
Posts:
23
-
Joined:
17-September 08
-
Gender:Male
-
Location:UK
Posted 22 March 2009 - 07:36 AM
Thanks for your reply Dan.
As I mentioned in an entirely different topic, I am quite happy creating a Web Deployment Project, and I understand how to do the configuration in that way. However, I don't know how to actually execute the deployment project to perform the deployment. How do I do that??
Regards, Mark No problem Mark, A web deployment project 'runs' when the web site solution is built, so you just need to compile the web site. As to specifying the location for deployment, the web deployment tool compiles and prepares web site code for use on a web site. If the web server (IIS) is on the same box as VS, it can create a virtual directory for it automatically. To actually copy the files to a remote address as you want, you'll need to set that up using the Publish Web wizard (the dialog is shown on p1032). Once it is set up, hitting "Publish Web" will recompile the site along with the deployment project and then publish the files generated to your required location. Hope that helps, Dan
0
- New Member
-
-
Group:
Members
-
Posts:
9
-
Joined:
30-December 09
Posted 29 May 2010 - 08:32 PM
Hi Mark, Yes, customizing your builds so that the right conn strings and smtp servers are in the config file isn't in the book. There are quite a few ways to do it and it's not specifically in the remit of thebook, so I left it out. The Web Deployment Project willl do that for you, but as noted in the book, a WDP essentially just changes the build file for the solution, so you could look straight at that instead. One other option is to create custom sections in your web.config, one for each server and then use the server's IP address to figure out which custom section to use when the website is started. To be honest, I'm not sure if there is a best practice for this, but there are several more suggestions here on Stack Overflow. Hope that helps, Dan Thanks for sharing a good tips
Rajendra Dhakal
0
- New Member
-
-
Group:
Members
-
Posts:
6
-
Joined:
12-October 12
Posted 21 January 2013 - 12:42 AM
Once logged into your control panel, click the MySQL icon or text MySQL Databases to access the configuration and setup section, as we need to create a database and setup a user and password for our WordPress installation.
Once on the MySQL Database configuration page look for the section that says "New Database". Enter a name for your database in the field.
SharePoint Development
Thanks.
0
Share this topic:
1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

|