1

Using VS 2010, I've created a WCF Syndication Service Library, that debugs fine--browser shows the feed I created and everything.

The problem is: I published this service library to IIS 7 on Server 08R2 to an application directory. The publish created a bin directory with the servicelibrary.dll, an .svc file, and a web.config. I can access the service via browser, but I do not get the feed. I just get the "You have created a service. To test this service... etc"

If anyone has any experience with this, I'd really appreciate a heads up. I haven't found much documentation about deploying this for use outside of an application. I was hoping I could just provide URL links to this feed for people to subscribe to without having to have an xml file sitting somewhere.

Am I missing something, or am I expecting too much?

4

2 に答える 2

1

WCF シンジケーション サービス プロジェクト (RSS フィード サーバー) では、コマンドライン テスト クライアントに関するこの説明ページも取得しました。実際には何か他のものが表示されているのに、あなたのサービスとの接続があるように見えるので、混乱しています:P

原因は初歩的なエラーであることが判明しました: .svc 内の ServiceContract を適切に処理していません。

wwwroot\virtualdir で公開し、仮想ディレクトリを IIS のサービス (デフォルト ドキュメント) に接続した後、参照したときに..

http://MyMachine/virtualdir/MyService.svc

RSSフィードの概要を期待..説明ページを入手しました。しかし

http://MyMachine/virtualdir/MyService.svc/MyBlog

うまくいきました。

説明: MyBlog は、IMyBlog という名前の ServiceContract を実装するクラスの名前です。サービス ライブラリ MyService.svcには複数の ServiceContract を含めることができるため、URL には名前が必要です。

于 2016-07-15T01:32:53.523 に答える
0

当時は完全には明らかではありませんでしたが、これに対する答えは、「サービス」属性がシンジケーション サービス ライブラリで宣言された名前空間を指すプロジェクトに .svc ファイルを追加することでした。

誰かが同様の問題に遭遇し、さらに説明が必要な場合は、喜んで詳細に説明します.

于 2011-03-31T17:16:08.990 に答える