If you are receiving error like in title, then add in the reference :


Search for:


In my case it was in folder:

C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Packages\EntityFramework.5.0.0\lib\net40


Or you can do it with NuGet. Go to tools -> Library Packager Manager -> Manage NuGet Packages for Solution:

Then search for EntityFramework and install it:

If I understand it good, your controller has to look like:


public ActionResult Edit(int id)
  Partner partner = db.Partners.Find(id);
  ViewBag.Sifra = new SelectList(db.Partners, "Sifra", "Naziv", partner.Sifra);
  return View(partner);


@Html.DropDownList("Sifra", null, new { disabled = "disabled"})

If on 

Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus);

You are receiveng messages like:

The user instance login flag is not supported on this version of SQL Server. The connection will be closed. 


Unable to connect to SQL Server database.

Then check in your Web.config file:

add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"

    <add name="ApplicationServices"
         connectionString="Data Source=MyPC;

Connection string name must be same as name of SqlMembershipProvider connection string.

If after you receive error like:

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. 

Then in command prompt execute something like:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe -S MyServer -U MyUserId -P myPass -A all -d MyDb

And if you receive error like:

Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances

Then in MS SQL Server execute:

exec sp_configure 'user instances enabled', 1 Reconfigure

and restart server...

If you are receiving similar message, then there is code some part which is trying to determine your location. In my case problem was with Bing maps:


In other cases search for GeoLocation.