顯示具有 WCF 標籤的文章。 顯示所有文章
顯示具有 WCF 標籤的文章。 顯示所有文章

2019年11月21日 星期四

2019年5月25日 星期六

指令編譯WCF程式

https://www.cnblogs.com/tianzhiliang/archive/2011/08/09/2132532.html

C:\temp>csc /nologo /r:"c:\WINDOWS\Microsoft.Net\Framework\v3.0\Windows Communication
Foundation\System.ServiceModel.dll" HelloWCFApp.cs

OperationContract(IsOneWay=true)的用途

https://blog.darkthread.net/blog/wcf-survey-6/

IsOneWay是用來定義單向合約沒錯,但重點在「呼叫端呼叫WCF作業,但不期待收到任何回應」,其真正意義更傾向「Fire and Forget」(射後不理)。因此,指定OperationContract(IsOneWay=true)的方法傳回值應為void,最重要的差別在於呼叫該方法後,不會等待作業完成就繼續往下執行。

WCF六种消息交换模式

https://docs.microsoft.com/zh-cn/dotnet/framework/wcf/extending/choosing-a-message-exchange-pattern

这使您总共有六种 MEP (Message Exchange Pattern)可以选择:
  • 数据报 Datagram
  • 请求-响应 Request-response
  • 双工 Duplex
  • 带会话的数据报 Datagram with sessions
  • 带会话的请求-响应 Request-response with sessions
  • 带会话的双工  Duplex with sessions
Web Services Message Exchange Patterns
https://www.w3.org/2002/ws/cg/2/07/meps.html

WS-Addressing

https://www.w3.org/TR/ws-addr-core/

SOAP 1.2 MTOM

https://www.w3.org/TR/soap12-mtom/

2018年9月8日 星期六

System.ServiceModel.AddressAccessDeniedException

解決方式:命令提示字元輸入netsh http add urlacl url=http://+:1700/cal/ user="\Everyone"
1700改成自己遇到錯誤訊息的port

System.ServiceModel.AddressAccessDeniedException
  HResult=0x80131501
  Message=HTTP 無法登錄 URL http://+:1700/cal/。您的處理程序沒有足夠的存取權可存取此命名空間 (如需詳細資訊,請參閱 http://go.microsoft.com/fwlink/?LinkId=70353)。
  Source=System.ServiceModel
  StackTrace:
   於 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   於 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   於 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   於 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
   於 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)