Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

ApplicationInsights Exception problem in RenderViewToString<TModel>(string name, TModel model) method #183

Closed
sunilrav opened this issue Nov 22, 2016 · 3 comments

Comments

@sunilrav
Copy link

sunilrav commented Nov 22, 2016

I am getting this exception when I try RenderViewToString in my code. The sample runs fine.

No service for type 'Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration' has been registered.

Any Idea whats going on? The only difference is I am using net461 but the sample is using net451.

@hishamco
Copy link
Contributor

hishamco commented Dec 9, 2016

@sunilrav could you please open the issue in the https://github.com/Microsoft/ApplicationInsights-aspnetcore repo, I'm not quite sure why you open it here?!!

@ajaybhargavb
Copy link
Contributor

@sunilrav, if you are trying to render a view that uses a service, make sure you register that service in your service container. See how the sample registers EmailReportGenerator because it is used in a view https://github.com/aspnet/Entropy/blob/dev/samples/Mvc.RenderViewToString/Program.cs#L36

@Eilon
Copy link
Member

Eilon commented Feb 14, 2018

Hi, this issue is being closed because this repo contains only unofficial samples and tests, and is not otherwise regularly maintained. If you're having an issue with ASP.NET Core or EF Core, please log a new issue in the appropriate product repo (or if you're not sure where, the https://github.com/aspnet/Home/issues repo).

@Eilon Eilon closed this as completed Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants