Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Problem while hosting to a service provider #2685


User avatar
0
avanekar02 created

Hello

I am trying to host the app on a shared windows hosting provider on mssql, i get the following error please tell me what should i do to solve the same

The model backing the 'CmsProTestDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (<a class="postlink" href="http://go.microsoft.com/fwlink/?LinkId=238269">http://go.microsoft.com/fwlink/?LinkId=238269</a>).

i have also attached screen shot of error.

Regards Anwar


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It seems like you didn't apply migrations to your database. Applying migrations should solve this problem.

  • User Avatar
    0
    avanekar02 created

    How to apply migrations

  • User Avatar
    0
    avanekar02 created

    As this has been copied to httpdocs folder and the database is on thier server , i do not know how to apply the migrations can you please explain how i can do this because Update-Database is run from the PM which is in VS 2015(i use) .

    SO how do i apply migration .

    Regards Anwar

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can use Migrator tool in your solution to apply migrations. If database allows remote connections, you can change connection string for migrator project and just run it. If not, you need to build migrator tool and copy it's output to a server which can access the database and run it there.