0
votes

I am seeing this error when I try to Deploy to a new Azure Instance. Any idea?

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: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[WebException: The remote server returned an error: (403) Forbidden.]
   Sitecore.Azure.Helpers.HttpGateway.GetHttpResponse(String uri, String httpMethod, String versionXMsVersion, String body) +1052

[WebException: REST REQUEST FAILED :
 Request: https://management.core.windows.net/d22cd83d-8a4f-4b90-a477-5cb4a9d7d67b
 Server response = ForbiddenErrorThe server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.]

[AccessForbiddenException: There was a problem contacting Azure Service, please check your ceritificate on the portal]
   Sitecore.Azure.Helpers.HttpGateway.GetHttpResponse(String uri, String httpMethod, String versionXMsVersion, String body) +1793
   Sitecore.Azure.Managers.Providers.AzureHost.AzureHostProvider.GetSubscriptionProperties(String subscriptionID) +250
   Sitecore.Azure.UI.Files.sitecore.shell.Applications.Azure.AzureControls.Dialogs.NewDeploymentForm.RegisterDatasources(DeploymentType deploymentType) +1510
   Sitecore.Azure.UI.Files.sitecore.shell.Applications.Azure.AzureControls.Dialogs.NewDeploymentForm.OnLoad(EventArgs e) +700

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +193
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +337
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
1

1 Answers

0
votes

This happened because the certificates were not matching between my machine and the ones that were uploaded to Azure. I had to regenerate them using Sitecore Azure installation wizard once again.