none
c# web service with entity framework doesn't work on deployment machine. windows 8 server. RRS feed

  • Question

  • c# web service with entity framework doesn't work on deployment machine. windows 8 server. giving the following error message.

    any suggestion or idea would be appreciated.

    Thanks,

    Joe

    System.ArgumentException: The specified store provider cannot be found in the configuration, or is not valid. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider.  It may not be installed.

       at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
       --- End of inner exception stack trace ---
       at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
       at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
       at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
    Monday, January 13, 2014 12:26 AM

Answers

  • I added Oracle.DataAccess.dll reference.

    But the default Copy Local deploy option was set to False.

    • Marked as answer by LAScorpion Tuesday, January 14, 2014 1:59 AM
    Tuesday, January 14, 2014 1:27 AM

All replies

  • can you paste your web.config file content here.

    Happy Coding.

    Regards,
    Jaliya Udagedara (MCPD,MCSD) | My Blog

    Monday, January 13, 2014 5:24 AM
  • <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
          </assemblies>
        </compilation>
      </system.web>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpGetEnabled="true" />
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
      </system.serviceModel>
      <connectionStrings>
        <add name="MEntities" connectionString="metadata=res://*/MModel.csdl|res://*/MModel.ssdl|res://*/MModel.msl;provider=Oracle.DataAccess.Client;provider connection string=&quot;DATA SOURCE=ordb;PASSWORD=pass11;PERSIST SECURITY INFO=True;USER ID=user1&quot;" providerName="System.Data.EntityClient" />
      </connectionStrings>
    </configuration>
    Monday, January 13, 2014 8:14 AM
  • Hi LAScorpion,

    Did you add reference to "Oracle.DataAccess.dll"? And please make sure the platform target property of the project is the same with the assemblies you referenced.

    And please check if this blog helps: http://blog.dotnetdude.net/2012/05/using-odac-with-ef4-via-wcf.html

    By the way, if you post in Entity Framework forum, there would be better responses.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 13, 2014 12:52 PM
    Moderator
  • Since it is a Win server (which is x64) I'd wager you are running your app pool in x64 mode (the default).  Your service is compiled as AnyCPU so it is running as x64.  You're trying to use ODP.NET which means you added a reference to ODP.NET when you built your app. ODP.NET relies on native Oracle client software which is either x86 or x64.  You need to ensure the correct client is installed depending upon whether you want x86 or x64.  Note that you can technically install both but there are lots of reports about issues when having both installed on the Oracle forums (mainly related to pointing to the correct home directory). 

    For newer versions of Oracle where you don't need advanced Oracle features you might consider using ODP.NET Managed Drivers instead of raw ODP.NET.  It removes the need for the Oracle client and resolves any issues around x86/x64 as it is completely managed code.  But there are some limitations that you should read up about before using it.

    Michael Taylor
    http://msmvps.com/blogs/p3net

    Monday, January 13, 2014 3:34 PM
    Moderator
  • I added Oracle.DataAccess.dll reference.

    But the default Copy Local deploy option was set to False.

    • Marked as answer by LAScorpion Tuesday, January 14, 2014 1:59 AM
    Tuesday, January 14, 2014 1:27 AM
  • So that's the root cause of your problem right? Does it work fine now?

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 14, 2014 1:37 AM
    Moderator