I am using Entity Framework for the first time. It's a simple application that looks up part numbers and displays them in a grid. My application runs fine locally, but when I execute against the production SQL Server database, the pages that have stored procedure calls with Entity Framework fail.
However, it will run an Entity Framework call to a table and return the data, but not a stored procedures. I do this to populate a drop down list and it works fine. When I call the stored procedure to return the search results, it fails.
Could this be a setting on the production SQL Server that my user ID does not have access to execute stored procedures?
Here is the error message from the log:
Date/Time: 12/7/2013 12:23:41 PM
Title: Error
Message: An error occurred while executing the command definition. See the inner exception for details.
StackTrace:
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Objects.ObjectContext.CreateFunctionObjectResult[TElement](EntityCommand entityCommand, ReadOnlyMetadataCollection1 entitySets, EdmType[] edmTypes, MergeOption mergeOption)
1 diaFromParm, Nullable
at System.Data.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, MergeOption mergeOption, ObjectParameter[] parameters)
at System.Data.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, ObjectParameter[] parameters)
at FanInfo.FandbEntities1.uspFANSearch(String idParm, Nullable1 diaToParm, Nullable
1 hubFromParm, Nullable`1 hubToParm) in C:\Users\Public\Documents\Projects\Fan Info\Fan Info\Model1.Designer.vb:line 201
at FanInfo.frmMain.LoadSearchResults() in C:\Users\Public\Documents\Projects\Fan Info\Fan Info\Main.vb:line 208