Using Entity Framework inside Server Object Extension ( SOE)

548
5
03-19-2011 12:53 PM
AlirezaAhmadi
New Contributor
I have a model of Entity Framework with a connection string to database in App.Config file within SOE project. When I debug SOE ( Rest Service ) , I get this error:

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient Provider, not valid

How come the connection string in App.Config cannot be found when I call REST Service?

I am able to update the Entity model by right Clicking on .edmx file . It seems the connection defined in App.Config is valid though.

I also followed this thread and i could not find any working solution
http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/70f124b6-5003-4011-814...


Any help?
Tags (2)
0 Kudos
5 Replies
AlirezaAhmadi
New Contributor
any answer to this? I added the connection string to the web.config file in REST virtual directory , and still i have the same problem.
0 Kudos
ScottDickison
New Contributor III
any answer to this? I added the connection string to the web.config file in REST virtual directory , and still i have the same problem.


Where you ever able to figure this out? I've encountered the same problem.
0 Kudos
ScottDickison
New Contributor III
Good afternoon,

I'm attempting to utilize an entity framework within an SOE. I'm developing on Visual Studio 2010. The SOE successfully deploys but when called returns the error:

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

Has anyone ever encountered this before?

Thanks,

Scott Dickison
Kentucky Transportation Cabinet
0 Kudos
nicogis
MVP Frequent Contributor
0 Kudos
ScottDickison
New Contributor III
have you tried set connection Runtime (http://msdn.microsoft.com/en-us/library/system.data.entityclient.entityconnectionstringbuilder.aspx)


Thanks Ciava! This is what I ended up doing and everything is working as it's supposed to now.

Scott Dickison
Kentucky Transportation Cabinet
0 Kudos