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

TelemetryClient.Initialize should not crash in partial trust scenario #416

Closed
SergeyKanzhelev opened this issue Jan 30, 2017 · 5 comments
Closed

Comments

@SergeyKanzhelev
Copy link
Contributor

Reported here: https://github.com/Microsoft/ApplicationInsights-Home/issues/87

TelemetryClient and other components should not crash when app is running in partial trust

System.Security.SecurityException at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Environment.GetEnvironmentVariables() at Microsoft.ApplicationInsights.Extensibility.Implementation.Platform.PlatformImplementation..ctor() at Microsoft.ApplicationInsights.Extensibility.Implementation.Platform.PlatformSingleton.get_Current() at Microsoft.ApplicationInsights.TelemetryClient.Initialize(ITelemetry telemetry) at Microsoft.ApplicationInsights.TelemetryClient.Track(ITelemetry telemetry) at Microsoft.ApplicationInsights.TelemetryClient.TrackTrace(TraceTelemetry telemetry) at Microsoft.ApplicationInsights.TelemetryClient.TrackTrace(String message)

@SergeyKanzhelev SergeyKanzhelev added this to the 2.3-Beta2 milestone Jan 30, 2017
@dnduffy dnduffy self-assigned this Feb 3, 2017
@dnduffy
Copy link
Member

dnduffy commented Feb 3, 2017

PR #420

@dnduffy dnduffy closed this as completed Feb 3, 2017
@dberryalliance
Copy link

@dnduffy The constructor for TransmissionProcessor calls into the PlatformSingleton to asses debugging status. This also breaks in PartialTrust mode.

@fedejousset
Copy link

fedejousset commented Jul 13, 2017

I'm still getting an error trying to use TelemetryClient in partial trust mode (2.4.0 version):

System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.AppDomainSetup.VerifyDir(String dir, Boolean normalize)
at Microsoft.ApplicationInsights.Extensibility.Implementation.Platform.PlatformImplementation.ReadConfigurationXml()
at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.Initialize(TelemetryConfiguration configuration, TelemetryModules modules)
at Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.get_Active()
at Microsoft.ApplicationInsights.TelemetryClient..ctor()
at AppInsights.Plugin.ExamplePlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.<>c__DisplayClass8.<Execute>b__1()

Should I create another isssue or is it part of this one? @SergeyKanzhelev / @dnduffy

Thank you!

@SergeyKanzhelev SergeyKanzhelev removed this from the 2.3-Beta2 milestone Jul 13, 2017
@SergeyKanzhelev
Copy link
Contributor Author

Reopened an issue

@cijothomas
Copy link
Contributor

Fixed in #1119

TimothyMothra pushed a commit that referenced this issue Oct 25, 2019
Fix issue #416. Add certain domains to dependency collector's exclude list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants