diff --git a/Lib/ClassLibraryCommon/Core/Executor/Executor.cs b/Lib/ClassLibraryCommon/Core/Executor/Executor.cs index e1681e39f..51837eabf 100644 --- a/Lib/ClassLibraryCommon/Core/Executor/Executor.cs +++ b/Lib/ClassLibraryCommon/Core/Executor/Executor.cs @@ -851,7 +851,9 @@ private static void ProcessStartOfRequest(ExecutionState executionState, s Uri transformedUri = executionState.RestCMD.Credentials.TransformUri(uri); Logger.LogInformational(executionState.OperationContext, startLogMessage, transformedUri); UriQueryBuilder builder = new UriQueryBuilder(executionState.RestCMD.Builder); - executionState.Req = executionState.RestCMD.BuildRequestDelegate(transformedUri, builder, executionState.Cmd.ServerTimeoutInSeconds, !executionState.RestCMD.Credentials.IsSAS, executionState.OperationContext); + + // Note - The service accepts both api-version and x-ms-version and therefore it is ok to add x-ms-version to all requests. + executionState.Req = executionState.RestCMD.BuildRequestDelegate(transformedUri, builder, executionState.Cmd.ServerTimeoutInSeconds, true, executionState.OperationContext); executionState.CancelDelegate = executionState.Req.Abort; // 2. Set Headers diff --git a/Lib/WindowsRuntime/Core/Executor/Executor.cs b/Lib/WindowsRuntime/Core/Executor/Executor.cs index 96980b86e..46d5c8c62 100644 --- a/Lib/WindowsRuntime/Core/Executor/Executor.cs +++ b/Lib/WindowsRuntime/Core/Executor/Executor.cs @@ -62,8 +62,9 @@ private async static Task ExecuteAsyncInternal(RESTCommand cmd, IRetryP bool shouldRetry = false; TimeSpan delay = TimeSpan.Zero; + // Note - The service accepts both api-version and x-ms-version and therefore it is ok to add x-ms-version to all requests. // Create a new client - HttpClient client = cmd.BuildClient(cmd, cmd.Handler, !cmd.Credentials.IsSAS, executionState.OperationContext); + HttpClient client = cmd.BuildClient(cmd, cmd.Handler, true, executionState.OperationContext); client.Timeout = TimeSpan.FromMilliseconds(int.MaxValue); do