DebugOfTheRoad / elmah

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

Do not support the sub-webapplication's error report by web page #50

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have one web site(as a container) which contains many different web 
applications
2. Integrate ELMAH into the web site
3. An error "A" occurs in one of the sub-webapplication
4. Access websiteUrl/elmah.axd to view the error log
5. ERROR: the error "A" does not display in the page.

What is the expected output? What do you see instead?
the error A should be displayed.
but it does not.

What version of the product are you using? On what operating system?
ELMAH-1.0-BETA2-src.zip

Please provide any additional information below.
I have tracked the issue and find a way to fix it.
This issue is caused by the sp: ELMAH_GetErrorsXml
The sp only gets the errors which have the same application. It does not 
consider this situation: A web site contains multiple sub-applications. 
For example, let’s have a website http://localhost:48900 whose application 
will be recorded as /LM/W3SVC/1915900280/Root. And there are some sub-
applications under the http://localhost:48900 such as v.20080102.01 which 
is also a web application. You can access the v.20080102.01 by 
http://localhost:48900/v.20080102.01. Ironically, if there is an error 
occurs in v.20080102.01, the application will be recorded 
as /LM/w3svc/1915900280/ROOT/v.20080102.01
When we access http://localhost:48900/elmah.axd, the sp gets all the 
errors whose application is /LM/W3SVC/1915900280/Root, but ignore these 
errors occurred in the sub-application whose application is 
LM/w3svc/1915900280/ROOT/v.20080102.01
<b>Solution</b>:
So the solution is to modify the sp. Change all the code “Application = 
@Application” to "Application like @Application + '%'" then it will get 
all the error which occurred in the sub-application. (3 places)
and do the samething in ELMAH_GetErrorXml(1 places)

Original issue reported on code.google.com by jxli1...@gmail.com on 4 Jan 2008 at 6:39

GoogleCodeExporter commented 8 years ago
Hi,

When you declare your error log, you have the option of specifying the 
application 
name too, e.g.

<errorLog type="Elmah.SqlErrorLog, Elmah" 
            connectionStringName="xxx" applicationName="MyApplication" />

Firstly, could you not use this technique to ensure that all you 
"sub-applications" 
logged to the same place?

Secondly, the fact that you can do this means that the solution you offer will 
not 
necessarily work!

Perhaps this would be better covered by the issue 31 when that is resolved?

James

Original comment by jamesdriscoll71 on 10 May 2008 at 12:52

GoogleCodeExporter commented 8 years ago

Original comment by azizatif on 30 Sep 2008 at 10:49

GoogleCodeExporter commented 8 years ago
I think it would be helpful to be able to do something similar. I log 
exceptions from my admin site and my public site to the same database. It would 
be helpful if when I went to elmah.axd, it allowed me to view errors from both 
applications and to be able to easily determine which application the error 
stemmed from.

Maybe in the declaration of the elmah.axd handler in the web.config, we could 
specify which applicationName attributes we wish to have shown when calling the 
handler.

Original comment by anthony....@gmail.com on 22 Mar 2011 at 3:06

GoogleCodeExporter commented 8 years ago
So I've tried setting applicationName attribute in several application and it 
does not work. Is there anything else that needs to be updated in order for 
this attributes value to write to the application field in the database? Or is 
the latest version bugged?

Original comment by nezoi...@gmail.com on 17 Oct 2014 at 2:20

GoogleCodeExporter commented 8 years ago
@nezoic01

Could you ask a question on the discussion group 
(https://groups.google.com/forum/#!forum/elmah) and post the relevant lines of 
your web.config (with any sensitive data such as passwords obscured) and we can 
help you there!

Original comment by jamesdriscoll71 on 17 Oct 2014 at 2:50

GoogleCodeExporter commented 8 years ago
This issue has been migrated to:
https://github.com/elmah/Elmah/issues/50
The conversation continues there.
DO NOT post any further comments to the issue tracker on Google Code as it is 
shutting down.
You can also just subscribe to the issue on GitHub to receive notifications of 
any further development.

Original comment by azizatif on 25 Aug 2015 at 8:16