Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ricardo 24 posts 56 karma points
    Sep 15, 2014 @ 18:32
    Ricardo
    0

    Not working when using Azure Storage Emulator

    Create a new Umbraco database instance, installed AST package but when enabled

    <add key="saveMediaToAzure" value="true" />

    and using the Azure Storage Emulator with default AccountName and AccountKey

          <add key="azureConnectionString" value="DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />

    get error below (full Stacktrace below)
      The remote server returned an error: (403) Forbidden.
    Also tried specifying the connection string as explained here
    connectionString = @"DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;
    AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;
        BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;
        TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;
        QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;";
    but get error 

    [FormatException: Invalid account string.]
       Microsoft.WindowsAzure.CloudStorageAccount.<Parse>b__0(String err) +82
       Microsoft.WindowsAzure.CloudStorageAccount.ParseStringIntoSettings(String s, Action`1 error) +801
       Microsoft.WindowsAzure.CloudStorageAccount.TryParse(String s, CloudStorageAccount& accountInformation, Action`1 error) +340
       Microsoft.WindowsAzure.CloudStorageAccount.Parse(String value) +291
       AST.AzureBlobStorage.FileSystem.AzureFileStorage.CreateBlobClient(String storageConnectionString) +57
       AST.AzureBlobStorage.FileSystem.AzureFileStorage..ctor(String storageConnectionString, String stripFromPathForContainer, String stripFromPathForKey) +107
       AST.AzureBlobStorage.FileSystem.AzureFileSystem..ctor(String virtualRoot, String azureConnectionString, String saveMediaToAzure) +649

    also this other one solution
    connectionString = "UseDevelopmentStorage=true";
    but still does not working
    Any ideas?

    The remote server returned an error: (403) Forbidden.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.Net.WebException: The remote server returned an error: (403) Forbidden.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [WebException: The remote server returned an error: (403) Forbidden.]
       System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) +8632827
       Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebRequest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender) +118
    
    [StorageClientException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.]
       Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result() +152
       Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait() +469
       Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImpl(Func`1 impl) +132
       Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFromStream(Stream source, BlobRequestOptions options) +281
       Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFromStream(Stream source) +63
       AST.AzureBlobStorage.FileSystem.AzureFileStorage.SavePostedFile(Stream stream, String path, String fileName) +676
       AST.AzureBlobStorage.FileSystem.AzureFileSystem.AddFile(String path, Stream stream, Boolean overrideIfExists) +922
       AST.AzureBlobStorage.FileSystem.AzureFileSystem.AddFile(String path, Stream stream) +65
       Umbraco.Core.IO.FileSystemWrapper.AddFile(String path, Stream stream) +101
       Umbraco.Core.IO.UmbracoMediaFile.Save(Stream inputStream, String path) +122
       umbraco.cms.businesslogic.Files.UmbracoFile.Save(Stream inputStream, String path) +50
       umbraco.cms.businesslogic.datatype.FileHandlerData.set_Value(Object value) +2233
       umbraco.editorControls.uploadField.Save() +965
       umbraco.controls.ContentControl.SetNameAndDataTypeValues() +747
       umbraco.controls.ContentControl.SaveClick(Object sender, ImageClickEventArgs e) +50
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +134
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +204
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804
    
  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Sep 15, 2014 @ 18:48
    Sebastiaan Janssen
    0

    Ehm I have no answer to your question, but now that you've posted it publicly you NEED to change your account key else it will be abused.. :)

  • Ricardo 24 posts 56 karma points
    Sep 16, 2014 @ 10:28
    Ricardo
    0

    Thanks Sebastiaan for the advice but is a public credential that only works on Azure Storage Emulator, so only locally

    http://msdn.microsoft.com/en-us/library/azure/hh403989.aspx

     

  • Ricardo 24 posts 56 karma points
    Sep 16, 2014 @ 18:22
    Ricardo
    0

    Found the problem: I didn't read the instructions properly, forgot to "Make sure you create a container called "Media"" in the local storage. It works with

          <Setting name="StorageConnectionString" value="UseDevelopmentStorage=true" />

Please Sign in or register to post replies

Write your reply to:

Draft