none
Web Service Deployment Issue RRS feed

  • Question

  • We would like to get your help in troubleshooting the following:

    The problem is that the Request Error below is occurring when I deploy the web service to our staging server, but is OK on my dev PC (both from Visual Studio 12 and when deployed to a local IIS7 instance on my PC). I have the “ODTwithODAC1120320” oracle client and dev tools installed on my PC. My local PC is 32bit Windows 7.

    The staging server is 64bit Windows Server 2008 R2. As IIS hosts a number of web-apps on this server, the web-service was compiled for x86 and runs in an App Pool using .NET 4.0 framework version.

    On the staging server, ODTwithODAC1120320 has not been installed, but instead I have taken copies of the dlls that I thought are required from the ODAC1120320Xcopy package and have updated the web.config accordingly. I based my setup on instructions found at:

    http://stackoverflow.com/questions/9911948/oracle-instant-client-and-entity-framework-trouble-with-configuration

    http://stackoverflow.com/questions/13721025/deploying-and-configuring-odp-net-to-work-without-installation-with-entity-frame

    http://stackoverflow.com/questions/508252/odp-net-configuration-in-web-config

    NB: I am not keen to install the same client on the staging server because existing applications already use another version of oracle client. I’d like to keep the newer oracle libraries local to this application.

    The webservice is fairly straight forward and I don’t believe the code logic is causing the problem.

    The web.config dev (works) and staging (has error) web.config files are attached. Both have the same connection string but I’m not sure if it is even trying to use it yet. If I put a rubbish server name in the staging version, it makes no difference. I’m looking for what other config might be required to solve the Request Error copied below.

    Request Error:

    The server encountered an error processing the request. The exception message is 'Schema specified is not valid. Errors: ElectorTblsDA.csdl(2,9) : warning 0005: Could not find schema information for the attribute 'Namespace'. ElectorTblsDA.csdl(2,27) : warning 0005: Could not find schema information for the attribute 'Alias'. ElectorTblsDA.csdl(2,40) : error 0005: The 'http://schemas.microsoft.com/ado/2009/02/edm/annotation:UseStrongSpatialTypes' attribute is not declared. ElectorTblsDA.csdl(2,2) : error 0010: The element Schema in namespace http://schemas.microsoft.com/ado/2009/11/edm was unexpected for the root element. The expected Schema in one of the following namespaces: http://schemas.microsoft.com/ado/2006/04/edm, http://schemas.microsoft.com/ado/2007/05/edm, http://schemas.microsoft.com/ado/2008/09/edm.'. See server logs for more details. The exception stack trace is:

    at ElectorLookup.ElectorSearch.Elector(String FamilyName, String GivenName, String DateOfBirth) in c:\mho\dev\ElectoralRollService\ElectorLookup\ElectorSearch.svc.cs:line 89 at SyncInvokeElector(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

    Your help is greatly appreciated.

    Thursday, July 25, 2013 2:27 AM

All replies

  • I was able to fix this by changing my connection string to have ef create the db fresh with the proper dll installed on the project. I then migrated the data from the old db to the new one.

    My assumption is that the EF 5 code stored some meta data in the DB (although i couldn't verify this).  Since EF code first will create the db/schema if the database doesn't exist, I simply changed my connection string to a non-existant database, ran the project and let EF build the db, then migrated the existing data from the DB created by V.5 to the db created by v.4.

    • Proposed as answer by Mernández Friday, July 26, 2013 8:14 AM
    Friday, July 26, 2013 8:14 AM