when I execute "await ExportTileCacheTask.CreateAsync(basemap.Source);" catch a Invalid response: Service does not support tile export. I use map in https://www.arcgis.com/home/group.html?owner=esri&title=Tiled%20Basemaps&start=11&q for export also catch this exception
Can you give the exact code / url that you are using? Following seems to work without any problems.
var task = await ExportTileCacheTask.CreateAsync(
Remember that you shouldn't use the service "For export" services as your basemaps, they are intended to be used for taking tiles offline and not visualization.
That is expected if you haven't signed in to ArcGIS Online since the export tiles feature is available to subscribed users (operation doesn't consume credits but you have to be signed in to have a access to it).
You can see more about authentication from Use the Authentication Manager—ArcGIS Runtime SDK for .NET | ArcGIS for Developers or have a look to the samples arcgis-runtime-samples-dotnet/src/WPF/ArcGISRuntime.WPF.Samples/Samples/Security at master · Esri/ar...
I test and I logn the https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/master/src/WPF/ArcGISRuntime.WPF.Samples/...https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/master/src/WPF/ArcGISRuntime.WPF.Samples/..., the second layer USA-Secure display "denied", and I change the first layer uri as https://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Street_Map/MapServer and login also display "denied".
Can you try if this works? Just change it to use your credentials.
public partial class MainWindow : Window
AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(CreateKnownCredentials);
private async void Initialize()
var task = await ExportTileCacheTask.CreateAsync(new Uri("https://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Street_Map/MapServer"));
catch (Exception ex)
// Something unexpected happened, handle properly
private string _username = "abcd";
private string _password = "1234";
private async Task<Credential> CreateKnownCredentials(CredentialRequestInfo info)
// If this isn't the expected resource, the credential will stay null
Credential knownCredential = null;
// Create a credential for this resource
knownCredential = await AuthenticationManager.Current.GenerateCredentialAsync
catch (Exception ex)
// Report error accessing a secured resource
MessageBox.Show("Access to " + info.ServiceUri.AbsoluteUri + " denied. " + ex.Message, "Credential Error");
// Return the credential