それを公開するために、私はリンクhttp://naztek.wordpress.com/2009/08/27/host-a-wcf-library-in-iis/をたどりました
しかし、実行時にこのエラーが発生しました
'/WCFService1'アプリケーションのサーバーエラー。
ServiceHostディレクティブでService属性値として提供されているか、構成要素system.serviceModel / serviceHostingEnvironment/serviceActivationsで提供されているタイプ「Service」が見つかりませんでした。
説明:現在のWebリクエストの実行中に未処理の例外が発生しました。エラーとエラーがコードのどこで発生したかについての詳細は、スタックトレースを確認してください。
例外の詳細:System.InvalidOperationException:タイプ'Service'、ServiceHostディレクティブでService属性値として提供されているか、構成要素system.serviceModel / serviceHostingEnvironment/serviceActivationsで提供されているものが見つかりませんでした。
私web.config
は:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
<services>
<service name="test1.Try">
<endpoint address="http://localhost:8732/Try" binding="webHttpBinding" contract="test1.Try"/>
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
ソースエラー:
現在のWebリクエストの実行中に、未処理の例外が生成されました。例外の発生源と場所に関する情報は、以下の例外スタックトレースを使用して識別できます。
[InvalidOperationException:タイプ'Service'、ServiceHostディレクティブでService属性値として提供されているか、構成要素system.serviceModel / serviceHostingEnvironment/serviceActivationsで提供されています。]