2

WindowsServer2012とSQLServer2012がインストールされたAzure上に仮想マシンを作成しました。また、VMでインバウンドポート80と1433を開いています。

データベースとレポート(rdl)を作成し、サーバーにデプロイしました。

単純なWinFormsアプリケーションを作成すると、VMのReportServerでホストされているレポートをレンダリングできます。

現在、通信してリモートサーバーからxmlを取得するためのWP7アプリケーションを作成しています。今回はエラーが発生します:

リモートサーバーがエラーを返しました:NotFound

InnerException:System.Net.HttpStatusCode.Unauthorized

問題がどこにあるのかわかりません。サーバー側から何かする必要がありますか?

クライアント側

以下は私の設定とコードです:

1)この投稿に記載されているように、レポートサーバーにサービス参照を追加しました。以下はServiceReferences.ClientConfigファイルです。

<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="ReportExecutionServiceSoap" maxBufferSize="2147483647"
                    maxReceivedMessageSize="2147483647">
                    <security mode="None" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://virtualmachine.cloudapp.net:80/ReportServer/ReportExecution2005.asmx"
                binding="basicHttpBinding" bindingConfiguration="ReportExecutionServiceSoap"
                contract="ServiceReference1.ReportExecutionServiceSoap" name="ReportExecutionServiceSoap" />
        </client>
    </system.serviceModel> </configuration>

2)以下は私のコードです:

void MainPage_Loaded(object sender, RoutedEventArgs e)
{
    ReportExecutionServiceSoapClient client = new ReportExecutionServiceSoapClient();
    client.LogonUserCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_LogonUserCompleted);
    client.LogonUserAsync("username", "password", "virtualmachine.cloudapp.net");
}

ここで、ユーザー名は「administrator」で、仮想マシンへのログインに使用します。それは問題になりますか?

サーバ側

以下は私のReportserver\web.configです

<authentication mode="Windows" />
<identity impersonate="true" />

そして以下は私のReportserver\rsreportserver.configです

<Authentication>
    <AuthenticationTypes>
            <RSWindowsNTLM/>
    </AuthenticationTypes>
<RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>
<RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
<EnableAuthPersistence>true</EnableAuthPersistence>

4

1 に答える 1

0

windows.azure.com アカウントにログインして VM を選択し、上部にある [エンドポイント] リンクを選択してください。

次のようなエンドポイントを必ず追加してください。

名前: ReportsEndpoint

プロトコル: TCP

パブリック ポート: 80

プライベート ポート: 80

于 2013-02-03T13:18:06.797 に答える