Modification of connection string in web.config
1. Modify the web.config file in <optimidoc_install_folder>\WebApp folder.
Find the following section in WebApp\web.config:
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"/>
</entityFramework>
<connectionStrings>
<add connectionString="Server=(LocalDB)\MSSQLLocalDB;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|OptimiDoc.mdf" name="OptimiDoc.Dao.OptimiDocDbContext" providerName="System.Data.SqlClient"/>
</connectionStrings>
and replace it with the following settings.
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
<connectionStrings>
<add connectionString="Server=<serverName>;Database=<database_name>;User ID=<user_name>;Password=<password>" name="OptimiDoc.Dao.OptimiDocDbContext" providerName="System.Data.SqlClient" />
</connectionStrings>
🖧🖹 |
Example |
<entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> </entityFramework> <connectionStrings> <add connectionString="Server=WIN-0MLBCMER9B6\OPTIMIDOC;Database=OptimiDoc;User ID=sa;Password=OptimiDoc2014" name="OptimiDoc.Dao.OptimiDocDbContext" providerName="System.Data.SqlClient" /> </connectionStrings> |
2. Restart the OptimiDoc website in IIS manager.

3. Open the OptimiDoc webpage and sign in with the username admin and password admin. The authentication result is Credentials incorrect.

4. Restart the OptimiDoc website once again and sign in to the OptimiDoc webpage with the username admin and password admin

5. The movement of the OptimiDoc database to SQL server is finished.