1

データベースのユーザー名とパスワードを確認するログイン ページを持つ Silverlight アプリケーション WCF RIA サービスを作成しました。 ... Web.config ですべての設定を行いました ... clientaccesspolicy.xml と crossdomain.xml をプロジェクトに追加しました ... MIME タイプを IIS7 に追加しましたが、結果はありませんでした ... IE9 の開発ツールでエラーが発生し、次のように表示されます。

SCRIPT5022: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid.  Check InnerException for exception details.   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at MaG.ServiceReference1.LoginCompletedEventArgs.get_Result()
   at MaG.MainPage.connection_LoginCompleted(Object sender, LoginCompletedEventArgs e)
   at MaG.ServiceReference1.Service1Client.OnLoginCompleted(Object state) 
MaGTestPage.html, line 1 character 1

次のように、ログイン メソッド クライアントを Web サービスにアピールします。

try
   {
      ServiceReference1.Service1Client connection = new ServiceReference1.Service1Client();              
      connection.LoginCompleted += new EventHandler<ServiceReference1.LoginCompletedEventArgs>(connection_LoginCompleted);
      connection.LoginAsync(textBox1.Text, passwordBox1.Password);
   }
      catch (Exception ex)
   {
      Console.Write(ex.InnerException);
   }
4

1 に答える 1