Publishing an application

Publishing an application

Postby tompolth » Tue 30 Dec 2008 07:53

Hello guys:
I'd developed an application using oranet 4.75 trial version in windows xp and visual studio 2008. The application use ADO .NET Entity Framework and it work perfectly in my computer and in others if they have installed visual studio 2008 or 2005. However, when I'd publish the program in a network disk to share it with end-client machines, the application don´t work well.
The application consist in a grid that shows a data table previously loaded through Entity Framework Data Model.

It returns the next exception:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at System.Windows.Forms.DataGridViewColumnCollection.get_Item(Int32 index)
at es.ayto.oipac.CapaPresentacion.forms.FrmDepartamentosGrid.backgroundCargaGrid_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
en System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
en System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)


I´d seen that the application never access to Oracle database in client machines and so every consultation returns a null response.

The end-client machines are equiped with windows XP, .NET Framework 3.5 sp1 and Oranet 4.75 trial version (minimal installation).

Someone could help me? My company is awaiting the result of this test for decide if Devart Oracle Provider is suitable to develop our applications.

Thanks
tompolth
 
Posts: 6
Joined: Mon 29 Dec 2008 22:49
Location: Spain

Postby AndreyR » Tue 30 Dec 2008 16:46

The usage of network drives has known limitations associated with permissions. Please check if the program has the required permissions.
Also please note that minimal installation of dotConnect for Oracle is not enough for the Entity Framework usage.
The call stack doesn't contain any Devart components. Maybe you can send the call stack where Devart classes are involved?
If you experience problems with connecting to the server and do not use the Direct mode, please check whether Oracle client is installed.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby mpovidlov » Tue 06 Jan 2009 02:10

I usually publish my applications to a shared drive with "online only" option. This guarantees that the program (that requires access to an Oracle database) will be copied locally first and then will be executed on a client's machine from their local drive. This helps to avoid permission problems.
My problem is different: after publishing a simple dotConnect application, a user (who does not have dotConnect installed) gets this:
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...

The FAQ tells:
What is required for my application to work on end-user machine?
To deploy applications written with dotConnect for Oracle you should register necessary run-time assemblies at Global Assembly Cache for appropriate .NET Framework or place it in the folder of your application (more on that in the Deployment topic). ...


So it seems that just "placing" two DLLs (Devart.Data.dll and Devart.Data.Oracle.dll) is not enough. What am I missing?
Thanks
mpovidlov
 
Posts: 20
Joined: Tue 06 Jan 2009 00:34
Location: US

Postby AndreyR » Tue 06 Jan 2009 08:30

In case when your application uses Entity Framework you should place Devart.Data.Oracle.Entity assembly to the application folder.
Also you should register Devart provider in the app.config or web.config of the application as it is described here:
http://www.devart.com/forums/viewtopic.php?t=13286
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby mpovidlov » Tue 06 Jan 2009 18:55

Thank you, it works now. Here are the steps I made:

1. Add Reference to Devart.Data, Devart.Data.Oracle, Devart.Data.Oracle.Entity to a project.
2. Set their "Copy Local" to true. This forces their copying to the final destination.

Note: I did not change anything manually in app.config (scratch that, see next post).

3. In VS2008 go to Tools/Oracle/License Information and fix all licensing problems (this will add embedded resource with the license).
Last edited by mpovidlov on Thu 05 Mar 2009 19:36, edited 1 time in total.
mpovidlov
 
Posts: 20
Joined: Tue 06 Jan 2009 00:34
Location: US

Postby mpovidlov » Thu 05 Mar 2009 04:22

I have a problem deploying the application. As was recommended, I modified app.config by adding

Code: Select all

 
   
             description="Devart dotConnect for Oracle"
         type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=5.0.22.0, Culture=neutral, PublicKeyToken=09af7300eec23701"/>
 

 


After having hard time with licensing issue (resolved by Tools/Oracle/License information) I now get an error message when I run the program on my computer (where dotConnect has been installed):
Code: Select all
Column 'InvariantName' is constrained to be unique. Value 'Devart.Data.Oracle' is already present.

At the same time, the same program will run on a client's computer (who does not have dotConnect installed).
If I remove the new lines from app.config, it will now run on my computer but will complain on the client's one. Is there solution to this?
Thanks
mpovidlov
 
Posts: 20
Joined: Tue 06 Jan 2009 00:34
Location: US

Postby Shalex » Thu 05 Mar 2009 08:27

dotConnect for Oracle installation package puts the entry you have posted above to the \WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config file. So if you want to place this entry in every application separately on your development machine, remove this entry from machine.config.
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby mpovidlov » Thu 05 Mar 2009 15:46

Thanks, I'll try that, but this seems to be only a partial solution. I need to deploy my application to multiple unknown computers. What if some of them have this lines in machine.config and some do not. Who knows, maybe some of my clients have dotConnect installed (if it becomes so popular :0))?
mpovidlov
 
Posts: 20
Joined: Tue 06 Jan 2009 00:34
Location: US

Postby mpovidlov » Thu 05 Mar 2009 19:30

BTW, Devart.Data from version 5.0.22 is not listed in the .NET references (version 5.0.1.0 is shown only, a leftover from previous installation?). I can see Devart.Data.Oracle.Entity and Devart.Data.Oracle with version 5.0.22 shown in the list for references. Plus, I can see the fresh (Feb.16 2009) Devart.Data.DLL in Devart... folder. Probably there is a problem with installation. (The uninstall of previous version hung at the end).
Just letting you know.
mpovidlov
 
Posts: 20
Joined: Tue 06 Jan 2009 00:34
Location: US

Postby Shalex » Fri 06 Mar 2009 09:26

1. As an alternative, you can use the following entry in your app.config file without removing the registration of our provider from the machine.config file:
Code: Select all

   
      
         
           description="Devart dotConnect for Oracle" type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=5.0.22.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      

   


The remove section will hide the same entry from the machine.config file (if it is there) for the current application.

2. Installation package of dotConnect for Oracle 5.0.22 contains the 5.0.22 version of Devart.Data.Oracle.dll and the 5.0.1 version of Devart.Data.dll.

If uninstall encounters any problems, you can remove our products manually:
1) remove the \Program Files\Devart folder;
2) delete these entries from your registry:
HKEY_CURRENT_USER\Software\Devart,
HKEY_LOCAL_MACHINE\SOFTWARE\Devart;
3) clean your GAC from the Devart.* assemblies.
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby mpovidlov » Fri 06 Mar 2009 16:18

Thank you, this is very useful. Probably this should go to FAQ
mpovidlov
 
Posts: 20
Joined: Tue 06 Jan 2009 00:34
Location: US

Postby mpovidlov » Thu 12 Mar 2009 23:01

It actually did not work the way you suggested, I had to modify it to

Code: Select all

to make it work. I hope I did it right.
mpovidlov
 
Posts: 20
Joined: Tue 06 Jan 2009 00:34
Location: US


Return to dotConnect for Oracle