Posted on: 10/10/2013 5:46:29 PM | Views : 721

When creating a website with pages containing code in separate code segments, I keep getting Error 18 messages when I run the “Start without Debugging” option.  This is only happening wherever there are references to only one table out of many tables.  All accesses to other tables in the database work fine.  I made certain that the table exists in the .mdf file within Server explorer and the DataClasses.dbml has a reference to the dbo.EFmails table.  The error message states: “Error 18 Cannot implicitly convert type 'EFmail [c:\Users\Maurice Osborn\AppData\Local\Temp\Temporary ASP.NET Files\enc\c8745f7a\a0508868\App_Code.5dbvprak.dll]' to 'EFmail [c:\Users\Maurice Osborn\Documents\Visual Studio 2008\WebSites\ENC\EFmail.aspx.cs(14)]'”.  This occurs at all lines in every code file where the following code exists: “EFmail efmail = db.EFmails.SingleOrDefault(p => p.Callsign == Name);”.  Please help.
 
Maurice

Go to the complete details ...