Tutorial :SubSonic deployment and changing connectionstrings



Question:

I used Subsonic to build the DAL for one of my web applications. When I move it from my test server to the production server I change the connectionstring to point to the production datasource but the app still runs against the test DB. Is the connection information stored someplace else in addition to the Web.config?

What are the best practices for deploying web apps built using Subsonic?

TIA

John


Solution:1

In your SubSonicService configuration section, does the connectionStringName attribute point to the correct connection string?


Solution:2

Here is an example of my config.

        <!--########################## Connection Strings ###############################-->          <connectionStrings>          <clear/>          <add name="Ajax"   connectionString="Data Source=Ajax1;Initial Catalog=AjaxExample_test;User ID=Webuser;Password=Pinecone!"   providerName="System.Data.SqlClient"/>          </connectionStrings>          <!--########################## SubSonic ###############################-->              <SubSonicService defaultProvider="AjaxProv">               <providers>                <clear/>               <add name="AjaxProv" type="SubSonic.SqlDataProvider, SubSonic"       connectionStringName="Ajax"       generatedNamespace="ICBA.Web.SalesForce.StagingDAL"       appendWith=""       stripColumnText=""       relatedTableLoadPrefix=""       enableTrace="false"       extractClassNameFromSPName="false"       fixDatabaseObjectCasing="true"       fixPluralClassNames="true"       generateLazyLoads="false"       generateNullableProperties="true"       generateODSControllers="true"       generateRelatedTablesAsProperties="false"       includeProcedureList="*"       excludeTableList=""       includeTableList="*"       regexDictionaryReplace="TypeCode,typecode"       regexIgnoreCase="true"       removeUnderscores="true"       setPropertyDefaultsFromDatabase="false"       useExtendedProperties="false"       useSPs="true"/>             </providers>            </SubSonicService>  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »