The remote server returned an error: (404) Not Found.
Hello Everyone,
My application, built on the .Net 4.8 Framework, is deployed on Azure as an App Service. Within the App Service, I've set up two deployment slots: one for development (Dev Slot) and one for production (Prod Slot).
For storage, I am using Azure Blob Storage. With Blob I am not using SAS.
I've configured Microsoft as the identity provider for authentication in both the production and development slots.
Occasionally, during the swap process from the development slot to the production slot, I encounter issues where one of the slots stops functioning. To diagnose and address these problems, I log the exceptions and stack traces in a database. Here, I'm sharing the relevant information. Exception Message :
The remote server returned an error: (404) Not Found. System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.GetResponse() at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 722
And Stack Trace
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 649 at Microsoft.WindowsAzure.Storage.Blob.CloudBlob.DownloadToStream(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlob.cs:line 235 at CP.Utils.BlobManager.DownloadFile(String filename, String bucket, String foldername, String connection) in D:\a\1\s\CP\Utils\BlobManager.cs:line 98 at CP.Controllers.LoginController.createsession() in D:\a\1\s\CP\Controllers\LoginController.cs:line 389 at CP.Controllers.LoginController.Index() in D:\a\1\s\CP\Controllers\LoginController.cs:line 562 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__11_0() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_1.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_6.<BeginInvokeAction>b__3() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__5(IAsyncResult asyncResult)
Here also I am attaching the screen-shots of the slots configuration:
DEV :
But from exception message it seems like the origin of the error is from Azure Storage. Kindly provide guidance on the steps I should revisit and the necessary actions to take in order to address the issues during the slot swap process. If additional information is required for a thorough analysis, please let me know. Thanks