我爲web farm編寫應用程序,我想在服務器應用程序之間創建一個簡單的對等網絡,以便它們可以將消息傳遞給對方。例如,在放棄緩存項目時進行協調,或者增加共享計數器以獲得關鍵統計信息的更好共享視圖。不能在ASP.NET中使用WCF NetPeerTcpBinding?
但顯然這是不可能的。我曾在一個控制檯應用程序工作完全對等網絡的代碼,但是當我添加的代碼到ASP.NET網站,我得到了以下錯誤:
System event notifications are not supported under the current context. Server processes, for example, may not support global system event notifications.
[InvalidOperationException: System event notifications are not supported under the current context. Server processes, for example, may not support global system event notifications.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10259418
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +539
// My code here where I call the proxy object's method to start the WCF call
嗯,爲什麼不呢?這似乎是非常有用的!
有什麼辦法可以解決這個問題嗎?
同樣的問題,看起來可能是對WAS主機的限制 – user80855 2010-06-25 01:17:27