where to change the database connection string?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 anos atrás
I am very new to nopCommerce, and Visual Studio. I have over 10 years of daily experience coding in classic ASP, but am clueless with this stuff.

My Goal:
Get nopcommerce site running locally, then publish to a dedicated server, but with the database running on SQL Azure.

Progress thus far:
Site is running at localhost on CE edition of SQL Server.
I have successfully created a SQL Azure database and run the Azure migration assistant. Now I have exact copy of database running on Azure, but I cannot figure out how to change the connection properties. I see a section in the web.config that refers to the SQL Server CE:



  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SqlServerCe.4.0" />
      <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    </DbProviderFactories>
  </system.data>




I'm not sure how to change that, or if that's even what I'm supposed to change..

I tried adding this to the web.config(with actual values), but it is still pulling data from the local machine:
    <connectionStrings>
        <add connectionString="Server=xxxxxx.database.windows.net;Uid=MY-UID-HERE;Database=MY-DATABASE-NAME-HERE;Pwd=MY-PASSWORD-HERE" name="MY-DATABASE-NAME-HERE" providerName="System.Data.SqlClient" />
    </connectionStrings>

Any help would be greatly appreciated-

Thanks,
Steve
11 anos atrás
App_Data/Settings.txt
11 anos atrás
SWW wrote:
App_Data/Settings.txt


That's the ticket...thanks a million!

I guess since I've got the topic open..
My next trick is to migrate the local site to my dedicated server.
I plan to just copy the site files to my server..and since the database is remote, it seems like it should work fine.

Aside from ensuring that my dedicated server has all the required tech specs, are there any other steps that I should take?



Thanks again,
Steve
10 anos atrás
What's the thinking behind tucking it away here?

What's wrong with Web,Debug.config and Web.Release.config?

After all, these two files, and their ability to modify the main web.config file depending on the build mode, are meant for this type of dev/release difference
9 anos atrás
Probably because you can setup the publish profile to not copy anything from App_Data at all.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.