laptop and a wrench

Erro

Resource type implementation specified in ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Local.config is ignored by .NET Web ADF.

Última Publicação: August 25, 2014 No Product Found
Número de ID do Erro NIM045843
EnviadoJune 9, 2009
Última ModificaçãoApril 2, 2025
Aplica-se àNo Product Found
Versão encontrada9.3.1
Idioma do programaC#
Versão FixaN/A
StatusFixed

Solução Provisória

The workaround (see below) is to derive from GISDataSourceLocal and override CreateResource. In the datasource config file, they would have to point to their custom datasource implementation instead of GISDataSourceLocal. public override IGISResource CreateResource(ResourceInfo resourceInfo, string name) { IGISResource resource = null; switch (resourceInfo.Type) { case ResourceType.Map: if (ImageResourceBase.IsImageResourceDefinition(resourceInfo.ResourceDefinition)) { IMapResource mapResource = new ImageResourceLocal(name, this); mapResource.ResourceDefinition = resourceInfo.ResourceDefinition; resource = mapResource; } else { IMapResource mapResource = new MyMapResourceLocal(name, this); <== Use custom map resource implementation here mapResource.ResourceDefinition = resourceInfo.ResourceDefinition; resource = mapResource; } break; case ResourceType.Geocode: IGeocodeResource gcResource = new GeocodeResourceLocal(name, this); gcResource.ResourceDefinition = resourceInfo.ResourceDefinition; resource = gcResource; break; case ResourceType.Geoprocessing: IGeoprocessingResource gpResource = new GeoprocessingResourceLocal(name, this); gpResource.ResourceDefinition = resourceInfo.ResourceDefinition; resource = gpResource; break; } return resource; } Then, public class myMapResourceLocal:MapResourceLocal { public myMapResourceLocal() : base() { // create a writer and open the file TextWriter tw = new StreamWriter(@"C:\temp\m_gisresourcelocal\date.txt"); // write a line of text to the file tw.WriteLine(DateTime.Now); // close the stream tw.Close(); } public myMapResourceLocal(string name, GISDataSourceLocal service) : base(name, service) { // create a writer and open the file TextWriter tw = new StreamWriter(@"C:\temp\m_gisresourcelocal\date.txt"); // write a line of text to the file tw.WriteLine(DateTime.Now); // close the stream tw.Close(); } }

Etapas para Reproduzir

ID do Erro: NIM045843

Software:

  • No Product Found

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download