How to solve the error WebException: The remote server returned an error: (403) Forbidden?
FIRST CREATED ON 28 May 2025 I AUTHOR Emma Camacho
If getting the follow error every time when rebuilding the cache of a Datasource or when running a task or in general, when using a Datasource and the Qlik Sense Server has been updated to Qlik Sense November 2024 or higher, upgrade to a higher version of M&D.
Issue
STACK TRACEWebSocketException: Unable to connect to the remote server
at MailAndDeploy.Server.ExtensionMethods.Await(Task pTask, TimeSpan pTimeout)
at MailAndDeploy.Server.Json.Rpc.JsonRpcConnection..ctor(Uri pUri, JsonRpcCookie[] pCookies, JsonRpcHeader[] pHeaders)
at MailAndDeploy.Server.Connectors.QlikSense.QsEoWConnector.EstablishRpcConnection(Uri pUri, JsonRpcCookie[] pCookies, JsonRpcHeader[] pHeaders)
at MailAndDeploy.Server.Connectors.QlikSense.QsEoWConnector.GetAppIdentifiers()
at MailAndDeploy.Server.Services.Management.Ui.QlikSenseServerAppDatasourceSheet.ReloadAppsDropDown()
at MailAndDeploy.Server.Services.Management.Ui.QlikSenseServerAppDatasourceSheet.GeneralPage_AppField_ButtonClicked(String pSender)
WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.ClientWebSocket.d__21.MoveNext()
Resolution
Please install M&D version 3.5.12 or higher.

Looking for Additional Guidance?
If you require more detailed information or further assistance, please visit our comprehensive Online Documentation. Our resources are designed to help you navigate all features and functionalities effectively.