2011-09-12 20 views
2

こんにちは私はWIXインストーラからWebサービスを呼び出すことができる必要があります。私はいくつかの問題があります。WIXからWebサービスを呼び出す

私はサービスと通信するカスタムアクションを追加する必要が実現:

[CustomAction] 
    public static ActionResult Activate(Session session) 
    { 
     ActionResult result = ActionResult.Success; 
     try 
     { 
      session.Log("Begin Activate"); 

      Debugger.Launch(); 

      //session["ACTIVATIONSERVICEURL"] = "http://localhost/ActivationService/V1/ActivationService.svc"; 
      //session["ACTIVATIONUSERNAME"] = "james"; 
      //session["ACTIVATIONPASSWORD"] = "Password123"; 

      //string endpoint = session["ACTIVATIONSERVICEURL"]; 
      //string username = session["ACTIVATIONUSERNAME"]; 
      //string password = session["ACTIVATIONPASSWORD"]; 

      //using (ActivationServiceClient client = new ActivationServiceClient("ASC", endpoint)) 
      //{ 
      // client.ClientCredentials.UserName.UserName = username; 
      // client.ClientCredentials.UserName.Password = password; 

      // Guid userToken = client.Activate(); 
      // session["USERTOKEN"] = userToken.ToString(); 
      //} 

      session.Log("Finishing Activate"); 
     } 
     catch (Exception ex) 
     { 
      session.Log("Exception caught: {0}", ex); 
      result = ActionResult.Failure; 
     } 

     return result; 
    } 

私はこのアクションを呼び出すことができたが、私は、ダイアログの問題を抱えている「DLLが要求されますこのインストールを完了するために "。 InstallFinalizeの下でサービスを呼び出すように見えます。

<!-- Custom action for calling remote web service--> 
    <CustomAction Id="CallActivationService" 
      BinaryKey="ActivationServiceCustomAction" 
      DllEntry="Activate" 
      Return="check" /> 

    <Binary Id="ActivationServiceCustomAction" 
     SourceFile="$(var.SolutionDir)\Application\ExternalAssemblies\MyCompany.Application.ActivationService.CA.dll" /> 

<Custom Action="CallActivationService" Before="InstallFinalize">Not Installed OR Installed</Custom> 

ログがちょうど値3を返し:

MSI (s) (54:D0) [12:26:29:726]: Doing action: CallActivationService 
Action 12:26:29: CallActivationService. 
Action start 12:26:29: CallActivationService. 
MSI (s) (54:D0) [12:26:29:726]: Creating MSIHANDLE (32) of type 790542 for thread 1232 
MSI (s) (54:4C) [12:26:29:726]: Invoking remote custom action. DLL:  C:\WINDOWS\Installer\MSI1BE8.tmp, Entrypoint: Activate 
MSI (s) (54:4C) [12:26:29:773]: Closing MSIHANDLE (32) of type 790542 for thread 1232 
MSI (s) (54:D0) [12:26:29:773]: Note: 1: 1723 2: CallActivationService 3: Activate 4:  C:\WINDOWS\Installer\MSI1BE8.tmp 
Error 1723. There is a problem with this Windows Installer package. A DLL required for  this install to complete could not be run. Contact your support personnel or package vendor.  Action CallActivationService, entry: Activate, library: C:\WINDOWS\Installer\MSI1BE8.tmp 
MSI (s) (54:D0) [12:26:56:679]: Product: My AppClient Application -- Error 1723. There  is a problem with this Windows Installer package. A DLL required for this install to  complete could not be run. Contact your support personnel or package vendor. Action  CallActivationService, entry: Activate, library: C:\WINDOWS\Installer\MSI1BE8.tmp 
Action ended 12:26:56: CallActivationService. Return value 3. 
Action ended 12:26:56: INSTALL. Return value 3. 

乾杯を

J

答えて

0

はそれを考え出しました。問題は、サービスが投げていたバインディングのprotocal例外を隠しているプロキシの周りのブロックを使用すること(他の設定の問題の後)と関係していました。

関連する問題