Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5.1 > BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 24th, 2015, 03:00 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old August 24th, 2015, 05:30 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
  #3 (permalink)  
Old August 24th, 2015, 07:36 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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?
Reply With Quote
  #4 (permalink)  
Old August 24th, 2015, 07:40 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Deleted it, I'm building it again....
Reply With Quote
  #5 (permalink)  
Old August 24th, 2015, 07:50 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #6 (permalink)  
Old August 24th, 2015, 08:58 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
  #7 (permalink)  
Old August 24th, 2015, 09:03 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #8 (permalink)  
Old August 24th, 2015, 11:05 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.....
Reply With Quote
  #9 (permalink)  
Old August 24th, 2015, 02:17 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:56 PM.


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