WCF Self Host Service - Endpoints in C#

前端 未结 3 2014
没有蜡笔的小新
没有蜡笔的小新 2020-12-18 01:46

My first few attempts at creating a self hosted service. Trying to make something up which will accept a query string and return some text but have have a few issues:

<
3条回答
  •  臣服心动
    2020-12-18 02:18

    If IIS hosts your web service, then you get the friendly "you have created a web service" page, assuming nothing else is wrong. You might want to try some quick WCF tutorials, as can be found in Bustamente's Learning WCF book, they go fast and explain a lot.

    EDIT: Here's an MSDN page which shows one way to get query string parameters off of your requested service call, nice example. It shows the use of [WebGet] attribute. If you didn't want to use that, you could try using OperationContext to get at the incoming request's internals.

提交回复
热议问题