deploying to production server


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Great! BigGrin
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Exactly what I wanted. Thanks.

Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
All of this is entirely up to you as to how you would like to pull the connection string.  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.  You can also place a test to determine which server you are on.  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.

For example, the following code would look to see if the subdomain was different and create a connection based on that:

Dim lcHost As String = Request.Url.Host
Dim lcSubDomain As String = lcHost.Split(New Char() {"."c})(0)
       
'-- Set the session type
If lcSubDomain.Equals("www", StringComparison.OrdinalIgnoreCase) Then
    DataBasics.DataSources.Add(New MicroFour.StrataFrame.Data.SqlDataSourceItem("", "connectionstring1"))
ElseIf lcSubDomain.Equals("support", StringComparison.OrdinalIgnoreCase) Then
    DataBasics.DataSources.Add(New MicroFour.StrataFrame.Data.SqlDataSourceItem("", "connectionstring2"))
End If

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
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.



Any idea how to accomplish this?



Can I write some code to query the server name or other identifier to evaluate against?

I am sure you can I just don't know how.

Keith Chisarik
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
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?



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.

Keith Chisarik
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search