Hexagon Geospatial
MENU

M.App Enterprise Tutorials

Not sure on how to get started or looking for a workflow to get M.App Enterprise up and running. Tutorials provide step by instruction on some of the most common configurations and workflows to get M.App Enterprise configured up and running quickly.
Showing results for 
Search instead for 
Do you mean 

Mobile App with tenant metadata and/or data in Oracle database

by sturcato on ‎07-01-2019 09:55 AM (137 Views)

Symptoms

Having tenant metadata in Oracle configured using a TNS name specified in tnsnames.ora, you cannot login into the Mobile App getting "Invalid User" error.

Having data in Oracle configured using a TNS name specified in tnsnames.ora, you get error while trying to load the Mobile App assigned to you.

Diagnosis

On the server side you can check the event viewer and you will find an error related to a .NET application. In the details you will find an oracle error like:

ORA-12154: TNS:could not resolve the connect identifier specified

 

That errors is related to the Oracle .NET managed driver that is not capabile or reading the settings in the Windows registry. Please refer to:

https://docs.oracle.com/cd/E63277_01/win.121/e63268/InstallManagedConfig.htm#ODPNT8159 

Solution

You have to manually edit the web.config file of the Mobile endpoint within:

[M.App Enterprise installation folder]\Mobile

 

You have to add the following within the <configuration> section:

  • at the beginning, before <system.web> section:

 

<configSections>
	<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</configSections>
  • right after <system.data> section (changing the content of the "value"):
<oracle.manageddataaccess.client>
	<version number="*">
		<settings>
			<setting name="TNS_ADMIN" value="C:\oracle\product\18.0.0\client_1\network\admin" />
		 </settings>
	</version>
</oracle.manageddataaccess.client>

 

 

Comments
by GS_Fritz
on ‎07-10-2019 02:49 AM

Thanks Stefano,

 

a short remark. I have followed your steps and modified the web.config as stated above. After the change the mobile endpoint was not accessible anymore: Error500

The reason: the oracle.manageddataaccess.client has been already defined.

 

After removing the complete <configSections>-part the mobile endpoint was accessible and I was able to login even when using Oracle

 

Cheers

Fritz

by sturcato
on ‎07-10-2019 03:10 AM

hi Fritz,

 

thanks for the feedback.

 

Did you have this line in the <DbProviderFactories>?

<remove invariant="Oracle.ManagedDataAccess.Client" />

 

 

Stefano

by GS_Fritz
on ‎07-10-2019 05:28 AM

Hi Stefano,

 

yes this line is there. The DB-Providers block looks like:

 

<system.data>
    <DbProviderFactories>
      <remove invariant="Npgsql" />
      <add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for Postgresql" type="Npgsql.NpgsqlFactory, Npgsql" />
      <remove invariant="Oracle.ManagedDataAccess.Client" />
      <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    </DbProviderFactories>
</system.data>

Right after this block I added:

 

 

<oracle.manageddataaccess.client>
  <version number="*">
    	<settings>
    		<setting name="TNS_ADMIN" value="C:\Program Files\Oracle\Client\product\12.1.0\client_32\network\admin" />
    	 </settings>
  </version>
</oracle.manageddataaccess.client>

Now I do not get any errors in the event viewer, the mobile endpoints still works and I am able to login and startup the mobile app.

 

Cheers

Fritz

 

Overview
Contributors