Copied to clipboard

Flag this post as spam?

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


  • Carlos 3 posts 24 karma points
    May 02, 2014 @ 17:57
    Carlos
    0

    Issue with Azure VirtualApplication

    Hi, we are using  AST Azure Media Sync in an Umbraco v7 environment. Due to bussiness needs we are running several websites in an Azure Cloud Project and the specific Umbraco website is being run as a VirtualApplication.

    If we run the Umbraco website alone it works perfectly, however as a Virtual Application we cannot upload any images to our BlobStorage.it allways returns a 400 Bad Request Error. 

    Do you have any idea as to what might be causing this problem? 

    Thanks in advance, and we really appreciate the great work you did in this project.

     

     

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    May 05, 2014 @ 16:25
    Ali Sheikh Taheri
    0

    Hi Carlos

    Could you please copy and paste the full Stack Trace so I can investigate it further?

    Thanks for using my package.

    Cheers

    Ali

  • Carlos 3 posts 24 karma points
    Jun 11, 2014 @ 12:01
    Carlos
    0

    Hi, I apologise for the delay

    When I activate break on "Common Language Runtime Exceptions" this is the first exception that I get:

     

     

    With this call stack:

    >mscorlib.dll!System.RuntimeType.CreateInstanceSlow(bool publicOnly, bool skipCheckThis, bool fillCache, ref System.Threading.StackCrawlMark stackMark)Unknown

     mscorlib.dll!System.Activator.CreateInstance(System.Type type, bool nonPublic)Unknown

     mscorlib.dll!System.Activator.CreateInstance(System.Type type)Unknown

     Umbraco.Core.dll!Umbraco.Core.Models.DeepCloneHelper.DeepCloneRefProperties(Umbraco.Core.Models.IDeepCloneable input, Umbraco.Core.Models.IDeepCloneable output)Unknown

     Umbraco.Core.dll!Umbraco.Core.Models.EntityBase.Entity.DeepClone()Unknown

     Umbraco.Core.dll!Umbraco.Core.Persistence.Caching.RuntimeCacheProvider.GetById(System.Type type, System.Guid id)Unknown

     Umbraco.Core.dll!Umbraco.Core.Persistence.Repositories.RepositoryBase<int,Umbraco.Core.Models.IDataTypeDefinition>.TryGetFromCache(int id)Unknown

     Umbraco.Core.dll!Umbraco.Core.Persistence.Repositories.RepositoryBase<int,Umbraco.Core.Models.IDataTypeDefinition>.Get(int id)Unknown

     Umbraco.Core.dll!Umbraco.Core.Services.DataTypeService.GetDataTypeDefinitionById(int id)Unknown

     umbraco.dll!Umbraco.Web.Models.Mapping.ContentPropertyDtoConverter.ConvertCore(Umbraco.Core.Models.Property originalProperty)Unknown

     AutoMapper.dll!AutoMapper.TypeConverter<Umbraco.Core.Models.Property,Umbraco.Web.Models.ContentEditing.ContentPropertyDto>.Convert(AutoMapper.ResolutionContext context)Unknown

     AutoMapper.dll!AutoMapper.MappingExpression<Umbraco.Core.Models.Property,Umbraco.Web.Models.ContentEditing.ContentPropertyDto>.ConvertUsing.AnonymousMethod__14(AutoMapper.ResolutionContext context)Unknown

     AutoMapper.dll!AutoMapper.Mappers.TypeMapObjectMapperRegistry.CustomMapperStrategy.Map(AutoMapper.ResolutionContext context, AutoMapper.IMappingEngineRunner mapper)Unknown

     AutoMapper.dll!AutoMapper.Mappers.TypeMapMapper.Map(AutoMapper.ResolutionContext context, AutoMapper.IMappingEngineRunner mapper)Unknown

     AutoMapper.dll!AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(AutoMapper.ResolutionContext context)Unknown

     AutoMapper.dll!AutoMapper.Mappers.EnumerableMapperBase<System.Collections.IList>.Map(AutoMapper.ResolutionContext context, AutoMapper.IMappingEngineRunner mapper)Unknown

     AutoMapper.dll!AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(AutoMapper.ResolutionContext context)Unknown

     AutoMapper.dll!AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.MapPropertyValue(AutoMapper.ResolutionContext context, AutoMapper.IMappingEngineRunner mapper, object mappedObject, AutoMapper.PropertyMap propertyMap)Unknown

     AutoMapper.dll!AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.Map(AutoMapper.ResolutionContext context, AutoMapper.IMappingEngineRunner mapper)Unknown

     AutoMapper.dll!AutoMapper.Mappers.TypeMapMapper.Map(AutoMapper.ResolutionContext context, AutoMapper.IMappingEngineRunner mapper)Unknown

     AutoMapper.dll!AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(AutoMapper.ResolutionContext context)Unknown

     AutoMapper.dll!AutoMapper.MappingEngine.Map(object source, System.Type sourceType, System.Type destinationType, System.Action<AutoMapper.IMappingOperationOptions> opts)Unknown

     AutoMapper.dll!AutoMapper.MappingEngine.Map<Umbraco.Core.Models.IMedia,Umbraco.Web.Models.ContentEditing.ContentItemDto<Umbraco.Core.Models.IMedia>>(Umbraco.Core.Models.IMedia source)Unknown

     AutoMapper.dll!AutoMapper.Mapper.Map<Umbraco.Core.Models.IMedia,Umbraco.Web.Models.ContentEditing.ContentItemDto<Umbraco.Core.Models.IMedia>>(Umbraco.Core.Models.IMedia source)Unknown

     umbraco.dll!Umbraco.Web.WebApi.Binders.MediaItemBinder.MapFromPersisted(Umbraco.Web.Models.ContentEditing.MediaItemSave model)Unknown

     umbraco.dll!Umbraco.Web.WebApi.Binders.ContentItemBaseBinder<Umbraco.Core.Models.IMedia,Umbraco.Web.Models.ContentEditing.MediaItemSave>.GetModel()Unknown

     mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown

     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown

     mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()Unknown

     mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents<System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.__Canon>>.AnonymousMethod__0()Unknown

     mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0()Unknown

     mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()Unknown

     mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)Unknown

     mscorlib.dll!System.Threading.Tasks.TaskCompletionSource<System.__Canon>.TrySetResult(System.__Canon result)Unknown

     System.Net.Http.Formatting.dll!System.Threading.Tasks.TaskHelpers.TrySetFromTask<System.Net.Http.MultipartFormDataStreamProvider>(System.Threading.Tasks.TaskCompletionSource<System.Net.Http.MultipartFormDataStreamProvider> tcs, System.Threading.Tasks.Task source)Unknown

     System.Net.Http.Formatting.dll!System.Threading.Tasks.TaskHelpersExtensions.FinallyImplContinuation<System.Net.Http.MultipartFormDataStreamProvider>.AnonymousMethod__1c(System.Threading.Tasks.Task innerTask)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.Execute()Unknown

     mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown

     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution)Unknown

     mscorlib.dll!System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)Unknown

     mscorlib.dll!System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)Unknown

     mscorlib.dll!System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task task, bool needsProtection)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()Unknown

     mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)Unknown

     mscorlib.dll!System.Threading.Tasks.UnwrapPromise<System.Net.Http.MultipartFormDataStreamProvider>.TrySetFromTask(System.Threading.Tasks.Task task, bool lookForOce)Unknown

     mscorlib.dll!System.Threading.Tasks.UnwrapPromise<System.__Canon>.ProcessInnerTask(System.Threading.Tasks.Task task)Unknown

     mscorlib.dll!System.Threading.Tasks.UnwrapPromise<System.__Canon>.Invoke(System.Threading.Tasks.Task completingTask)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()Unknown

     mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)Unknown

     mscorlib.dll!System.Threading.Tasks.TaskCompletionSource<System.__Canon>.TrySetResult(System.__Canon result)Unknown

     System.Net.Http.Formatting.dll!System.Threading.Tasks.TaskHelpersExtensions.ThenImplContinuation<System.Net.Http.MultipartFormDataStreamProvider,System.Threading.Tasks.Task>.AnonymousMethod__43(System.Threading.Tasks.Task innerTask)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.Execute()Unknown

     mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown

     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)Unknown

     mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution)Unknown

     mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch()Unknown

     [Native to Managed Transition]

    Only after this exception I receive the other exception:

     

     

    System.Net.WebException occurred

      _HResult=-2146233079

      _message=The remote server returned an error: (400) Bad Request.

      HResult=-2146233079

      IsTransient=false

      Message=The remote server returned an error: (400) Bad Request.

      Source=System

      StackTrace:

           at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)

      InnerException: 

     

     

    With this call stack:
    >System.dll!System.Net.HttpWebRequest.EndGetResponse(System.IAsyncResult asyncResult) Line 2020C#
     Microsoft.WindowsAzure.StorageClient.dll!Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(System.Net.WebRequest req, System.IAsyncResult asyncResult, System.EventHandler<Microsoft.WindowsAzure.StorageClient.ResponseReceivedEventArgs> handler, object sender)Unknown
     Microsoft.WindowsAzure.StorageClient.dll!Microsoft.WindowsAzure.StorageClient.CloudBlobClient.EndGetResponse(System.IAsyncResult asyncresult, System.Net.WebRequest req)Unknown
     Microsoft.WindowsAzure.StorageClient.dll!Microsoft.WindowsAzure.StorageClient.Tasks.WebRequestExtensions.GetResponseAsync.AnonymousMethod__0(System.IAsyncResult asyncresult)Unknown
     Microsoft.WindowsAzure.StorageClient.dll!Microsoft.WindowsAzure.StorageClient.Tasks.APMTask<System.Net.WebResponse>.OnEnd(System.IAsyncResult ar)Unknown
     System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415C#
     mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown
     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown
     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)Unknown
     System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Line 463C#
     System.dll!System.Net.HttpWebRequest.ProcessResponse() Line 3672C#
     System.dll!System.Net.HttpWebRequest.SetResponse(System.Net.CoreResponseData coreResponseData) Line 3613C#
     System.dll!System.Net.ConnectionReturnResult.SetResponses(System.Net.ConnectionReturnResult returnResult) Line 181C#
     System.dll!System.Net.Connection.ReadComplete(int bytesRead, System.Net.WebExceptionStatus errorStatus) Line 3452C#
     System.dll!System.Net.Connection.ReadCallback(System.IAsyncResult asyncResult) Line 3089C#
     System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415C#
     System.dll!System.Net.Security._SslStream.ProcessFrameBody(int readBytes, byte[] buffer, int offset, int count, System.Net.AsyncProtocolRequest asyncRequest) Line 747C#
     System.dll!System.Net.Security._SslStream.ReadFrameCallback(System.Net.AsyncProtocolRequest asyncRequest) Line 919C#
     System.dll!System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(int bytes) Line 125C#
     System.dll!System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult transportResult) Line 150C#
     System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415C#
     mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown
     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown
     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)Unknown
     System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Line 463C#
     System.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped) Line 385C#
     mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP)Unknown
     [Native to Managed Transition]
    Thank you very much for your help, your package is very good and would be of great help to us if we could use it on our environment.
  • Carlos 3 posts 24 karma points
    Jun 23, 2014 @ 13:35
    Carlos
    1

    Hi, 

    I have been testing with your source code and I believe that I have found the issue.

    Basically when we use a virtual application on Azure, a folder is provided where that virtual application in run. That folder is not on the root of the website.

    This was the problem as usually Umbraco is run on the root of the site.

    With this configuration:

    • <VirtualApplication name="c" physicalDirectory="../src/umbraco" />

    Umbraco is no longer accessed like this

    but like this

    To solve the issue I basically used the properties  stripFromPathForContainer and stripFromPathForKey that you already defined on the class AzureFileStorage to remove the "c/" portion of the path.

    It would be nice if we could provide this parameters on the <appSettings>

    Thanks for the help.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft