Wrox Programmer Forums
|
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
 
Old August 24th, 2015, 03:00 AM
Authorized User
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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.
 
Old August 24th, 2015, 05:30 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Looks like your EF EDMX model is broken somehow. Did you try updating or recreating it?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old August 24th, 2015, 07:36 AM
Authorized User
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default

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

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

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
 
Old August 24th, 2015, 08:58 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old August 24th, 2015, 09:03 AM
Authorized User
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default

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
 
Old August 24th, 2015, 11:05 AM
Authorized User
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default Solution

I deleted the website, uploaded all the files again, and now it's back working ok. No idea what happened.....
 
Old August 24th, 2015, 02:17 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Alex,

Glad to hear it's working again.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Image of the remote site cms9651 ASP.NET 4 General Discussion 4 January 4th, 2013 10:49 PM
Error after copying web site to remote site Onypips BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 September 23rd, 2011 12:59 PM
[Resolved] Posting to Remote Site snufse ASP.NET 2.0 Basics 2 March 10th, 2008 12:11 PM
Remote Site Set Up Anne Harrington Dreamweaver (all versions) 1 April 7th, 2005 04:25 PM
Accessing a remote web site Ray Pinnegar Access VBA 2 July 24th, 2003 08:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.