T
Tobias Krautkremer
Hi,
I installed the html viewer on my computer. The Html Viewer Service and Load
Balancing service are both launched. When I tried to call the service as
below, the last line always return: chi.ce =CE_OTHER and couldn't get the
html result. It was working well when I run in the batch mode, so I think
the problem is on the service or the input parameters. Is there anybody
have some ideas about this.
This are my sample input parameters for the function below:
response = this.Response;
strLoadBalancerUri = "http://localhost:8093/HtmlTrLoadBalancer";
strDocument = "test.doc";
rgbData = fileToConvertContents;
Thanks in advance
Tobias
// taken from sps sdk
void DisplayHtml(System.Web.HttpResponse response, string
strLoadBalancerUri, string strDocument, byte[] rgbData)
{
//generate a task name based off of the document name
string strTask = strDocument;
//create the load balancer object
IHtmlTrLoadBalancer htmlTrLoadBalancer = (IHtmlTrLoadBalancer)
System.Activator.GetObject( typeof(IHtmlTrLoadBalancer),
strLoadBalancerUri);
//get the uri for the launcher object
string strLauncherUri = htmlTrLoadBalancer.StrGetLauncher(strTask);
//create the launcher object at the uri specified by the load balancer
IHtmlTrLauncher htmlTrLauncher = (IHtmlTrLauncher)
System.Activator.GetObject(typeof(IHtmlTrLauncher),
strLauncherUri);
//call the launcher to create the html
CreateHtmlInfo chi = htmlTrLauncher.CHICreateHtml(strLauncherUri,
rgbData, BrowserType.BT_IE4, strDocument, strTask, 90 /*timeout*/,
true);
//ensure that the load balancer knows that the task has completed
htmlTrLoadBalancer.LauncherTaskCompleted(strLauncherUri, strTask);
//check for errors and output the results
if(chi.ce == CreationErrorType.CE_NONE && chi.fHasMainFile)
response.BinaryWrite(chi.rgbMainFile);
}
I installed the html viewer on my computer. The Html Viewer Service and Load
Balancing service are both launched. When I tried to call the service as
below, the last line always return: chi.ce =CE_OTHER and couldn't get the
html result. It was working well when I run in the batch mode, so I think
the problem is on the service or the input parameters. Is there anybody
have some ideas about this.
This are my sample input parameters for the function below:
response = this.Response;
strLoadBalancerUri = "http://localhost:8093/HtmlTrLoadBalancer";
strDocument = "test.doc";
rgbData = fileToConvertContents;
Thanks in advance
Tobias
// taken from sps sdk
void DisplayHtml(System.Web.HttpResponse response, string
strLoadBalancerUri, string strDocument, byte[] rgbData)
{
//generate a task name based off of the document name
string strTask = strDocument;
//create the load balancer object
IHtmlTrLoadBalancer htmlTrLoadBalancer = (IHtmlTrLoadBalancer)
System.Activator.GetObject( typeof(IHtmlTrLoadBalancer),
strLoadBalancerUri);
//get the uri for the launcher object
string strLauncherUri = htmlTrLoadBalancer.StrGetLauncher(strTask);
//create the launcher object at the uri specified by the load balancer
IHtmlTrLauncher htmlTrLauncher = (IHtmlTrLauncher)
System.Activator.GetObject(typeof(IHtmlTrLauncher),
strLauncherUri);
//call the launcher to create the html
CreateHtmlInfo chi = htmlTrLauncher.CHICreateHtml(strLauncherUri,
rgbData, BrowserType.BT_IE4, strDocument, strTask, 90 /*timeout*/,
true);
//ensure that the load balancer knows that the task has completed
htmlTrLoadBalancer.LauncherTaskCompleted(strLauncherUri, strTask);
//check for errors and output the results
if(chi.ce == CreationErrorType.CE_NONE && chi.fHasMainFile)
response.BinaryWrite(chi.rgbMainFile);
}