0

I'm getting an error 500 on IIS that references my Oracle Data Connections. I've attached the stack trace. I've verified that I have Oracle Client installed and the DLLs all exist within the application directory. I'm running Windows Server 2012 with IIS 8.0. Attached is my stack trace...

   {"Message":"An error has occurred.","ExceptionMessage":"The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.","ExceptionType":"System.TypeInitializationException","StackTrace":"   at Oracle.DataAccess.Client.OracleConnection..ctor(String connectionString)\r\n   at CECC.AMI.Controllers.getBlinksController.getAMIData(String startDateString, String endDateString)\r\n   at CECC.AMI.Controllers.getBlinksController.getBlinks(String startDate, String endDate)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"The provider is not compatible with the version of Oracle client","ExceptionType":"Oracle.DataAccess.Client.OracleException","StackTrace":"   at Oracle.DataAccess.Client.OracleInit.Initialize()\r\n   at Oracle.DataAccess.Client.OracleConnection..cctor()"}}

I'm sure I've got SOMETHING configured wrong. Basically I want this site to be able to be moved around from dev to production and I've set my reference of Oracle.DataAccess to copy local and it does copy to the bin folder so my understanding is that it should be referencing that dll not anything on the server. I do however have the client installed on the server at version 11g so perhaps I'm referencing that wrong. This is a 32bit application running on a 64 bit version of Server 12.

1 Answer 1

1

You are using an incompatible provider for the version of Oracle client you have installed. That's what the posted stack trace says as pointed below

"ExceptionMessage":"The provider is not compatible with the version of Oracle client"

Check your config file and correct it accordingly.

Sign up to request clarification or add additional context in comments.

2 Comments

Right, but setting "copy local", shouldn't that allow it to be self contained? The provider works when I run it from Visual Studio but not when I publish it to the dev machine.
@OP: If your DEV machine already has the Oracle dlls available in the GAC, those will be used instead of your "local" dlls. At least I think that's how it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.