feliperochadev / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

RSS Feeds and Forms authentication #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
my elmah.axd "resides" under a web sub-application that uses forms
authentication.

In my main-application i also set this in the web.config.

    <location path="mySubApplicationWithFormsAuth/elmah.axd">
        <system.web>
            <authorization>
                <deny users="?"/>
            </authorization>
        </system.web>
    </location>

If i login to the CMS i can see the elmah exception list and rss feeds in
my browser. If i logout i have no access to the elmah error list because of
the forms authentication. Thats fine so far!

However i want to use my rss feed reader to be informed by new exceptions
(i don't want to use the elmah mail logging feature).

Is this possible somehow? (I'm using RSSOWL 1.2.4)
if not - Are there any plans to support forms authentication?

thanks, toebens

Original issue reported on code.google.com by to.ko...@gmail.com on 8 Sep 2008 at 11:27

GoogleCodeExporter commented 9 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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