URGENT: Problem- Deployment of ClickOnce app with DotConnect

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
dcuser
Posts: 12
Joined: Mon 14 Mar 2011 12:49

URGENT: Problem- Deployment of ClickOnce app with DotConnect

Post by dcuser » Tue 26 Jul 2011 18:18

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 27 Jul 2011 10:20

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:

Code: Select all

  
    
    
  
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.

dcuser
Posts: 12
Joined: Mon 14 Mar 2011 12:49

Post by dcuser » Wed 27 Jul 2011 11:40

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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 27 Jul 2011 12:02

dcuser wrote:the user computer does not have a full Oracle Client.
If you are connecting in the OCI mode, it is enough to install Instant Client (the type of Oracle client installation).
dcuser wrote:So, anyway to make this work without a Oracle Client?
Please refer to http://www.devart.com/dotconnect/oracle ... tMode.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.

dcuser
Posts: 12
Joined: Mon 14 Mar 2011 12:49

Post by dcuser » Wed 27 Jul 2011 12:54

Tried with setting the exception, but, can't get any more info. Will try with direct connect. Will update this post.

Thank you very much.

dcuser
Posts: 12
Joined: Mon 14 Mar 2011 12:49

Post by dcuser » Wed 27 Jul 2011 14:31

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

dcuser
Posts: 12
Joined: Mon 14 Mar 2011 12:49

Post by dcuser » Wed 27 Jul 2011 16:16

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'."}

dcuser
Posts: 12
Joined: Mon 14 Mar 2011 12:49

Post by dcuser » Wed 27 Jul 2011 19:35

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?

dcuser
Posts: 12
Joined: Mon 14 Mar 2011 12:49

Post by dcuser » Thu 28 Jul 2011 12:44

We are still looking for solution on this. any help is appreciated

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 28 Jul 2011 15:52

1.
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."}
You have used an incorrect format. The connection string for the EntityClient provider in case of the Direct mode should be like this:


providerName="Devart.Data.Oracle" />

2.
dcuser wrote:So, the context looks like
dbContext = new IVSREntities(EntityObjectUtilities.connectionString);
At this point, I get the error {"Keyword not supported: 'user id'."}
Take a look at the example in the ObjectContext constructor article.
More details concerning Entity Framework connections can be found in this MSDN article, for example.

3.
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?
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.

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.

dcuser
Posts: 12
Joined: Mon 14 Mar 2011 12:49

Post by dcuser » Fri 29 Jul 2011 13:37

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 29 Jul 2011 14:23

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).

Post Reply