microsoft / ApplicationInsights-dotnet

ApplicationInsights-dotnet
MIT License
565 stars 287 forks source link

403 forbidden errors #1406

Closed RajasekarPR closed 3 years ago

RajasekarPR commented 6 years ago

When upgrading from the AppInsights version to 2.6.4 , all access to storage results in 403: Forbidden errors.

Do the needful

lmolkova commented 6 years ago

Duplicate: https://github.com/Microsoft/ApplicationInsights-dotnet-server/issues/640

It's likely you updated the nuget package version without installing it and don't have proper ApplicationInsights.config that contains following setting for DependencyTrackingTelemetryModule

<ExcludeComponentCorrelationHttpHeadersOnDomains>
        <!-- 
        Requests to the following hostnames will not be modified by adding correlation headers.         
        Add entries here to exclude additional hostnames.
        NOTE: this configuration will be lost upon NuGet upgrade.
        -->
        <Add>core.windows.net</Add>
        <Add>core.chinacloudapi.cn</Add>
        <Add>core.cloudapi.de</Add>
        <Add>core.usgovcloudapi.net</Add>
        <Add>localhost</Add>
        <Add>127.0.0.1</Add>
      </ExcludeComponentCorrelationHttpHeadersOnDomains>

Please remove AI packages and reinstall them with VS or nuget.

I'm closing this for now, if you experience the issue with the config above, please provide following info:

RajasekarPR commented 6 years ago

@lmolkova

Here is the details pls do the needful

.Net Version : 4.5.2 Application Insights version from : 2.2.0 to 2.6.4 ApplicationInsights.Config :+1: <?xml version="1.0" encoding="utf-8"?>

core.windows.net core.chinacloudapi.cn core.cloudapi.de core.usgovcloudapi.net localhost 127.0.0.1 false Microsoft.Azure.EventHubs Microsoft.Azure.ServiceBus 5 Event 5 Event

packages.config:

<?xml version="1.0" encoding="utf-8"?>

Hosted App : Azure web server

lmolkova commented 6 years ago

@RajasekarPR could you please provide full ApplicationInsights.config and packages.config? Also which storage endpoint URL do you use? Is it core.windows.net? Does it repro locally with the emulator?

RajasekarPR commented 6 years ago

@lmolkova

Azure Storage endpoint.. It is not core.windows.net.

Added the files. Kindly check it. Application_Insights.txt

packages.txt

lmolkova commented 6 years ago

Azure Storage endpoint.. It is not core.windows.net.

Ok, is it one of these?

                <Add>core.windows.net</Add>
                <Add>core.chinacloudapi.cn</Add>
                <Add>core.cloudapi.de</Add>
                <Add>core.usgovcloudapi.net</Add>
                <Add>localhost</Add>
                <Add>127.0.0.1</Add>

If not, please add it to the list in your ApplicationInsights.config

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 300 days with no activity. Remove stale label or comment or this will be closed in 7 days.