mono 4.50.30

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
hannes_a
Posts: 77
Joined: Sun 22 Jan 2006 20:44
Location: munic

mono 4.50.30

Post by hannes_a » Wed 09 Apr 2008 17:58

I new to ASP.NET and I made a simple program with trial version 4.50.30, on IIS everything is fine, but on linux with mono (I use latest http://tracker.mono-project.de) I spent days to try to deploy it with no access.

maybe someone can help me.

this is my result :

No access to the given key
Description: HTTP 500. Error processing request.
Stack Trace:

System.Security.SecurityException: No access to the given key
at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x0001e] in /home/mono/mono-source/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:109
at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, Boolean createNonExisting) [0x000c7] in /home/mono/mono-source/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:260
at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, Boolean writable) [0x00000] in /home/mono/mono-source/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:590
at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name, Boolean writable) [0x0001e] in /home/mono/mono-source/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:246
at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name) [0x00000] in /home/mono/mono-source/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:230
at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
at CoreLab.Common.o.a (System.String& A_0, System.String& A_1) [0x00000]
at CoreLab.Common.v.a (System.ComponentModel.LicenseContext A_0, System.Type A_1, System.String& A_2, System.Boolean& A_3, System.String& A_4, System.String& A_5) [0x00000]
at CoreLab.Common.v.a (System.ComponentModel.LicenseContext A_0, System.Type A_1, Boolean A_2) [0x00000]
at CoreLab.Oracle.OracleProviderFactory.CreateConnection () [0x00000]
at System.Web.UI.WebControls.SqlDataSourceView.InitConnection () [0x00027] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSourceView.cs:60
at System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect (System.Web.UI.DataSourceSelectArguments arguments) [0x000a2] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSourceView.cs:206
at CoreLab.Common.Web.DbSqlDataSourceView.ExecuteSelect (System.Web.UI.DataSourceSelectArguments arguments) [0x00000]
at System.Web.UI.DataSourceView.Select (System.Web.UI.DataSourceSelectArguments selectArgs, System.Web.UI.DataSourceViewSelectCallback callBack) [0x00018] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI/DataSourceView.cs:149
at DevExpress.Web.ASPxDataControls.ASPxDataController.ResolveDataSource () [0x00000]
at DevExpress.Web.ASPxDataControls.ASPxDataController.DataBind (Rebind rebind) [0x00000]
at DevExpress.Web.ASPxGrid.ASPxGrid.DataBindInternal (Boolean rebind) [0x00000]
at DevExpress.Web.ASPxGrid.ASPxGrid.RetrieveColumns (ProcessExistingColumns processExistingColumns) [0x00000]
at DevExpress.Web.ASPxGrid.ASPxGrid.LoadInternal () [0x00000]
at DevExpress.Web.ASPxDataControls.ASPxWebControlBase.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00020] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI/Control.cs:1423
at System.Web.UI.Control.LoadRecursive () [0x00056] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI/Control.cs:1428
at System.Web.UI.Control.LoadRecursive () [0x00056] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI/Control.cs:1428
at System.Web.UI.Page.ProcessLoad () [0x0004a] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI/Page.cs:1580
at System.Web.UI.Page.ProcessPostData () [0x0004d] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI/Page.cs:1559
at System.Web.UI.Page.InternalProcessRequest () [0x001bf] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI/Page.cs:1519
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x0005b] in /home/mono/mono-source/mcs/class/System.Web/System.Web.UI/Page.cs:1335

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 10 Apr 2008 12:01

Could you please post full versions and editions of:
-OS;
-MONO;
-Apache;

Please provide some code that results in such exception.

hannes_a
Posts: 77
Joined: Sun 22 Jan 2006 20:44
Location: munic

envireonment

Post by hannes_a » Thu 10 Apr 2008 12:28

http://tracker.mono-project.de uses ubuntu 7.10 with xsp
mono 1.9

