 |
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

August 24th, 2015, 03:00 AM
|
|
Authorized User
|
|
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Entity Scheme Error on remote site
Hi
On my local machine my website runs perfectly, but not on the remote server (it was working initially, until I probably did a "bad" change, but cannot remember what)....
Now I get on the remote server the following error:
Schema specified is not valid. Errors:
App_Code.myentity.csdl(620,10) : error 0005: Data at the root level is invalid.
I copied again the files in the app_code folder and checked the connection strings for the myentity and other connections in the web.config file on the remote site, which are fine (I get data in the grid views without problem).
Any suggestions?
Thanks.
|
|

August 24th, 2015, 05:30 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Looks like your EF EDMX model is broken somehow. Did you try updating or recreating it?
Imar
|
|

August 24th, 2015, 07:36 AM
|
|
Authorized User
|
|
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
I updated it several times, without success. How do I delete an entity model?
|
|

August 24th, 2015, 07:40 AM
|
|
Authorized User
|
|
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Deleted it, I'm building it again....
|
|

August 24th, 2015, 07:50 AM
|
|
Authorized User
|
|
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
I recreated the entity from scratch. It's working perfect on my local machine. I copied the files to the remote server, and again I get the following error message:
Schema specified is not valid. Errors:
App_Code.myentity.csdl(569,10) : error 0005: Data at the root level is invalid. Line 569, position 10.
I looked up what is in position 569 (of the csdl part), it's one of the following lines (I don't know exactly how the start of the csdl as separate file is:)
</AssociationSet>
</EntityContainer>
</Schema>
</edmx:ConceptualModels>
I just don't understand why it's working on my local machine and not on the remote one. I created the database on the remote machine using a script from the local MSSQL database. So they are equal. Any idea? I'm quite desperate...
Thanks
Alex
|
|

August 24th, 2015, 08:58 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
2 things to check:
1. Make sure the server has the same version of EF (check the assemblies in the site's Bin folder)
2. Make sure your connection string in web.config is correct. When you recreated the model, VS probably created a new connection string for you so it's easy to compare the old one with the new one.
Cheers,
Imar
|
|

August 24th, 2015, 09:03 AM
|
|
Authorized User
|
|
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Thanks for your reply:
The content of the bin folder: Aren't these file I have to upload from the local machine to the remote machine? If not, where do I get them?
Thanks
Alex
|
|

August 24th, 2015, 11:05 AM
|
|
Authorized User
|
|
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Solution
I deleted the website, uploaded all the files again, and now it's back working ok. No idea what happened.....
|
|

August 24th, 2015, 02:17 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Alex,
Glad to hear it's working again.
Imar
|
|
 |
|