My ASP.NET application is working locally, but when I deploy it, I get the following error: "The entity type Usuario is not part of the model for the current context". I've tried every solution I found, but I couldn't get it work.
I think it can be something wrong in connection string because they are different ones to local database and remote database. This is the connection string in Web.Release.config file:
Well, I don't need this anymore. I couldn't solve it, but as I'm in the benning of the project, I decided to change the language. I'm not working with ASP.NET anymore.
Guto88
0 Points
16 Posts
The entity type is not part of the model for the current context
Dec 11, 2012 11:51 AM|LINK
My ASP.NET application is working locally, but when I deploy it, I get the following error: "The entity type Usuario is not part of the model for the current context". I've tried every solution I found, but I couldn't get it work.
I think it can be something wrong in connection string because they are different ones to local database and remote database. This is the connection string in Web.Release.config file:
<add name="ModelContainer" connectionString="metadata=res://*/;provider=System.Data.SqlClient;provider connection string="Data Source = tcp:ebmzszqsw8.database.windows.net,1433; Initial Catalog = {database_name}; User ID = {my_id}; Password={my_password};Trusted_Connection=False;Encrypt=True;Connection Timeout=30"" providerName="System.Data.EntityClient" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />thaicarrot
Contributor
5130 Points
1464 Posts
Re: The entity type is not part of the model for the current context
Dec 11, 2012 12:16 PM|LINK
Are you sure deploy all related files to server? e.g .edmx and its files.
Weera
Guto88
0 Points
16 Posts
Re: The entity type is not part of the model for the current context
Dec 11, 2012 12:44 PM|LINK
Thanks for reply.
Here's my .gitignore file:
I also accessed the server via FTP and all files (exept that ones in .gitignore) were there.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: The entity type is not part of the model for the current context
Dec 12, 2012 11:23 AM|LINK
Hi,
Try to delete the edmx file and re-import all of your tables and have a try.
Guto88
0 Points
16 Posts
Re: The entity type is not part of the model for the current context
Dec 12, 2012 01:26 PM|LINK
I tried it and it didn't work...
The strange part is that it works localy, but when I deploy it to Windows Azure, it stops working.
Guto88
0 Points
16 Posts
Re: The entity type is not part of the model for the current context
Dec 19, 2012 02:02 PM|LINK
Well, I don't need this anymore. I couldn't solve it, but as I'm in the benning of the project, I decided to change the language. I'm not working with ASP.NET anymore.
Thanks for the helps.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: The entity type is not part of the model for the current context
Dec 19, 2012 11:51 PM|LINK
Oops……Don't feel depressed and welcome to feedback again