Server Error in '/' Application.

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:


Line 7:      Layout = "~/Views/Shared/Layouts/_Layout-Civil.cshtml";
Line 8:      var currentUser = DependencyResolver.Current.GetService<IGlobalSettings>().CurrentUser;
Line 9:      IStringLocalizer T = DependencyResolver.Current.GetService<IStringLocalizer>();
Line 10: }
Line 11: <div class="main-body pt-120">

Source File: C:\home\site\wwwroot\Views\Promotions\Index.cshtml    Line: 9

Stack Trace:


[WebException: The remote server returned an error: (403) Forbidden.]
   System.Net.HttpWebRequest.GetResponse() +1694
   Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync(RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) +1161

[StorageException: The remote server returned an error: (403) Forbidden.]
   Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync(RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) +2495
   Microsoft.WindowsAzure.Storage.Blob.<>c__DisplayClassf.<ListBlobs>b__e(IContinuationToken token) +168
   Microsoft.WindowsAzure.Storage.Core.Util.<LazyEnumerable>d__0`1.MoveNext() +94
   System.Linq.<OfTypeIterator>d__95`1.MoveNext() +141
   System.Linq.WhereEnumerableIterator`1.MoveNext() +127
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +453
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +69
   DGCA.Helpers.Azure.AzureOperations.GetFilesFromAzureByName(String container, String FolderOrFullPathAfterContainer, String FileName) in D:\Ms Projects\DGCA-Backend (1)\dgca-final-master\LineDGCA\Helpers\Azure\AzureOperations.cs:199
   DGCA.Helpers.StringLocalizer..ctor() in D:\Ms Projects\DGCA-Backend (1)\dgca-final-master\LineDGCA\Helpers\StringLocalizer.cs:24
   lambda_method(Closure , Object[] ) +72
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +250

[DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor()' on type 'StringLocalizer'. ---> The remote server returned an error: (403) Forbidden. (See inner exception for details.)]
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +794
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +88
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +119

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = StringLocalizer (ReflectionActivator), Services = [DGCA.Helpers.IStringLocalizer], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor()' on type 'StringLocalizer'. ---> The remote server returned an error: (403) Forbidden. (See inner exception for details.) (See inner exception for details.)]
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +454
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +158
   Autofac.Core.Resolving.InstanceLookup.Execute() +175
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +171
   Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +108
   Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +135
   Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters) +70
   Autofac.Integration.Mvc.AutofacDependencyResolver.GetService(Type serviceType) +75
   System.Web.Mvc.DependencyResolverExtensions.GetService(IDependencyResolver resolver) +59
   ASP._Page_Views_Promotions_Index_cshtml.Execute() in C:\home\site\wwwroot\Views\Promotions\Index.cshtml:9
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +86
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +91
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +32
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +46
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +651
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4690.0