Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using in WEB API #75

Open
flastowizka opened this issue Aug 3, 2018 · 1 comment
Open

Using in WEB API #75

flastowizka opened this issue Aug 3, 2018 · 1 comment

Comments

@flastowizka
Copy link

I already using Elmah to send email with errors.

I tested the sample and works fine.

When i configured to ElasticSearch in my webapi project the output:

GET elmah/error/_search { "query": { "match_all": {} } }

this result

{ "took": 1, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 4, "max_score": 1, "hits": [ { "_index": "elmah", "_type": "error", "_id": "3dox_WQBVZNQ__bDh_oa", "_score": 1, "_source": { "query": { "match_all": {} } } }, { "_index": "elmah", "_type": "error", "_id": "_search_shards", "_score": 1, "_source": { "query": { "match_all": {} } } }, { "_index": "elmah", "_type": "error", "_id": "3Nox_WQBVZNQ__bDafq5", "_score": 1, "_source": { "query": { "match_all": {} } } }, { "_index": "elmah", "_type": "error", "_id": "_percolate", "_score": 1, "_source": { "query": { "match_all": {} } } } ] } }

@guibranco
Copy link
Contributor

Try access the page /ELMAH (or the path you configure to show ELMAH errors) and check if there is any error with the application.
In my case was that NEST and Elasticsearch.Net packages are in version 6 and this package (Elmah.Io.ElastiSearch) supports only the version 2 of this packages. (Maybe supports the 3, 4 and/or 5, but I didn't test)

If this is your problem too, you have some alternatives:

  • downgrade the NEST and Elasticsearch.NET packages to a compatible version (2.x.x)
  • Use this fork of Elmah.Io.ElasticSearch that works for the version 6 of this packages
  • Wait until the official package become compatible

If that is not your case, and the ELMAH error page shows normally, probably your Elastic Search connection string is wrong or you didn't set the errorLog directive in the web.config correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants