URGENT: Problem- Deployment of ClickOnce app with DotConnect
URGENT: Problem- Deployment of ClickOnce app with DotConnect
Hi,
We are trying to deploy an application using ClickOnce. We have included all the DLLs from Dot COnnect for Oracle. However, when the application is launched, we get an error "Critical Error: Underlying Provider failed to start". We even changed the connection string to include fully qualified string. Here is the connection string:
This works on Developer's machine. THe client machine has Oracle 10g, same version as developer's machine.
please advice. Your help is greatly appreciated.
We are trying to deploy an application using ClickOnce. We have included all the DLLs from Dot COnnect for Oracle. However, when the application is launched, we get an error "Critical Error: Underlying Provider failed to start". We even changed the connection string to include fully qualified string. Here is the connection string:
This works on Developer's machine. THe client machine has Oracle 10g, same version as developer's machine.
please advice. Your help is greatly appreciated.
Please make sure that:
1) the following assemblies are available for your application in the deployment environment: Devart.Data.dll, Devart.Data.Oracle.dll, and Devart.Data.Oracle.Entity.dll of the corresponding .NET Framework version (from %ProgramFiles%\Devart\dotConnect\Oracle\Entity\EF1\ or %ProgramFiles%\Devart\dotConnect\Oracle\Entity\EF4\);
2) the deployment environment is informed about the existence of the provider factory. The provider factory is described either in machine.config (globally) or in app.config (just for your application), but not in both files. This can be done as follows:
Replace 6.30.185 here with your actual version.
For more information, please refer to http://www.devart.com/dotconnect/oracle ... yment.html .
If this doesn't help, take a look at the InnerException property of the exception. It should show details of the problem.
You can go to Tools->Options...->Debugging, and disable the Enable Just My Code (Managed Only) check box. Then go to Debug->Exceptions and enable Common Language Runtime Exceptions check box. These actions will allow you to catch the inner exception before it is wrapped by Entity Framework code.
1) the following assemblies are available for your application in the deployment environment: Devart.Data.dll, Devart.Data.Oracle.dll, and Devart.Data.Oracle.Entity.dll of the corresponding .NET Framework version (from %ProgramFiles%\Devart\dotConnect\Oracle\Entity\EF1\ or %ProgramFiles%\Devart\dotConnect\Oracle\Entity\EF4\);
2) the deployment environment is informed about the existence of the provider factory. The provider factory is described either in machine.config (globally) or in app.config (just for your application), but not in both files. This can be done as follows:
Code: Select all
For more information, please refer to http://www.devart.com/dotconnect/oracle ... yment.html .
If this doesn't help, take a look at the InnerException property of the exception. It should show details of the problem.
You can go to Tools->Options...->Debugging, and disable the Enable Just My Code (Managed Only) check box. Then go to Debug->Exceptions and enable Common Language Runtime Exceptions check box. These actions will allow you to catch the inner exception before it is wrapped by Entity Framework code.
We have done all these. Only issue I see now is that the user computer does not have a full Oracle Client. I think that is the issue because, we took a developer's laptop that had VS 2010, DotConnect and full Oracle Client and started removing one by one. As soon as we removed Oracle, it started giving the same error.
So, anyway to make this work without a Oracle Client? One solution I see is to connect to DB directly rather than using OCI (http://www.devart.com/dotconnect/oracle ... yment.html)
I will give it a shot. Please let me know if there is another way.
Thanks,
Uday
So, anyway to make this work without a Oracle Client? One solution I see is to connect to DB directly rather than using OCI (http://www.devart.com/dotconnect/oracle ... yment.html)
I will give it a shot. Please let me know if there is another way.
Thanks,
Uday
If you are connecting in the OCI mode, it is enough to install Instant Client (the type of Oracle client installation).dcuser wrote:the user computer does not have a full Oracle Client.
Please refer to http://www.devart.com/dotconnect/oracle ... tMode.html.dcuser wrote:So, anyway to make this work without a Oracle Client?
If this doesn't help, take a look at the InnerException property of the exception. It should show details of the problem.
You can go to Tools->Options...->Debugging, and disable the Enable Just My Code (Managed Only) check box. Then go to Debug->Exceptions and enable Common Language Runtime Exceptions check box. These actions will allow you to catch the inner exception before it is wrapped by Entity Framework code.
Tried direct connection with the following connection string:
I get the following error:
{"The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."}
I then changed the connection string to this:
I get the error "Underlying provider failed to open". I looked for standard direct connection format for connection strings, could not find one that worked with dotconnect. Is there one that i can include in app.config?
Please advice
I get the following error:
{"The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."}
I then changed the connection string to this:
I get the error "Underlying provider failed to open". I looked for standard direct connection format for connection strings, could not find one that worked with dotconnect. Is there one that i can include in app.config?
Please advice
I read the link http://www.devart.com/dotconnect/oracle ... tMode.html and created a connection and passed it as a parameter to my context on new() method.
So, the context looks like
dbContext = new IVSREntities(EntityObjectUtilities.connectionString);
At this point, I get the error {"Keyword not supported: 'user id'."}
So, the context looks like
dbContext = new IVSREntities(EntityObjectUtilities.connectionString);
At this point, I get the error {"Keyword not supported: 'user id'."}
1.
providerName="Devart.Data.Oracle" />
2.
More details concerning Entity Framework connections can be found in this MSDN article, for example.
3.
4. As a workaround, try installing dotConnect for Oracle on the target machine in the ["Minimal" + "Support for ADO.NET Entity Framework"] mode.
Our support has a two business days response policy, but we do our best to respond as soon as possible.
You have used an incorrect format. The connection string for the EntityClient provider in case of the Direct mode should be like this:dcuser wrote:Tried direct connection with the following connection string:
I get the following error:
{"The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."}
providerName="Devart.Data.Oracle" />
2.
Take a look at the example in the ObjectContext constructor article.dcuser wrote:So, the context looks like
dbContext = new IVSREntities(EntityObjectUtilities.connectionString);
At this point, I get the error {"Keyword not supported: 'user id'."}
More details concerning Entity Framework connections can be found in this MSDN article, for example.
3.
1521 is a default port, and it was used in this sample, because the tns entry you have set to "Server" connection string parameter is not parsed by provider. Our documentation says: "Data Source (or Host, or Server) is Oracle server's IP address or DNS name (e.g. "Data Source=192.168.0.1")". Refer to the sample from point 1 of this post.dcuser wrote:Here is more info: with this modified connection string:
we get an exception
{"ORA-12545: Connect failed because target host or object does not exist\n "}
where is 1521 (at the end in the exception) coming from?
4. As a workaround, try installing dotConnect for Oracle on the target machine in the ["Minimal" + "Support for ADO.NET Entity Framework"] mode.
Our support has a two business days response policy, but we do our best to respond as soon as possible.
Thank you for your reply. The connection string you have posted worked for direct mode. However it did not fix the issue.
However, installing dotConnect on users machine in minimum rum time assemblies worked. However, why did it not work when we included the same DLLs with application? I see the DLLs in the package to be installed.
Will investigate more. If you have more insight, please let us know.
Thanks again.
However, installing dotConnect on users machine in minimum rum time assemblies worked. However, why did it not work when we included the same DLLs with application? I see the DLLs in the package to be installed.
Will investigate more. If you have more insight, please let us know.
Thanks again.
We need your inner exception and call stack to identify the reason of the problem.
You can go to Tools->Options...->Debugging, and disable the Enable Just My Code (Managed Only) check box. Then go to Debug->Exceptions and enable Common Language Runtime Exceptions check box. These actions will allow you to catch the inner exception before it is wrapped by Entity Framework code.
If the Debug mode of Visual Studio you are running your code from doesn't show call stack, you can obtain it by connecting from another instance of Visual Studio (2nd) (Debug | Attach to Proccess) to the first VS. Before attaching don't forget to make these settings in your 2nd Visual Studio: a) in the (Debug | Exceptions) window select Common Language Runtime Exceptions; b) in the (Tools | Options) window, Debugging | General - clear Enable Just My Code (Managed Only).
You can go to Tools->Options...->Debugging, and disable the Enable Just My Code (Managed Only) check box. Then go to Debug->Exceptions and enable Common Language Runtime Exceptions check box. These actions will allow you to catch the inner exception before it is wrapped by Entity Framework code.
If the Debug mode of Visual Studio you are running your code from doesn't show call stack, you can obtain it by connecting from another instance of Visual Studio (2nd) (Debug | Attach to Proccess) to the first VS. Before attaching don't forget to make these settings in your 2nd Visual Studio: a) in the (Debug | Exceptions) window select Common Language Runtime Exceptions; b) in the (Tools | Options) window, Debugging | General - clear Enable Just My Code (Managed Only).