Copied to clipboard

Flag this post as spam?

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


  • Rick 92 posts 278 karma points
    Jul 16, 2015 @ 15:17
    Rick
    0

    Cannot create image in Umbraco

    Hi,

    I'm using Umbraco 7.2.6 and I have installed Azure Blob Storage Prodiver.

    I've followed the documentation but I am unable to create images in the media section of Umbraco.

    My FileSystemProviders.config looks like this (where "xxx" equals the AccountName and "yyy" is my primary access key:

    <FileSystemProviders>
    
    <Provider alias="media" type="idseefeld.de.UmbracoAzure.AzureBlobFileSystem, idseefeld.de.UmbracoAzure">
        <Parameters>
            <add key="containerName" value="media" />
            <add key="rootUrl" value="http://xxx.blob.core.windows.net/" />
            <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=yyy"/>
            <add key="mimetypes" value="" />
            <add key="cacheControl" value="*|public, max-age=31536000;js|no-cache" />
        </Parameters>
    </Provider>
    </FileSystemProviders>
    

    I have created a container in my storage account called "media" and this is a public container.

    I've also "touched" web.config for the changes to take effect.

    Now when I try and create a new image in the Umbraco media section, I get the error message in my console - and nothing further happens:

    http://localhost/umbraco/backoffice/UmbracoApi/Media/PostAddFile?origin=blueimp 500 (Internal Server Error)
    

    I can confirm that if I revert back to the default FileSystemProviders.config that ships with Umbraco, it creates the image as normal.

    Is there some configuration that I may have missed?

    Thanks,

    Rick

  • Mark Bowser 273 posts 860 karma points c-trib
    Jul 16, 2015 @ 15:52
    Mark Bowser
    0

    Do you see anything interesting in the Umbraco logs at App_Data/Logs? You might be able to get some details about that Internal Server Error.

  • Rick 92 posts 278 karma points
    Jul 16, 2015 @ 15:58
    Rick
    0

    Thanks for the reply Mark...

    There's nothing in the logs - in fact when I leave it open in notepad and perform upload image again through the Media section, it doesn't even attempt to reload the file so clearly isn't being written to.

    Rick

  • Dirk Seefeld 126 posts 665 karma points
    Jul 17, 2015 @ 07:22
    Dirk Seefeld
    0

    Hi Rick, do you have access to the event logs of your server? And if so please check with event viewer warnings for ASP.NET... in section Windows Logs > Application. There should be some details about the 500 error.

    KR Dirk

  • Dirk Seefeld 126 posts 665 karma points
    Jul 17, 2015 @ 07:49
    Dirk Seefeld
    0

    Meanwhile I have checked Umbarco version 7.2.6 with this package version 1.0.10.5 (recent nuget version but download version 1.0.10.4 should be fine too) and it works.

  • Rick 92 posts 278 karma points
    Jul 17, 2015 @ 08:28
    Rick
    0

    Hi Dirk,

    It's strange because there are no errors/warnings that are outputted to the event logs.

    However, when I open the developer tools in Chrome I see this error:

    {"Message":"An error has occurred.","ExceptionMessage":"Object reference not set to an instance of an object.","ExceptionType":"System.NullReferenceException","StackTrace":" at Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)\r\n at System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecuted(HttpActionContext actionContext, HttpResponseMessage response, Exception exception)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<>cDisplayClass2.1(CatchInfo1 info)\r\n at System.Threading.Tasks.TaskHelpersExtensions.<>c__DisplayClass41.

    I also have uCommerce running in this installation - could this be related?

    Thanks for the support.

    Rick

  • Dirk Seefeld 126 posts 665 karma points
    Jul 17, 2015 @ 08:38
    Dirk Seefeld
    0

    Hi Rick, sorry I have no experience with uCommerce and this package. I suggest you try out your configuration / environment with a blank Umbraco installation only with this package. If it works another package is probably causing the error. Or you ask uCommerce support for known issues.

    Dirk

  • Rick 92 posts 278 karma points
    Jul 17, 2015 @ 09:07
    Rick
    100

    Hi,

    Fresh day - fresh pair of eyes...

    I installed a web matrix version of 7.2.6 and used Beyond Compare to compare my web.config and the web matrix 7.2.6 web config.

    It appears I was missing targetFramework="4.5" on httpRuntime.

    My web.config:

    <httpRuntime enableVersionHeader="false" requestValidationMode="2.0" />
    

    7.2.6 web.config:

    <httpRuntime enableVersionHeader="false" requestValidationMode="2.0" targetFramework="4.5" />
    

    I'm not sure how/why my installation was missing this but I can confirm it is now working with the targetFramework="4.5" attribute added.

    Apologies to lead you down the wrong path!

    Thanks,

    Rick

  • Markus 2 posts 23 karma points
    Sep 08, 2015 @ 12:14
    Markus
    0

    Hi,

    i get that exact same Exception when i try to upload an image in the backoffice since i switched from the standard provider to AzureBlobStorageProvider.

    I do have the targetFramework defined.

    I also tried all this in a new clean Umbraco project and then everything works fine.

    Using UmbracoAzureBlobStorage Version 1.0.10.4. The Standard FileSystemProvider works.

    We have adapted the Media Types a bit (added Properties).

    Any hints maybe?

    Thanks in advance, Markus

  • Olivier 22 posts 115 karma points
    Oct 27, 2015 @ 22:16
    Olivier
    0

    Hi,

    I have the same error than Rick, but httpRuntime is configured... Locally, "the upload" works but it's because the azure sdk does a redirect to 127.0.0.1:10000 (see image)

    enter image description here

    I have the same error 500. How can I get more info ?

    Here the config:

    enter image description here

    On web.config:

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" executionTimeout="600" maxRequestLength="102400" />
    

    On Azure :

    enter image description here

    Containers:

    enter image description here

    Where should be idseefeld.de.UmbracoAzure.AzureBlobFileSystem, idseefeld.de.UmbracoAzure ?

    I can't see it in my solution on Visual studio ....

    Thx for your help !

    I use umbraco 7.3

Please Sign in or register to post replies

Write your reply to:

Draft