If I am in the wrong place, I apologize up front.
I have a Windows appliction that uses Linq-To-SQL. I am updating a set of tables that are related in the DBML through a FK. On the development machine all this works fine, and it works regardless of whether I am using the development database or the production database. When I deploy this application, I get an exception, "Specified Cast is not valid" in the Linq classes. Since the application works on the development machine and works to any database instance, I don't think this is an issue with SQL server or the application (although I could be wrong about that). It looks to me like this is some sort of deployment problem with the framework.
I am running .Net 3.5 SP1 on all the machines including the development machine, and I have verified that I am running the same version, (at least I think I am). I am pretty much stumped as to why this is working on the development machines, but will not deploy to any environment.
I have this same issue with a web service application. The web service runs fine on the local machine for development, but I can not publish it to any srver without getting this exception.