Closed GoogleCodeExporter closed 8 years ago
This seems more appropriate as a thread for the general discussion group on
ELMAH
(http://groups.google.com/group/elmah) than an issue report. Please post your
question to http://groups.google.com/group/elmah instead.
See also:
http://groups.google.com/group/elmah/msg/6b6e041131aa7128 in thread
http://groups.google.com/group/elmah/t/c8196fb22e0b915b
Original comment by azizatif
on 8 Sep 2008 at 8:52
hey azizatif,
MADAM is pretty nice - although i have to use Oracle and there it throws an
exception
because the oracle client is in an assembly of its own - it is not in the same
assembly as IDbConnection is.
so this code in MADAM (DatabaseUserSecurityAuthority.cs) throws an error:
if (connectionTypeSpec.IndexOf(',') < 0)
_connectionType =
typeof(IDbConnection).Assembly.GetType(connectionTypeSpec, /* throwOnError */
false);
if (_connectionType == null)
Type.GetType(connectionTypeSpec, /* throwOnError */ true);
this is my setting in the web.config:
<userSecurityAuthority realm="MADAM"
provider="Madam.DatabaseUserSecurityAuthority,
Madam" connectionType="System.Data.OracleClient.OracleConnection"
connectionString="Data Source=myDB; User Id=myuser; Password=mypass;"
query="SELECT
Password FROM Users WHERE UserName=@UserName" exposeClearTextPassword="false "/>
i also tried to set connectionType to this
"System.Data.OracleClient.OracleConnection, System.Data.OracleClient"
can you please support oracle in MADAM, too?
thanks, toebens
Original comment by to.ko...@gmail.com
on 9 Sep 2008 at 11:21
i tried it with this in the web.config:
<userSecurityAuthority realm="MADAM"
provider="Madam.DatabaseUserSecurityAuthority,
Madam" connectionType="System.Data.OracleClient.OracleConnection"
connectionString="Data Source=myDB; User Id=myuser; Password=mypass;"
query="SELECT
Password FROM Users WHERE LOGIN_NAME=:LOGIN_NAME" userParameter="LOGIN_NAME"
exposeClearTextPassword="false "/>
and added this to the coding:
if (_connectionType == null &&
connectionTypeSpec.IndexOf("System.Data.OracleClient") >= 0)
{
_connectionType = typeof(System.Data.OracleClient.OracleConnection);
}
so it become this:
if (connectionTypeSpec.IndexOf(',') < 0)
_connectionType =
typeof(IDbConnection).Assembly.GetType(connectionTypeSpec, /* throwOnError */
false);
if (_connectionType == null &&
connectionTypeSpec.IndexOf("System.Data.OracleClient") >= 0)
{
_connectionType = typeof(System.Data.OracleClient.OracleConnection);
}
if (_connectionType == null)
Type.GetType(connectionTypeSpec, /* throwOnError */ true);
this worked!
can you please update MADAM?
Original comment by to.ko...@gmail.com
on 9 Sep 2008 at 11:36
Original issue reported on code.google.com by
to.ko...@gmail.com
on 8 Sep 2008 at 11:27