Message 1 of 2
ExternalService ,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm exploring the ExternalService. I worked out this method to see if it worked for me, but it gives me the following error,
The server does not represent a server of a valid type to be used with the service.
Any idea why?
Or if there is an article about this Namespace to understand it.
I share with you about what I have done, it is simple:
public class App : IExternalApplication
{
public Result OnStartup(UIControlledApplication a)
{
AddServers();
return Result.Succeeded;
}
public Result OnShutdown(UIControlledApplication a)
{
return Result.Succeeded;
}
private void AddServers()
{
try
{
ExternalService externalService = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.ExternalUIService);
SingleServerService service = externalService as SingleServerService;
if (service == null)
{
return;
}
TestExternalServices testServers = new TestExternalServices();
if (testServers != null)
{
service.AddServer(testServers);
}
}
catch (Exception )
{
//TaskDialog.Show("Info", "Error" + ex.Message);
throw;
}
}
}
////
public class TestExternalServices : IExternalServer
{
public string GetDescription()
{
return "Prueba para el servidor";
}
public string GetName()
{
return "Test";
}
public Guid GetServerId()
{
return new Guid("1384B8EE-9A47-434A-8564-7D828A60ACF8");
}
public ExternalServiceId GetServiceId()
{
return ExternalServices.BuiltInExternalServices.ExternalUIService;
}
public string GetVendorId()
{
return GetType().Name;
}
}
Developer Advocacy and Support +