I guess the trial version looks into registry, and this part crashes on mono/linux.
can I add this registry keys to linux ? or does CoreLab don't want to do this ?

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 10 Apr 2008 13:33

Since automatic license generation and embedding is not possible with Mono you have to add and compile license manually.
The needed steps are fully described in the Licensing topic of the documentation.
The run time assemblies do not interact with system registry.

hannes_a
Posts: 77
Joined: Sun 22 Jan 2006 20:44
Location: munic

Post by hannes_a » Fri 11 Apr 2008 10:23

I did
C:\Programme\Microsoft.NET\SDK\v2.0\Bin\lc.exe /target:Wetten.NET.dll /complist:licenses.licx /i:"C:\Programme\Microsoft Visual Studio 9.0\OraDirect.NET2\CoreLab.Oracle.dll"

then I copy the new file wetten.net.dll.licenses into "bin" of deployment mono server

the result is the same error, what did I wrong ?

pls have a look to my first posting: there might something with registry
System.Security.SecurityException: No access to the given key
at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey,

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 11 Apr 2008 12:02

MONO 1.9 was recently released and is still being tested with all Core Lab products.
Try create a new simple project with OracleConnection, OracleDataReader components and deploy it on the Linux server.
Open a connection and see if you get any exception.

drzemik
Posts: 4
Joined: Wed 28 Mar 2007 14:47

Post by drzemik » Fri 25 Apr 2008 08:53

Hi.

I've downloaded trial version od OraDirect components to test if they met our requirements.

Test method looks like this:

private void button2_Click(object sender, EventArgs e)
{
CoreLab.Oracle.OracleConnectionStringBuilder builder = new CoreLab.Oracle.OracleConnectionStringBuilder();
builder.UserId = "testuser"; /user name
builder.Password = "xxx"; // password
builder.Direct = true;
builder.Server = "192.168.0.2"; //server IP
CoreLab.Oracle.OracleConnection conn = new CoreLab.Oracle.OracleConnection(builder.ConnectionString);
try
{
try
{
conn.Open();
this.textBox1.Text += "[OraDirect] Connection ok." + Environment.NewLine;
CoreLab.Oracle.OracleCommand comm = new CoreLab.Oracle.OracleCommand("select sysdate from dual", conn);
CoreLab.Oracle.OracleDataReader reader = comm.ExecuteReader();
while (reader.Read())
{
this.textBox1.Text += "[OraDirect] " + reader.GetDateTime(0).ToString() + Environment.NewLine;
}
}
catch (Exception ex)
{
this.textBox1.Text += "[OraDirect] " + ex.Message + Environment.NewLine;
}
}
finally
{
conn.Close();
}
}

On Windows (both .Net and Mono) it works fine.
But on Mono on Linux it crashes with message: "No access to the given key".
Stack trace:

at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x00000]
at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, Boolean createNonExisting) [0x00000]
at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, Boolean writable) [0x00000]
at Microsoft.Win32.RegistryKey.OpenSubKey (System.String keyName, Boolean writtable) [0x00000]
at Microsoft.Win32.RegistryKey.OpenSubKey (System.String keyName) [0x00000]
at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
at CoreLab.Common.o.a (System.String& A_0, System.String& A_1) [0x00000]
at CoreLab.Common.v.a (System.ComponentModel.LicenseContext A_0, System.Type A_1, Boolean A_2) [0x00000]
at CoreLab.Common.v.a (System.ComponentModel.LicenseContext A_0, System.Type A_1, System.Object A_2, Boolean A_3) [0x00000]
at CoreLab.Oracle.OracleConnection.Open () [0x00000]
at OraTest2.Form1.button2_Click (System.Object sender, System.EventArgs e) [0x00000]

It occures on Mono versions: 1.2.6 and 1.9.1
What's wrong?

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 25 Apr 2008 11:19

Since automatic license generation and embedding is not possible with Mono
you have to add and compile license manually
as described in the “Licensing” topic of documentation.
Please ensure that all required licensing steps have been done
before deploying the application on MONO Framework.

Post Reply