﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WebForms (How do I?)  » deploying to production server</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 14 Sep 2026 17:32:07 GMT</lastBuildDate><ttl>20</ttl><item><title>deploying to production server</title><link>http://forum.strataframe.net/FindPost6368.aspx</link><description>Is there a way I can deploy my web app to a new SQL Server without having to recompile Global.asax with the new IP?&lt;br&gt;
&lt;br&gt;
Can I code it to read web.config or some other easier way, so I don't have to recompile or maintain two sets of compiled code, one for my test server and one for production and one for my test server.</description><pubDate>Mon, 29 Jan 2007 10:00:00 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: deploying to production server</title><link>http://forum.strataframe.net/FindPost6388.aspx</link><description>Great! :D</description><pubDate>Mon, 29 Jan 2007 10:00:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: deploying to production server</title><link>http://forum.strataframe.net/FindPost6384.aspx</link><description>Exactly what I wanted. Thanks.</description><pubDate>Mon, 29 Jan 2007 09:54:01 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: deploying to production server</title><link>http://forum.strataframe.net/FindPost6383.aspx</link><description>All of this is entirely up to you as to how you would like to pull the connection string.&amp;nbsp; Since the connection has to be manually specified anyway, it is really easy to have it pull from a config file or some other file.&amp;nbsp; You can also place a test to determine which server you are on.&amp;nbsp; If you host names will be different then you could just use the host name and test on that within the global.asax when defining the connection string.&lt;P&gt;For example, the following code would look to see if the subdomain was different and create a connection based on that:&lt;/P&gt;&lt;P&gt;[codesnippet]Dim lcHost As String = Request.Url.Host&lt;BR&gt;Dim lcSubDomain As String = lcHost.Split(New Char() {"."c})(0)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;'-- Set the session type&lt;BR&gt;If lcSubDomain.Equals("www", StringComparison.OrdinalIgnoreCase) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataBasics.DataSources.Add(New MicroFour.StrataFrame.Data.SqlDataSourceItem("", "connectionstring1"))&lt;BR&gt;ElseIf lcSubDomain.Equals("support", StringComparison.OrdinalIgnoreCase) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataBasics.DataSources.Add(New MicroFour.StrataFrame.Data.SqlDataSourceItem("", "connectionstring2"))&lt;BR&gt;End If[/codesnippet]</description><pubDate>Mon, 29 Jan 2007 09:52:45 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: deploying to production server</title><link>http://forum.strataframe.net/FindPost6372.aspx</link><description>Actually what would be nice os if the code was smart enough to know if it was running an server A or server B and execute the correct DataLayer.DataSources.Add command against the correct SQL Server.&lt;br&gt;
&lt;br&gt;
Any idea how to accomplish this?&lt;br&gt;
&lt;br&gt;
Can I write some code to query the server name or other identifier to evaluate against?&lt;br&gt;
I am sure you can I just don't know how.</description><pubDate>Mon, 29 Jan 2007 09:26:04 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item></channel></rss>