Re: [ELMAH] Elmah.axd Conflicts with SessionState?

100 views
Skip to first unread message

Atif Aziz

unread,
Feb 22, 2011, 6:23:51 PM2/22/11
to el...@googlegroups.com
Does the error occur on any URL in your app or just when you access a URL to an error detail page of ELMAH? If it's for any URL in your app then the solution, I believe, is suggested as part of the error message:

This error can be caused by a virtual directory not being configured as an
application in IIS.

- Atif

On Wed, Feb 23, 2011 at 12:04 AM, Shapper <mdm...@gmail.com> wrote:
Hello,

I have the following on a ASP.NET MVC web.config file:

 <sessionState cookieName="MVCProject.Session"/>

Basically I just read the following and tried to change the Session's
State Cookie Name:

http://msdn.microsoft.com/en-us/library/h6bb9cz9.aspx

When I try to access the following link:

 http://domain.com/elmah.axd/detail?id=118

I get the following error:

Configuration Error
Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.  This
error can be caused by a virtual directory not being configured as an
application in IIS.

Source Error:
Line 65:       <sessionState cookieName="MVCProject.Session"/>
Line 67:     </system.web>

I am able to access the url when I remove this code line from Web
Config.

What might be wrong?

Thank You,
Miguel

--
You received this message because you are subscribed to the Google Groups "ELMAH" group.
To post to this group, send email to el...@googlegroups.com.
To unsubscribe from this group, send email to elmah+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/elmah?hl=en.


Shapper

unread,
Feb 22, 2011, 6:04:28 PM2/22/11
to ELMAH

Shapper

unread,
Feb 22, 2011, 9:25:01 PM2/22/11
to ELMAH
The entire MVC application works fine.
I can go through any url and I can also download files from a folder
in the application.

The only thing I am not able to do is to access Elmah.
But if I remove the SessionState code line from Web.Config then I can
access Elmah without any problem.

Any idea? This is quite strange.

On Feb 22, 11:23 pm, Atif Aziz <aziza...@gmail.com> wrote:
> Does the error occur on any URL in your app or just when you access a URL to
> an error detail page of ELMAH? If it's for any URL in your app then the
> solution, I believe, is suggested as part of the error message:
>
> This error can be caused by a virtual directory not being configured as an
>
> > application in IIS.
>
> - Atif
>

Atif Aziz

unread,
Feb 23, 2011, 3:00:30 AM2/23/11
to el...@googlegroups.com
Is this web.config sitting in the root of your application's virtual directory?

Shapper

unread,
Feb 23, 2011, 9:18:02 AM2/23/11
to ELMAH
I found the problem!

I had the session part inside the System.Web of Elmah and not on main
System.Web.

Usually the strangest problems have the simplest solution.

By the way, when will the new version of Elmah be available?
And will it be easier to create custom data providers to save errors
with other data sources?

Thank You,
Miguel

On Feb 23, 8:00 am, Atif Aziz <aziza...@gmail.com> wrote:
> Is this web.config sitting in the root of your application's virtual
> directory?
>

Atif Aziz

unread,
Feb 23, 2011, 9:27:45 AM2/23/11
to el...@googlegroups.com
By the way, when will the new version of Elmah be available?

We're aiming for a release in March timeframe if there are no showstoppers from field testing of the 1.2 beta.

And will it be easier to create custom data providers to save errors
with other data sources?

You have always been able to plug in a store into ELMAH since version 1.0 by subclassing Elmah.ErrorLog. 

- Atif
Reply all
Reply to author
Forward
0 new messages