• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 55  文章 - 15  trackbacks - 0
            <2013年1月>
            303112345
            6789101112
            13141516171819
            20212223242526
            272829303112
            3456789

            常用鏈接

            留言簿

            隨筆分類

            隨筆檔案

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

               WCF相關(guān)知識(shí)我也不是很懂,只不過有任務(wù)要研究一下。主要目地還是Metro做UI,同Desktop App進(jìn)行交互,想法是Metro做客戶端,Desktop做服務(wù)端。現(xiàn)在的情況是,client端的代碼可以移植到Metro下,但是server端不可以。所以我的理解是,只能單向通信了。那么,MSDN論壇上也在問,如果有一個(gè)用戶想做主機(jī),其他用戶連進(jìn)來,不能用WCF怎么辦?
            微軟的答復(fù)是:用Socket,或者用云,大家都鏈接到云,跟用戶的設(shè)備無關(guān)。這不是紅果果地推銷Azure么。
               下面是我的研究,也是從網(wǎng)上匯總的資料,英文的,應(yīng)該不是很難。圖片不知道怎么上傳,唉,姑且先這么看著吧。
             

            How to communicate Windows 8 UI app (Metro Style app) and Desktop App, or how to translate data between these two style apps?

            Because Windows 8 UI ap runs in the sandbox, and for security, the App cannot send and access the desktop process, access the registry. But we have 5 methods as following to do it indirectly:

            1. transfer the data via file.(dual way)

             

            2. transfer the data via clipboard.(dual way)

             

            3. via WCF. (one way, Windows 8 UI app as client, Desktop App as server)

             

            4. via Network Socket

             

            5. via remote or cloud server, if you have one remote or cloud server, then your Windows 8 UI app and desktop app both can connect it and share the data.

             

            WCF:

            Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. An endpoint can be a client of a service that requests data from a service endpoint.

            WCF server features are available in .NET 4.5 but the Metro (core) profile is a client profile only. You cannot host a WCF service in Windows 8 metro app, because they run in a sandboxed environment.

            WCF in Metro apps – supported functionality

            Bindings -

            BasicHttpBinding

            NetTcpBinding

            NetHttpBinding

            CustomBinding

            Binding elements -

            BinaryMessageEncodingBindingElement

            TextMessageEncodingBindingElement

            ConnectionOrientedTransportBindingElement

            SslStreamSecurityBindingElement

            WindowsStreamSecurityBindingElement

            TcpTransportBindingElement

            Http(s)TransportBindingElement

            TransportSecurityBindingElement

            Encoding -

            Text, Binary

            Security modes -

            None, Transport, TransportWithMessageCredential, TransportCredentialOnly (for BasicHttpBinding)

            ClientCredentialType -

            None, Basic, Digest, Negotiate, Ntlm, Windows

            Transfer Mode -

            Buffered, Streamed, StreamedRequest, and StreamedResponse

            Serializers -

            DataContractSerializer, DataContractJsonSerializer, XmlSerializer

            Miscellaneous -

            ChannelFactory

            DuplexChannelFactory

            CallbackBehavior

             

            Not support:

            There aren't any plans yet to support any of the WS-* features including wsHttpBinding

            WCF's NetNamedPipeBinding and NetTcpBinding (over localhost) wouldn't be available anyway due to the restrictions in metro

            Defferences:

            Configuration is not supported for Metro styled apps so WCF generates the binding and other configuration in code. All binding properties need to be set on the binding in the code itself.

            The XmlDictionaryReaderQuotas are not exposed in the preview version in Win8P - they are going to be in the latest version – therefore there is no way to configure that one remaining property (maxDepth) in Win8 preview right now.

            For you - while developing metro apps - you just need to be aware that:

            1) You need to make all configuration in code.

            2) You need to make all service calls async using the task based pattern.

             

            Here are some references can help when you are using WCF in metro:

            1. WCF in Windows 8 Metro styled apps? Absolutely supported

            http://blogs.msdn.com/b/piyushjo/archive/2011/09/22/wcf-in-win8-metro-styled-apps-absolutely-supported.aspx

            2. Calling a WCF service from a Metro application

            http://blogs.msdn.com/b/piyushjo/archive/2011/10/10/calling-a-wcf-service-from-a-metro-application.aspx

            3.WCF in Metro apps – supported functionality

            http://blogs.msdn.com/b/piyushjo/archive/2011/10/19/wcf-for-metro-apps-supported-functionality.aspx

            4.More information is here:

            http://blogs.msdn.com/b/piyushjo/

            5. Information in MSDN Library:

            http://msdn.microsoft.com/en-us/library/hh556233.aspx

            posted on 2012-09-04 13:10 Dino-Tech 閱讀(464) 評(píng)論(0)  編輯 收藏 引用

            只有注冊用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            久久这里只有精品视频99| 欧洲人妻丰满av无码久久不卡 | 麻豆国内精品久久久久久| 一级女性全黄久久生活片免费| 久久久一本精品99久久精品88| 国产精品久久久久…| 久久午夜福利电影| 97r久久精品国产99国产精| 婷婷久久综合九色综合九七| 精品久久人妻av中文字幕| 久久天天躁狠狠躁夜夜不卡| 麻豆亚洲AV永久无码精品久久| 久久毛片免费看一区二区三区| 日产精品久久久久久久| 久久久这里有精品| 久久精品国产欧美日韩| 热99re久久国超精品首页| 久久99精品久久只有精品| 久久大香萑太香蕉av| 久久伊人精品青青草原日本| 国产69精品久久久久99尤物| 狠狠干狠狠久久| 国产精品久久久久久久久鸭| 午夜久久久久久禁播电影| 久久精品国产99久久久古代| 污污内射久久一区二区欧美日韩| 观看 国产综合久久久久鬼色 欧美 亚洲 一区二区 | 亚洲精品乱码久久久久久蜜桃不卡| 久久人人超碰精品CAOPOREN| 久久99精品久久久久久9蜜桃| 久久精品一区二区| 99久久亚洲综合精品成人| 亚洲综合婷婷久久| 精品久久久久中文字| 国产精品欧美亚洲韩国日本久久| 久久综合欧美成人| 久久久99精品成人片中文字幕 | 亚洲成色WWW久久网站| 亚洲中文久久精品无码ww16| 久久综合给久久狠狠97色 | 国产精久久一区二区三区|