本帖最后由 lxj 于 2018-4-25 14:25 编辑
系统环境用的:vs2015+leadtools-v19+webService例子引用的是leadtools32位dll类库,
之前例子在leadtools v20的环境下,本地跑过,可以使用,使用VS编译发布到iis上,失败。报错:
附上 例子的代码。源代码文件,27mb只能用百度云盘,附上 下载地址。调用dicom影像的组件,百度云盘下载地址
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Services;
- using Leadtools.Medical.WebViewer.ExternalControl;
- using Leadtools;
- using Leadtools.Codecs;
- namespace LeadTools
- {
- /// <summary>
- /// LeadTools 的摘要说明
- /// </summary>
- [WebService(Namespace = "http://tempuri.org/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [System.ComponentModel.ToolboxItem(false)]
- // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
- // [System.Web.Script.Services.ScriptService]
- public class LeadTools : System.Web.Services.WebService
- {
- [WebMethod]
- public string HelloWorld()
- {
- return "Hello World";
- }
- [WebMethod]
- public void GetImage(string patientId)
- {
- string applicationName;
- string version;
- int externalControlPort = 500;
- // Username a password to log in
- // This will be the username and password that you created when running the CSPacsDatabaseConfig.exe demo
- string username = "a";
- string password = "a";
- MedicalWebViewerExternalController controller = new MedicalWebViewerExternalController("http://localhost/MedicalViewer19");
- //MedicalWebViewerExternalController controller = new MedicalWebViewerExternalController("http://47.98.247.113/MedicalViewer20");
- controller.ServiceURL = "http://localhost/MedicalViewerService19";
- //controller.ServiceURL = "http://47.98.247.113/MedicalViewerServiceWcf20/";
- controller.Timeout = 30;
- controller.InitApplication(out applicationName, out version, externalControlPort);
- controller.SelectedBrowser = MedicalWebViewerBrowser.GoogleChrome;
- ControllerReturnCode loginRes = controller.UserLogin(username, password);
- controller.ShowPatient(patientId);
- /*
- FindPatientOptions optins = new FindPatientOptions();
- List<PatientInfo> patients = new List<PatientInfo>();
- List<StudyInfo> studyList = new List<StudyInfo>();
- ControllerReturnCode findRes = controller.FindPatient(null, optins, patients);
-
- foreach (PatientInfo element in patients)
- {
-
- //studies += "StudyInstanceUid = " + element.StudyInstanceUid + ";</br>";
- }
- Console.WriteLine(patients);
- controller.FindStudies(null, studyList);
- string studies = "";
- foreach (StudyInfo element in studyList)
- {
- studies += "StudyInstanceUid = " + element.StudyInstanceUid;
- }
- return studies;
- */
- // controller.CloseApplication();
- // Shutdown the command queue
- // controller.Shutdown();
- }
- }
- }
复制代码
|