English 中文(简体)
WCF & Rest & ISA & Output
原标题:WCF & Rest & ISA & Output

我谈两个问题,但我认为在某些方面存在着联系。

我做了发言。 休息服务,有NET4,只见https。 在我的地方,一切都是ok。

Now I deployed it to a hosting provider. For what I know all the requests go through an ISA server.

起初,它没有工作。 我做了很多尝试,但我总是看不到第404号错误,没有找到资源。 具体错误是:

[EndpointNotFoundException]: There was no channel actively listening at
'http://mydomainname/items/help'.
This is often caused by an incorrect address URI.
Ensure that the address to which the message is sent matches
an address on which a service is listening.

First thing I saw is that the URL in the exception is not https. OK, strange, because my web.config is :

  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpsGetEnabled="true" />
      <serviceAuthorization serviceAuthorizationManagerType="myNamespace.APIKeyAuthorization, myNamespace" />
    </behavior>
  </serviceBehaviors>
...
  <webHttpBinding>
    <binding name="">
      <security mode="Transport">
        <transport clientCredentialType="Basic" />
      </security>
    </binding>
  </webHttpBinding>
...
  <webHttpEndpoint>
    <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" defaultOutgoingResponseFormat="Json">
      <security mode="Transport">
        <transport clientCredentialType="Basic" />
      </security>
    </standardEndpoint>
  </webHttpEndpoint>

So I tried a lot of things but at the end I made it works. I just put a name everywhere. In the behavior tag, the binding and standardendpoint tag. IT WORKS !! OK, almost. Now all my results are in XML format. I got no json. Even with fiddler with the line "Accept: application/json" or "Accept: text/json" it always in XML. Even if I put the automaticFormatSelectionEnabled to false. And adding the "Help" to the URL, like "https://mydomainname/items/help" I got a "Endpoint not found"

So, now I m lost, as I don t understand all the tiny configuration in WCF to make everything work. Hope you can help me.

提前感谢。

M.

最佳回答

OK, I don t know if it can be considered as the good answer but admin made something on ISA server. So now it s fully working.

M.

问题回答

暂无回答




相关问题
Allow RESTful DELETE method in asp.net mvc?

im currently setting up asp.net to accept DELETE http verb in the application. However, when i send "DELETE /posts/delete/1" i always get a 405 Method not allow error. I tried to take a look at ...

Most appropriate API for URL shortening service

I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...

Use HTTPClient or HttpUrlConnection? [closed]

We re implementing a REST client on JRE 1.4. Seems two good options for a client REST framework are HttpClient and HttpUrlConnection. Is there a reason to use HttpClient over the JRE s ...

Why can t I find the truststore for an SSL handshake?

I m using the Spring RESTTemplate on the client side to make calls to a REST endpoint. The client in this case is a Spring app and Tomcat is the servlet container. I m running into issues making a ...

Which Http redirects status code to use?

friendfeed.com uses 302. bit.ly uses 301. I had decided to use 303. Do they behave differently in terms of support by browsers ?

Three Step Buyonline The RESTful way

We are re-developing our buyonline functionality and we are doing it the RESTful way. The process is a three step one and the customer is asked to enter data at each step. Let s say the three URL s ...

热门标签