locked
AzureStorage 4.6 "The remote server returned an error: (403) Forbidden." RRS feed

  • Question

  • Hi,

    I'am using an azure project with one web role, and one worker role. Both try to create blobs using CreateIfNotExistsAsync(BobContainerPublicAccessType.Blob, null, null). Running in AzureEmulator storage, and only in the web role, when executing CreateIfNotExists() I have the error: "The remote server returned an error: (403) Forbidden." This worked fine in previous versions. One thing I have done was updating the NuGet packages, including upgrade to WindowsAzure.Storage 8.1.4

    Wednesday, July 5, 2017 4:38 PM

Answers

  • @lmfr74 Could you try downgrading AI to version 2.3? One of the users reported having resolved the issue downgrading AI from v2.4 to v2.3.

    -----------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    • Marked as answer by lmfr74 Monday, July 10, 2017 10:25 AM
    Monday, July 10, 2017 4:08 AM

All replies

  • Some users experienced a similar issue and the fix that worked for them was removing the below line from the startup.cs file. Could you give this a try and let us know how it goes. Basically, the issue appears to be with Application Insights being enabled.

    services.AddApplicationInsightsTelemetry(configuration);

    Refer this thread for more details.

    -----------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    • Proposed as answer by Md Shihab Thursday, July 6, 2017 4:35 AM
    Thursday, July 6, 2017 4:34 AM
  • I don't have a startup.cs file, but I use "TelemetryConfiguration.Active.DisableTelemetry = true" on Application_Start(). Previously I was using version 7.2 of WindowsAzure.Storage. I noticed in https://github.com/Azure/azure-storage-net/blob/master/changelog.txt that in my upgrade to version 8 some changes were made into blobs, such as:

    "Blobs: CreateIfNotExists calls on a Container will be logged by AppInsight as a failure if the container exists. The failure is ignored by the library and this change saves an extra service call in case the container doesn't exist."

    "All: Added support for using Create/Delete and CreateIfNotExists/DeleteIfExists without read SAS permissions. CreateIfNotExists methods will now only do one REST call instead of two."

    I'am using a Cloud project using .Net 4.5, with web role, and worker role. As described before, the problem does not occur in the worker role, only in the webapi web role.

    Thursday, July 6, 2017 10:13 AM
  • We had the same issue after installing the Application Insights package into our business rules project.

    We have an N-tier solution with asp.net core, which has a different version of application insights.

    It turns out we installed the non asp.net core package into the business rules, which then produced the Forbidden 403 error when accessing Queue Client.

    We removed the non asp.net core application insights, installed the application insights core into the business rules project and all worked ok.

    I would check you don't have different application insights version across your projects.

    Thursday, July 6, 2017 10:22 PM
  • I have updated projects to .NET 4.6.1 and reinstalled and updated all nugget packages. I'm using AI 2.4, but the problem persists!
    Friday, July 7, 2017 2:21 PM
  • @lmfr74 Could you try downgrading AI to version 2.3? One of the users reported having resolved the issue downgrading AI from v2.4 to v2.3.

    -----------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    • Marked as answer by lmfr74 Monday, July 10, 2017 10:25 AM
    Monday, July 10, 2017 4:08 AM
  • Yep! downgrading AI to v2.3 resolved. Thanks.
    • Edited by lmfr74 Monday, July 10, 2017 10:26 AM
    Monday, July 10, 2017 10:26 AM