Error in production only - "The specified value is not an instance of type 'Edm.Int32' Parameter name: value"
Asked Answered
S

1

11

I'm receiving the following error:

The specified value is not an instance of type 'Edm.Int32'
Parameter name: value

whilst using the entity framework. I believe this to be a projection problem with enums as previously mentioned in the following question:

Entity framework mapping enum : The specified value is not an instance of type 'Edm.Int32' Parameter name: value

What I'm confused about is, my code works perfectly on my local PC, but as soon as the code is published onto the production server, the server throws those errors. I'm making sure that my reference to the entity framework is being copied to the server (EF 4.4) and nothing else is being cached etc.

Is there anything I need to check on the production server to get this working?

Souther answered 26/11, 2012 at 17:16 Comment(2)
Are you running .NET Framework 4.5 on your local box while .NET Framework 4 on the production server?Snowwhite
Hi, yep it looks like the server is on 4, and my pc has 4.5 installed. I'm assuming this is the reason, garrr. ThanksSouther
A
0

I suppose the difference can be between 32/64 bit machines. Try specifying your enum type

public enum MyEnum : int  {... }

Anyway this is similar to

Entity framework mapping enum : The specified value is not an instance of type 'Edm.Int32' Parameter name: value

Aryan answered 20/9, 2013 at 9:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.