Web 服務增強功能 (WSE) 3.0 的新功能

资讯 2024-07-10 阅读:60 评论:0
發行項 06/30/2006   Mark Fussell M...
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

 

Mark Fussell
Microsoft Corporation 首席計畫經理
https://weblogs.asp.net/mfussell

Mark Fussell
Microsoft Corporation Chief Planning Manager

2005 年 6 月

June 2005

適用於:
   適用于 .NET 的 Web 服務增強功能 3.0

Appropriate for:
& nbsp; & nbsp; & nbsp; web service enhancement function 3.0 for.NET

總結: .NET (WSE) 的 Web 服務增強功能是一項產品,可讓您快速且輕鬆地建置安全的 Web 服務。 本文說明最新 WSE 3.0 版本背後的驅動目標,著重于主要功能重點,以及如何使用這些目標來根據 Web 服務規格開發分散式應用程式。 (28 個列印頁面)

Summary: . NET (WSE) web service enhancement is a product that allows you to quickly and easily build a secure web service. This describes the driving objectives behind the latest WEE version 3.0, which focus on the main function, and how to use them to develop decentralized applications based on web service rules. (28 print pages)

目錄

WSE 3.0 的設計目標
輕鬆建置安全的 Web 服務
重新建立會話
Web 服務器陣列中的會話
簡化Service-Oriented系統的開發
未來的校訂和互通性
結論
資源

WSE 3.0 design target
for easy and secure web services >br> to recreate the session from the
web server array >br> to simplify the development of the Service-Oriented system >br' for future calibration and interconnectivity >br' to conclude >br'

Web 服務在 5 年內已滿,至少從.NET Framework的觀點來看。 在分散式運算的世界中,互通性和跨平臺整合的驅動目標是確保 Web 服務規格,否則稱為 WS-* 通訊協定,持續演進,因為需要安全、可靠且交易的通訊。 如需 Web 服務架構的完整概觀,請參閱 Web 服務架構及其規格簡介

In a decentralized world, the goal of interoperability and cross-platform integration is to ensure that web service codes, or WS-* communications protocols, continue to evolve because of the need for secure, reliable and tradable communications. For a complete overview of the web service architecture, see Web service structures and their framework brief.

Web 服務增強功能或 WSE,通常發音為 「Wizzy」,是開發人員工具,可將您在將安全性納入連線的系統應用程式中時,從許多規格詳細資料中抽象化。 WSE 主要著重于將訊息層級安全性帶入分散式應用程式開發。 在本文中說明 為何 WSE? 可啟用的案例。 基本上,它是關於更彈性地開發應用程式架構。 如果您查看 WS-* 規格,您會看到從傳輸通訊協定層級提升功能 (安全性的趨勢。 可靠性、會話管理) 訊息通訊協定層級 (WS-Security、WS-ReliableMessaging、WS-SecureConversation) ,以及與資料交換 (XML、XML 架構、SOAP、WSDL) 和現有傳輸通訊協定 (HTTP 的已同意規格結合時, TCP、UDP) 這可啟用可調整且可延伸的應用程式,這些應用程式也會提供互通性和整合的目標。

Web Service Enhancements or WSEs, usually pronunciationed as "Wizzy" are tools that can be abstracted from many details when you have a system application that connects security to the connection. WSE focuses mainly on cases where the security of the information layer is brought into a decentralized application development. . This is basically an extension of the software that can also be used to connect the WS-* system, which can be used as an interface between the SW and the SW.

Aaron Skonnard 在 WSE 2.0 的新功能一文中提供 WSE 2.0 的良好概觀,而且本文的大部分仍與 WSE 3.0 完全相關。 不過,您將在此簡介文章中看到 WSE 在 3.0 版中已成熟且過期,以在建置安全、服務導向的應用程式時,帶來更大的可用性、改善的互通性和簡化。

Aaron Skonnard provides a good overview of WSE 2.0 in a new feature of WESE 2.0, and most of this text is still fully related to WSE 3.0. However, you will see in this brief article that WSE is mature and outdated in version 3.0 in order to bring greater availability, improved interoperability and simplicity to the development of safety, service-guiding applications.

WSE 3.0 基本上是 Web 服務的安全性產品。 當 WSE (1.0 和 2.0) 專案第一次構想時,其主要目的是要顯示新興 WS-* 安全性規格的實用且實用的實作,例如 WS-Security、WS-Trust 和 WS-SecureConversation,因此會提供標準化程式的意見反應。 它不只受限於安全性,也有助於推動其他規格,例如WS-Addressing (如何從寄件者取得訊息到其最終目的地) ,以及WS-Attachments (如何傳送與郵件相關聯的附件) 。 WS 安全性規格現在已大幅強化,因此 WSE 3.0 版本的推動目標並不足以影響新興規格 (雖然它確實實作較新的規格版本) ,但更能辨識 Web 服務已滲透到許多開發領域,而需要在 Visual Studio 中增強現有 Web 服務支援。 解決和簡化開發人員遇到的真實世界問題是主要焦點。

When the WSE (1.0 and 2.0) project was first conceived, its main purpose was to show the practical and practical works of the new WS-* security code, such as WS-Security, WS-Trust, and WS-SecureConversation. The WS security code is now significantly enhanced, so that the WSE 3.0 version is driven by objectives that do not affect new rules, such as how the WS-Addressing (how to get information from the sender to its final destination) and the WS-Attachments (how to deliver links to e-mail).

WSE 3.0 具有下列設計目標:

WSE 3.0 has the following design objectives:

輕鬆建置安全 Web 服務:以及簡單且直覺的 API 設計,這裡的目標是在保護端對端訊息時抽象化常見的最佳做法。 從說出到數百個現有 WSE 客戶,有五個常見的訊息層級安全性案例。 這些稱為「周全」傳訊安全性案例,並提供高階安全性建置組塊,讓您更專注于 Web 服務的商務邏輯,瞭解其安全。

Lightly Build Security Web Services : And simple and intuitive API designs that aim at abstracting common best practices when protecting messages at the end. From the hundreds of current WSE clients, there are five common information layer security cases. These are known as " round-the-clock" communications security cases, and provide high-level security building blocks that allow you to focus more on the business logic of web services to understand their security.

使用 Web 服務通訊協定和 .NET Framework v2.0 簡化Service-Oriented系統的開發:繼續在目標 Web 服務規格上提供便於使用的程式設計 API 抽象概念,引進最新的基本規格,例如訊息傳輸優化機制 (MTOM) ,利用.NET Framework的改善2.0,並使用 Visual Studio 2005 提供整合式工具組。

uses Web-service communication protocols and.NET Framewerk v2.0 Simplified development of Service-Oriented systems : Continue to provide a user-friendly API abstract concept on the target web service code, introducing the latest basic rules, such as message transfer optimization (MTOM), using an improvement of 2.0.NET Framework, and providing an integration tool group using Visual Studio 2005.

未來證明和互通性: 長期分散式運算開發環境以 Indigo 為中心,而 WSE 3.0 可讓您以兩種方式開啟 Indigo 的路徑。 首先,WSE 3.0 保證透過 HTTP 與 Indigo 互通,而第二,WSE 3.0 引進了類似 Indigo 的設計概念,包括周全的安全性案例,以及在服務方向上建置分散式應用程式, (SO) 原則。 WSE 3.0 也會與其他廠商的 Web 服務堆疊進行測試,以確保跨平臺互通性。

Future Prospectiveness and Interconnectivity: Long-Term Dispersal Operation is based on Indigo, and WSE 3.0 allows you to open Indigo's path in two ways. First, WEE 3.0 guarantees interconnectivity through HTTP and Indigo, and second, WEE 3.0 introduces similar design concepts like Indigo, including thorough safety cases, and the creation of decentralized applications (SO) in service directions. WSE 3.0 will also test the web service stacks with other manufacturers to ensure interlocking.

根據這些指導的設計目標,WSE 產品小組會設定為 WSE 3.0 版本建置功能。

Based on these guiding design objectives, the WSE Product Group is set to create WSE version 3.0.

注意 本文中的範例取自安裝 WSE 3.0 之後位於 \Program Files\Microsoft WSE\v3.0\Samples 資料夾中的 WSE 3.0 快速入門。

Note that examples in this paper are taken from the installation of WSE 3.0 after the installation of WSE 3.0 on WSE 3.0 in the Samples folder.

本節涵蓋改善現有 WSE 2.0 安全性功能的功能,主要是解決可用性,並讓常見案例更容易。 除了互通性之外,開發 WSE 3.0 最強調的是簡化訊息層級安全性,進而改善可用性。 這會由訊息層級的周全安全性案例簡介所具體化。

This section contains features that improve the existing WSE 2.0 security function, primarily by addressing usability and making common cases easier. In addition to interoperability, the development of WSE 3.0 has the strongest emphasis on the security of the SMS layer and on improving its availability.

在有數百個企業層級客戶建置散發應用程式的情況下,看到 WSE 在通通的兩年內使用,模式從保護訊息的常見案例開始出現。 下列案例會命名並列于表 1 中,其中包含描述和一般部署使用方式。 不過,它們不只限於此處所述的使用方式,而且通常取決於其他部署考慮。 一般而言,您只需要在建置安全的 Web 服務時挑選其中一個周全的安全性案例,讓您更專注于服務的商務邏輯。

In the case of hundreds of corporate-level clients setting up distribution applications, WSEs are used within two years of communication, and the mode begins to appear in the usual case of protecting messages. The following cases are named in table 1, which contains descriptions and general deployment usage. However, they are not limited to the manner in which they are used here, and they are usually determined by other deployment considerations. In general, you need only select one of the full-fledged security cases in the construction of a secure Web service, allowing you to focus more on the business logic of the service.

表 1. 作為訊息安全性最佳做法的周全安全性案例

Table 1. Concise safety cases as best practices in information security

周全安全性案例 Description 一般使用方式
UsernameOverTransport 在此案例中,安全性保護會在傳輸層級 (執行,例如,SSL 憑證) ,而且用戶端是透過針對 Active Directory、ADAM 或 SQL Server 等存放區驗證的已提供使用者名稱和密碼來識別。 已知的服務人員。 從網際網路呼叫到網際網路或內部網路,其中應用程式的安全性基礎結構有限。 通常會在第一次使用 SSL。 使用防火牆內使用的另一個周全安全性案例,例如 Kerberos。
UsernameOverCertificate 在此案例中,安全性保護是透過伺服器的 X.509 憑證來識別,而用戶端是透過針對 Active Directory、ADAM 或 SQL Server 等存放區驗證的提供的使用者名稱和密碼來識別。 已知的服務人員。 從網際網路到網際網路或內部網路,其中應用程式是智慧型用戶端 (,例如Windows Forms應用程式) ,以及維護 PKI) 基礎結構 (公開金鑰基礎結構。 Windows Forms應用程式和必要的憑證,可透過按一下一次技術進行部署。
AnonymousOverCertificate 在此案例中,安全性保護是透過伺服器的 X.509 憑證,且用戶端無法識別或匿名;也就是說,任何具有伺服器公用憑證的用戶端都可以安全地與伺服器通訊。 服務未知的人員。 從網際網路到網際網路或內部網路,其中應用程式是智慧型用戶端 (,例如Windows Forms) ,以及維護 PKI) 基礎結構 (公開金鑰基礎結構。 由於具有伺服器公開憑證的任何人都可以連線到服務,因此僅限於非關鍵服務或伺服器公開金鑰僅提供給一組有限的公司或個人。
MutualCertificate 在此案例中,兩方會交換 X.509 憑證,用來保護它們之間的資料交換。 企業對企業。 跨網際網路或內部網路,在機器或應用程式伺服器之間。

可用於數位不大型的有限對等。

Can not delete folder: %s: No such folder

Kerberos (Windows) 在此案例中,應用程式位於一或多個 Windows 網域內,而 Kerberos 提供可設定的安全性基礎結構。 Kerberos 的其他優點是單一登入,且效能優於具有 X.509 憑證的 PKI。 Kerberos 票證用於驗證和訊息保護。 Kerberos 也支援委派,這可讓服務代表呼叫使用者執行。 在內部網路內,Microsoft Windows 電腦和 Kerberos 網域控制站 (KDC) 可用於安全性基礎結構。

看過這五個周全的安全性案例,讓我們深入探討其使用方式,讓您更充分瞭解其套用方式。

Looked at these five full-scale safety cases, let's look at their use in depth, and let's get you a better idea of how they're being used.

注意 將安全性套用至 Web 服務通常應該是部署考慮,而不是設計階段考慮。 換句話說,您應該能夠撰寫可在內部網路內使用特定宣告式原則檔案執行的應用程式,然後使用不同的宣告式原則檔案在網際網路上重新部署相同的應用程式,而且仍然可以運作。

In other words, you should be able to write applications that can be executed using specific declaratory principle files on the internal network, and then use different declaratory principle files to redeploy the same application on the Internet and still operate.

我們將探索兩個周全的安全性案例 UsernameOverCertificate 和 Kerberos,這些案例通常會結合成端對端傳訊案例。

We will explore two full safety cases, Username OverCertificate and Kerberos, which usually result in synthetic-end-to-end communications cases.

下圖 1 顯示部署在網際網路上的用戶端應用程式,其會與防火牆內部內部網路上部署的 ASP.NET 應用程式伺服器通訊。 用戶端應用程式已安裝伺服器的 X.509 憑證,以保護傳送至伺服器的訊息 (加密) 。 由於 X.509 憑證會以密碼編譯方式密集,因此使用優化技術會更有效率地使用優化技術來建立所謂的加密金鑰, (使用 X.509 的公開金鑰加密) ,並選擇性地從稱為衍生金鑰的加密金鑰衍生另一個金鑰。 衍生金鑰是用來簽署和加密訊息。 加密金鑰和衍生金鑰都包含在訊息中。 衍生金鑰是對稱金鑰,而且比 X.509 憑證使用的密碼編譯成本更低。 伺服器的訊息會使用此用戶端產生的衍生金鑰簽署和加密。 因此,伺服器可以將收到的訊息解密,而加密的金鑰和衍生金鑰會包含在訊息中,並受到伺服器的 X.509 憑證保護。 由於衍生金鑰小於訊息,因此只要解密此金鑰,然後使用這個金鑰來解密伺服器上的其餘訊息,包括擷取使用者名稱和密碼 (U/P) 。 U/P 可用來驗證使用者,並從 Active Directory、ADAM 或 SQL Server 等市集判斷其存取權限。 請注意,使用者名稱權杖會在訊息中加密,以提供密碼機密性。

The following figure 1 shows user applications that are deployed on the Internet, so that the user application ASP.NET, which is deployed on the internal network of the firewall, will more efficiently use the enabling technology to create the so-called encryption key (by using the public key of X.509), and chooses to derive another key from the encryption key known as the derivative key. The derivative key is used to sign and encrypt messages. The encryption key and the derivative key are contained in the message. The derivative key is used to create the so-called encryption key (by using the public key of X.509), which is used more efficiently to create the so-called encryption key on the internal network of the firewall.

圖 1. 結合 UsernameOverCertificate 和 Kerberos 周全安全性案例,以保護從用戶端到服務的訊息順序

Figure 1. Combining Username OverCertificate and Kerberos complete security cases to protect the message order from client to service

在圖 1 的案例中,從網際網路驗證使用者之後,內部網路中的另一個服務會從應用程式伺服器呼叫,在此情況下位於不同的電腦上。 針對此訊息部署的安全性是 Kerberos,這是從對應至網域帳戶的提供的 U/P 取得,或通常是應用程式伺服器的機器帳戶。 內部網路內的 Kerberos 容易使用是熱門的選擇。 當然,內部網路上可能會有非 Windows 機器,而 Kerberos 在廠商之間 ( (向標準安全性權杖漂移,例如 WSE 和 Indigo 兩者都已成功顯示與 Kerberos) 上的 IBM 互通性,但目前其他形式的安全性最適合使用,例如 MutualCertificate 案例。

In the case of figure 1, another service in the internal network will be called from an application server in a different computer in this case. The security for deployment of this message is Kerberos, which is obtained from U/P, which is available from the domain account, or usually from the application server. Kerberos in the internal network is a popular option. Of course, there may be non-Windows machines on the internal network, and Kerberos is in a business-to-business situation (diversion to standard safety sceptres, for example, WEE and Indigo have successfully shown IBM interconnectivity with Kerberos, but other forms of security are currently most suitable for use, such as the MutualCertificate case.

呼叫內部網路服務來執行一些商務處理之後,應用程式伺服器現在已準備好回應用戶端並產生結果。 由於使用 U/P 進行密碼編譯作業並不明智且不安全 (請參閱 使用 WSE 2.0 保護使用者名稱權杖 的原因) ,在 Indigo 中,甚至無法對密碼編譯作業使用 U/P,我們該如何保護訊息回到用戶端? 由於用戶端透過對稱、加密金鑰傳送至伺服器,因此用戶端已知的這個相同金鑰可用來保護訊息。 因此,加密金鑰不僅可在使用 X.509 憑證時改善安全性作業的效能,也會在不使用 U/P 或要求伺服器安裝用戶端 X.509 憑證的情況下,啟用對用戶端的安全回應。 當用戶端收到來自應用程式伺服器的回應時,其可以使用其儲存的加密金鑰來解密它,因此確保整個端對端訊息序列有效率地受到保護。

The application server is now ready to respond to the user 'data-linktype='relative-path' (for reasons that it is not wise and unsafe to use the U/P password compilation business) (see , in Indigo, it is not even possible to interpret the password to use U/P, how we can protect the message back to its client?

請記住,雖然我已描述在產生衍生金鑰以保護用戶端對應用程式伺服器呼叫時所發生之專案的詳細資料,但實作這全都是由特定周全安全性案例為您處理。 您不需要知道或關心發生密碼編譯優化的事實,您只需要知道哪一個周全的安全性案例是部署環境中最適合您。 這個相同的原則適用于 Indigo 安全性繫結項目,以便使用 WSE 3.0 所做的未來設計決策適用于 Indigo。

Remember, while I have described the details of the project that occurred at the time the derivative key was created to protect the client from the application server's call, all of this is handled for you in a specific safety case. You do not need to know or care about the fact that there has been an interpretation of the code, but you need only know which full safety case is best suited to deploy the environment. This same principle applies to the Indigo safety checkup, so that the future design made by WSE 3.0 can be applied to Indigo.

說明如何使用周全的安全性案例,現在讓我們看看其實作方式。 在 WSE 3.0 中,這是透過原則檔案。

Now let's see how we do it. In WSE 3.0, it's through the principle file.

在深入探討 WSE 3.0 中的新原則檔案之前,讓我們立即反映 WSE 2.0。 在 WSE 2.0 中,撰寫的程式碼與保護訊息交換和宣告式原則檔案之間沒有相互關聯。 您必須以心意將原則轉譯為 EncryptedDataMessageSignature 類別。 雖然這些類別在 WSE 3.0 中仍然適用且需要,但現在有一個更容易使用且更容易使用的程式設計模型來保護訊息,只要在程式碼中將原則套用至用戶端或服務即可。 在 WSE 3.0 中,透過使用 Policy 屬性或 WSE 產生的用戶端 Proxy 上的 SetPolicy 方法, (透過 Visual Studio 的 [新增 Web 參考]) ,可以在程式碼中使用原則來保護用戶端或服務。 實際上,原則的命令式和宣告式程式設計模型已對齊,以提供統一的程式設計抽象概念。

In WSE 2.0, there is no connection between the code and the protective message exchange and the declaration file. You must translate the code into EnglishData and MessageSignature. Although these are still suitable and needed in WSE 3.0, there is now a more user-friendly and user-friendly programming model to protect the message, as long as the original version of the software is available in the code, using either Polity Properties or WSE.

下列程式碼指出如何將名為 「ServerPolicy」 的原則設定為名為 WSSecurityUsernameService 的 .NET Web 服務 (請參閱位於 \Security 子資料夾) 的 WSSecurityUsername 範例。 此 Web 服務包含名為 StockQuoteRequest的單一 [WebMethod],我們將在本文的其餘部分使用。 這個 Web 方法會接受股票符號陣列,並傳回對應的引號。

The following code indicates how the principle called "ServerPolicy" should be set as a single example of WSSesecurityUsernameService. The


在查看 ServerPolicy之前,讓我們看看原則的產生方式。 從 Visual Studio 2005 產生新的網站專案,然後選取 ASP.NET Web 服務範本,如下圖所示。

Before looking at ServerPolicy, let's see how the rules are generated. New site projects are created from Visual Studio 2005, and the ASP.NET Web service template is selected, as shown in the figure below.

圖 2. Visual Studio 2005 中的新 ASP.NET Web 服務

Figure 2. New ASP.NET Web service in Visual Studio 2005

建立新的 Web 服務之後,以滑鼠右鍵按一下 Visual Studio 中的方案總管,然後選取操作功能表底部的[WSE 組態工具] 功能表選項。 您現在會看到 WSE 3.0 組態工具。 選取 [啟用此專案以進行 Web 服務增強功能] 和 [啟用 Microsoft Web 服務增強功能 Soap 通訊協定處理站] 核取方塊,然後確定此專案在處理 SOAP 訊息時使用 WSE。 接下來選取 [ 原則 ] 索引標籤,核取 [啟用原則] 核取方塊,然後按 [ 新增 ] 按鈕,然後輸入即將建立之新原則的名稱。 我們現在已準備好透過 WSE 安全性設定精靈產生新的原則。 在您逐步完成第一頁之後,您會看到下圖 3 所示的 [驗證] 頁面。

After creating a new Web service, you will now see the WSE 3.0 assembly tool. Select [Initiate this project to perform web service enhancement] and [Initiate Microsoft Web service enhancement Soap communication protocol processing station] to check blocks and then make sure that this project uses WSE when processing SOAP messages. Next selects the index label [`Strange',

圖 3. WSE 安全性設定精靈驗證設定頁面

Diagram 3. WSE Security Settings Wizard Authentication Page

您會看到您必須先要求保護用戶端或伺服器應用程式的安全。 驗證模式是決定最適合您部署的周全安全性案例的開始。 使用各種不同的設定進行實驗,您會看到精靈會據以逐步執行適當的問題。 例如,為了最終使用 UsernameOverCertificate 案例,請選擇 [使用者名稱驗證] 模式並逐步執行精靈。 最終結果是產生描述安全性需求的原則,如下圖所示。

You will see that you must first ask for the security of the client or server application. The verification mode is the beginning of a thorough safety case that determines the best fit for your deployment. Experimenting with different settings, you will see that the elves will apply the right problem over time. For example, in order to eventually use the case of UsernameOverCertificate, select the [username proof] mode and implement the elves over time. The ultimate result is to produce the principle that describes the need for safety, as shown in the graph below.

圖 4. 針對 UsernameOverCertificate 周全安全性案例所建立的原則

Diagram 4. Principles established in the case of Username OverCertificate

按此畫面上的 [ 完成 ] 按鈕會產生原則檔案,預設會以名稱wse3policyCache.config儲存。如下所示的原則是從 [安全性設定精靈] 產生的原則。

The button on this screen [ finishes] generates the original file, defaulting it to be saved by the name wse3policyCache.config. The principles set out below are those derived from the [security setting elves].


如果您熟悉 WSE 2.0 原則檔案,您會看到此 WSE 3.0 原則檔案已大幅簡化。 其中包含具有原則 > 元素的 < 具名原則集合,例如 <policy name=「ServerPolicy」。> 在原則> 元素內 < 是選取的周全安全性案例類型,在此案例 < 中,usernameOverCertificateSecurity> 元素具有許多可設定的屬性,例如是否要建立安全會話、訊息保護順序等等。 根據原則檔案的產生方式, <usernameOverCertificateSecurity> 會包含 <serviceToken> 或 <clientToken> ,其描述根據所選的安全性設定,從何處取得安全性認證。 在上述原則範例中 < ,serviceToken> 包含 <x509> 元素,指出抵達伺服器的要求如何受到保護。 <x509> 元素具有從何處取得此權杖資訊的屬性,包括存放區名稱、存放區位置,以及如何唯一識別 X509 憑證。

If you are familiar with the WSE 2.0 original file, you will see that the WSE 3.0 original file has been significantly simplified. It contains the & gt; elemental & & lt; name group of principles, such as & lt; policy name=ServerPolicy & gt; former & gt > ; element & & lt; selected full safety case & & & & gt; selected case & & & & & & & & & & & & & & & & & & & & & > & & & & & & & & & ; ; ; > > > ; > & > > & & & & & >

<保護> 元素會指出要求、回應和錯誤訊息的簽署和加密部分。 例如,所有要求訊息預設都有WS-Addressing標頭、安全性標頭時間戳記和訊息本文已簽署。 只有訊息本文已加密。 (加密WS-Addressing標頭,將訊息路由傳送至最終目的地非常困難。)

& lt; protects > elements indicate the signature and encryption parts of the request, response and error messages. For example, all requests for messages are pre-signed with WS-Addressing headers, security headmarks and messages. Only messages are encrypted. (Cypted WS-Addressing headers, it is very difficult to send messages from their destination to their final destination.)

我建議您試驗透過安全性設定精靈產生的其他周全安全性案例,然後查看對應產生的原則檔案中包含的內容。 大部分都會遵循上述模式。

I suggest that you try to see the rest of the safety cases generated by the security settings elves, and then look at the content contained in the principle files generated. Most of these patterns are followed.

原則架構

未來會有一篇文章深入探討 WSE 3.0 的原則架構,但值得在這裡提供簡短概觀,因此您至少知道周全的安全性案例如何配合。 原則會使用一些可新增或移除的判斷提示來描述輸入和輸出處理管線。 這些判斷提示可以建立篩選,以描述 XML 訊息從網路流向 SOAP 訊息到應用程式的轉換,然後返回。下圖說明

In the future, there will be an in-depth discussion of the WSE 3.0, but it is worth providing a brief overview here, so you know at least how the full range of safety cases fit. The principle will use some new or removed diagnostic tips to describe input and output processing lines. These diagnostic tips will create a selection to describe the conversion of XML messages from network to SOAP to application, and then return.

圖 5. WSE 3.0 中顯示判斷提示管線的原則架構

Figure 5. WSE 3.0 displays the principle structure of the call line

(由橙色方塊表示的安全性判斷提示,) 發生在輸入管線的開頭和輸出管線結尾。 追蹤判斷提示只會將訊息寫入記錄檔,而且不會實際轉換訊息。 您可以在管線的任何位置及任何特定順序插入自訂判斷提示。 例如,自訂判斷提示可能會根據一組已知的 XML 架構來驗證傳入的訊息。

(Safety determination tips expressed by orange cubes) occurs at the beginning of the input pipe and at the end of the output pipe. The tracking button will only write the message into the record file and will not actually change the message. You can insert a custom determination reminder at any point in the line and in any particular order. For example, a custom determination reminder may verify incoming messages based on a group of known XML structures.

使用周全安全性案例

看過周全的安全性案例和原則實作方式,現在是時候查看它們正在使用中了。 WSE 3.0 隨附的快速入門範例包含一組安全性範例,包括每個周全安全性案例的一個。 我們將深入探討 WSSecurityUsernamePolicy 範例解決方案,示範如何套用 usernameOverCertificate 周全的安全性案例。

WAE 3.0 contains a set of safety examples, including one per week. We will explore in depth the WSSsecurityUsernamePolicy model solution to illustrate how to apply username OverCertificate’s full range of safety cases.

我們已看到透過安全性設定精靈產生的伺服器原則檔案,以及如何透過 [原則] 屬性套用至 Web 服務。 在相同的解決方案中開啟用戶端主控台應用程式。 在此用戶端專案中,已啟用 WSE 的 Proxy 已透過 [新增 Web 參考] 操作功能表產生。 保護伺服器訊息的用戶端原則可以透過兩種方式之一來設定。 您也可以在 Proxy 上呼叫 SetPolicy 方法,例如

We have seen the server's original files generated by the security configuration wizard, and how they can be applied to Web services through [the original] attributes. Open the client master control application in the same solution. In this client case, Proxy, which has been enabled to use WSE, has been generated through the [new web reference] operation table. The client's original to protect server messages can be configured in one of two ways. You can also call SetPolicy on Proxy, for example.


或者,您也可以在用戶端上使用 CLR [Policy] 屬性,就像在伺服器上使用一樣。 不過,系統會自動產生用戶端 Proxy 檔案,因此,如果用戶端 Proxy 是透過 新增 Web 參考更新用戶端 Proxy,就會遺失任何新增至用戶端的屬性。 幸運的是,用戶端產生的程式碼會使用 .NET Framework 2.0 中引進的 CLR 部分類別,這表示我們可以在另一個檔案中套用[Policy]屬性,並讓編譯器負責撰寫完整的類別定義。 如果您查看 WSSecurityUsernameClient.cs 檔案,您會看到下列批註化的程式碼,示範如何使用部分類別在用戶端上套用 [Policy] 屬性。

Alternatively, you can use CLR [Policy] attributes on a client, as it does on a server. However, the system will automatically generate a client proxy file, so if the client proxy is updated with by adding a new user proxy to /strong, then you can lose any new user attributes. Fortunately, the user-generated code will use. Net Framework 2.0, you will see the following fractions of the CLR that allow us to use


現在,讓我們在此相同檔案的 Run 方法中查看其餘用戶端程式代碼。

Now, let us look at the remaining client code in this same file's Run method.


在上述程式碼中,您會看到使用者名稱和密碼是透過 usernameToken 類別在程式碼中設定,這是慣用的方式,而不是在原則檔中指定這些值。 接著,此 U/P 會透過 SetClientCredential 方法設定為用戶端認證,以向伺服器驗證用戶端。 在此案例中,原則是使用 SetPolicy 方法,從檔案讀取名為 ClientPolicy 的原則,最後會使用提供的股票報價符號呼叫 StockQuoteRequest 方法。 如果您查看用戶端的原則,也會儲存在名為 wse3PolicyCache.config 的檔案中,您會看到這幾乎與伺服器的原則相同,而不是從中擷取伺服器 X.509 憑證的 storeLocation

In the code you will see the username and password set in the code through usernameToken, which is the usual way to specify these values in the code, rather than in the original file. This U/P will then set the username and password as a client authentication for the server. In this case, using the SetPolicy method, the file will be read under the name StrentPolicy, and the stock exchange sign will be used to call StockQuoteRequest to verify the client's client's client's client's client's client's client. In this case, you will also store the same device as the file.

如果您開啟 WSE 追蹤,請透過 WSE 組態工具上的 [ 診斷 ] 索引標籤,執行此範例,然後檢查追蹤記錄,您會看到使用 usernameOverCertificateSecurity 周全安全性案例保護的用戶端與伺服器之間傳送的安全訊息。 只需要產生用戶端和伺服器原則檔案,並使用 SetPolicy 方法和 [Policy] 屬性分別套用至用戶端和伺服器。

If you open WSE tracking, run this example through the [ index label] on the WSE configuration tool and check the track log, you will see the security message between the user and the server using the full safety case protected by usernameoverCertificateSecurity. Only the client and server original file will be generated, using the strong>Setpolicy method and the strong> [Policy] sexual division to the client and server.

注意 WSE 3.0 不再實作 WS-SecurityPolicy,因為此規格是在標準化程式中,而且自 WSE 2.0 版本之後已大幅變更,該版本遵循早期草稿。 WSE 3.0 中的原則應該視為服務的組態系結。

WSE 3.0 is no longer valid as the WS-SecurePolicy rule has been changed significantly since the WSE 2.0 version, which follows the earlier draft. The principles in WSE 3.0 should be considered as the composition of the service.

WSE 3.0 不會針對中繼資料交換實作 WS-MEX,這可讓您判斷服務的原則。 原則檔案必須交換頻外。

WSE 3.0 will not be a WS-MEX exchange for metadata, which allows you to judge the principles of service. The principles file must be exchanged off the channel.

我們已瞭解 WSE 3.0 中的原則現在如何在宣告式檔案與命令式程式碼之間對齊,以提供更清楚且更一致的開發方法來保護用戶端和服務。

We have learned how the principles in WSE 3.0 are now aligned between declaratory files and command code to provide clearer and more consistent development methods to protect clients and services.

MTOM,也稱為「訊息傳輸優化機制」,可讓您有效率地在 SOAP 訊息中傳送二進位資料。 這裡的關鍵字是 優化,因為對於所有意圖和目的,這對開發人員而言是透明的,只要啟用時就會發生。 MTOM 是一項 W3C 建議,可取代 DIME 和WS-Attachments做為傳送大量資料的機制,例如檔檔和影像。

MTOM, also known as the " Message Transfer Efficiency Scheme ", allows you to transmit binary data efficiently in SOAP messages. The key word here is , which is transparent for all intents and purposes, and happens when activated. MTOM is a W3C recommendation that replaces DIME and WS-Attachments as a mechanism for sending a lot of data, such as files and images.

對於現有技術使用 MTOM 有三個主要優點。

There are three main advantages to the current technology use of MTOM.

  1. 安全性。 主要優點是 MTOM 透過 WS-Security) 以安全性 (組成,這表示資料是安全的,以及 SOAP 訊息。 使用 DIME 時,除非您使用傳輸層級安全性 () ,而且只要使用任何 TCP 追蹤公用程式或網路通訊協定分析器,才能以純文字看到附加資料,否則附件並不安全。

    security. The main advantage is that MTOM is secure (combined) through WS-Security, which means that data is secure, and SOAP messages. When using DIME, unless you use transfer level security() and if you use any TCP tracking utility or network communication protocol analyser, you can see additional data in plain text, or the attachments are not safe.

  2. 減少電線大小。 使用 MTOM 時,二進位字元值會以 MIME 附件的形式傳送,並從 SOAP 訊息本文參考這些值。 一般而言,由於 XML 1.0 (中允許的特定字元範圍,因此大部分字元 < 0x20不能包含在 XML 檔) 中,二進位資料會透過 base64 編碼演算法轉換成 ASCII 字元, (請參閱 http://en.wikipedia.org/wiki/Base64) 。 產生的 base64 編碼資料長度大約大於原始二進位資料 33%。 MTOM 只是另一種不受此大小擴充影響,因此線大小較小的另一種編碼演算法。 連線大小只是頻寬足以影響訊息的限制的問題。

    Reduces the size of electrical lines. When using MTOM, binary character values are sent as mime attachments, and refer to these values from SOAP messages. Generally speaking, since XML 1.0 (the specific type of character range allowed in it), most characters & lt; 0x20 cannot be included in XML files, binary data can be converted through base64 code algorithms to ASCII characters (see ). The resulting binary data range is about 33% larger than the original binary data.

    注意 雖然 MTOM 在以安全性撰寫時會減少網路大小,但不會減少用戶端或伺服器上的處理時間,以保護訊息。 這是因為WS-Security需要將資料轉換成 base64 來套用正規化和標準化演算法,因而產生加密值以達到互通性。

    notes that while MTOM reduces network size when writing securely, it does not reduce processing time on client or server to protect messages. This is because WS-Security needs to convert data to base64 to apply regular and standard algorithms, thereby creating encryption values to achieve interoperability.

  3. 簡化的程式設計模型。 使用 MTOM 時,您不需要使用與 DIME 相同的個別附件集合來傳送資料。 您所做的一切都是寫入服務,然後直接指出此服務支援應用程式組態檔中的 MTOM 編碼。 從服務傳回的任何 位元組[] 類型都會自動編碼 MTOM。

    Simplified program design model. When using MTOM, you do not need to use the same different attachments as DIME to send data. Everything you do is to write the service and then directly indicate the MTOM code in the service application configuration file. Any type of byte[] returned from the service will automatically encode MTOM.

在討論 MTOM 的優點之後,讓我們看看一個簡單的 Web 服務,以將二進位檔案從伺服器傳回至用戶端。 下列程式碼顯示傳回該檔案作為指定檔案名之 GetFileResponse 類型的服務。 此程式碼取自 WSE 3.0 範例隨附的 BinaryDataMTOM 快速入門範例。

After discussing the merits of MTOM, let us look at a simple Web service to return binary files from the server to the client. The following code displays a quick entry for transmitting the file as the type GetFileResponse specified file name. This code is taken from the example of WSE 3.0 attached to BinaryDataMTOM.


GetFileResponse類型是套用 MTOM magic 的位置,因為FileContents會以位元組[]傳回,只要使用File.ReadAllBytes方法來讀取檔案即可達成。 透過 WSE 組態工具中的 [ 訊] 索引標籤,在組態中開啟 MTOM。 圖 6 顯示這些 MTOM 組態選項,這些設定選項會在設定時寫入用戶端的app.config或伺服器的web.config檔案。

GetFileResponse is the location of the MTOM mogic because FileContents returns in to read files as long as file. ReadAllBytes method is used to read files. Index labels in the WSE configuration tool [ to disseminate messages] to open MTOM in configurations. Figure 6 shows these MTOM configurations, which are set to write client app.config or server web.config files.

圖 6. MTOM 組態選項

Figure 6. MTOM configuration

注意
有三種伺服器 MTOM 模式:「optional」、「always」 和 「never」。

Note
has three types of server MTOM mode: "optional", "always" and "never".

一律 表示服務 「永遠」需要來自用戶端的 MTOM 訊息,並使用 MTOM 傳迴響應消息。

indicates that the service "forever" requires MTOM messages from a client and uses MTOM to relay messages.

不表示永遠不會使用 MTOM,而服務將會拒絕 MTOM 要求。

does not mean that MTOM will never be used, and the service will refuse MTOM requests.

選擇性 (預設) 表示服務會以種類回應用戶端所傳送的訊息類型。 因此,如果用戶端傳送 MTOM 要求,它會以 MTOM 回應回應回應。

Selective (predict) indicates that the service will respond to the type of message sent by the client. Therefore, if the client sends a MTOM request, it will respond as MTOM.

在用戶端 MTOM 上是 「On」 或 「Off」 (預設) 。

The client MTOM is either "On" or "Off" (preset).

現在讓我們看看用戶端程式代碼來呼叫此已啟用 MTOM 的服務,這會傳回 GetFileResponse 類型,然後將檔案寫入磁片。 請注意,這與呼叫 ASP.NET Web 服務來傳回檔案並無不同,它只會使用 MTOM 優化傳輸。

Now let us look at the client ID to call this MTOM enabled service, which returns the type GetFileResponse and writes the file to a disk. Note that this is no different from the call ASP.NET Web service to return the file, which uses only MTOM for better transfer.


您可以選擇在 WSE 產生的 Proxy 上呼叫 RequireMtom 方法,覆寫每個用戶端 Proxy 的 MTOM 組態設定。 例如,下列程式碼會關閉 Proxy 的 MTOM

You can use Proxy from WSE to call RequireMtom to overwrite the MTOM configuration for each user proxy. For example, the following code closes Proxy's MTOM


因此,假設這一切的魔術都會在涵蓋下發生,您如何知道正在線上傳送二進位資料? 若要查看此情況,我們需要使用 TCP 追蹤工具,例如 TcpTrace.exe,您可以在 下載 http://www.pocketsoap.com/tcptrace/

So, assuming that all this magic happens under cover, how do you know that binary data is being sent online? To see this, we need to use TCP tracking tools such as TcpTrace.exe, you can download .

如果您執行此公用程式 (記得將埠 8080 新增至用戶端app.config檔案或 reference.cs 檔案中用戶端 Proxy 產生的程式碼中的 URL,以確保要求訊息會透過 TcpTrace.exe 公用程式) ,然後您會看到類似下圖 7 所示的訊息。

If you run the URL from this utility (remember to add port 8080 to the client's app.config file or reference.cs file), make sure that the request for information passes through the TcpTrace.exe utility), you will see messages similar to those shown in figure 7 below.

按一下影像以放大)

magnified by video

圖 7. 使用 MTOM 從 Web 服務傳回二進位資料, (按一下影像以放大)

Figure 7. Returns binary data from the Web service using MTOM, (click image to zoom)

螢幕擷取畫面的上方部分是來自用戶端的要求。 螢幕擷取畫面的下半部顯示來自伺服器的 MTOM 編碼回應,其中重要資訊位於fileData> 元素中 < ,其中包含個別 MIME 界限的xop:Include參考。

The upper part of the screenshot is requested by the client. The second half of the screenshot displays an MTOM encoded response from the server, with important information in fileData> & lt;, with a different MIME limit xop:Include.


此 MIME 界限的螢幕擷取畫面下方的 cid:1.63253603746739 包含從伺服器擷取之winter.jpg檔案的二進位資料。

This mime limit captures cid: 1.63253603746739 below the screen of the screen containing binary data on the winter.jpg file taken from the server.

使用 MTOM 串流二進位資料

先前使用 MTOM 的程式碼範例會先將它載入伺服器上的 FileContents byte[] 來快取伺服器上的檔案。 對於具有許多要求的大型檔案,這會佔用伺服器上的大量記憶體。 您想要執行的動作是透過網路串流將檔案從伺服器串流到用戶端。 針對使用 HTTP 裝載于 IIS 中的 ASP.NET Web 服務,可以實作衍生自 IXmlSerializable的傳回型別。 如果您查看BinaryDataMTOMService.cs 檔案中的 BinaryDataMTOMService.cs範例中的程式碼,您會發現另一個 Web 服務會改為傳回衍生自IXmlSerializableGetFileResponseWrapper類型。此 Web 服務會執行相同的函式來傳回具名檔案,但這次,藉由在 IXmlSerializable 介面上實作ReadXmlWriteXml方法,檔案會從伺服器串流至網路。

For large files with many requirements, this will take up a lot of memory on the server. The action you want to execute is to stream the files from the server to the client via a web stream. The program using the HTTP's FileContents byte [BinaryDataMTOMservice. cs from the web stream, you will find another version of the HTTP's service

WSE 2.0 支援安全交談 (WS-SecureConversation) ,這可讓用戶端與服務之間建立會話,進而達到多個訊息的有效通訊。 會話和安全交談是同義的。 Web 服務增強功能 2.0 中的 WS-Security 向下鑽研一文提供仍適用于 WSE 3.0 的安全交談概觀。 不過,在 WSE 3.0 會話中,現在可以透過服務的原則建立,讓任何指定的服務也可以做為安全性內容權杖 (SCT) 簽發者,否則稱為安全性權杖服務 (STS) 。 如果您回頭查看稍早所示的原則檔案範例,您會看到針對任何指定的周全安全性案例,您可以透過將 createSecurityCoNtext 屬性設定為 true 來指出服務可以自動發出 SCT,如下列原則程式碼片段所示。

會話取消

除了有逾時的 SCT 之外,現在還可以透過從用戶端的 Proxy 取得 SCT 並呼叫其 Cancel 方法,明確地取消 SCT。 這表示服務現在知道會話已完成,而且它可以清除其 SCT 快取。 下列程式碼示範如何從用戶端的 Proxy 取得 SCT 實例,並儲存在其 SessionState 物件中。

In addition to the timed SCT, it is now possible to explicitly cancel the SCT through Proxy from the client and call it Cancel. This means that the service now knows that the session is complete and that it can clear its SCT cache. The following code example is how the SCT case can be obtained from Proxy from the client and stored in its SessionState object.


SCT 會在服務呼叫成功之後取消,而這會「終止」用戶端和服務的會話。

The SCT will cancel after the service call has been successful, and this will "end" the client and the service session.

具狀態會話

WSE 3.0 現在能夠從用戶端的觀點建立具狀態會話,否則稱為具狀態 SCT。 在 WSE 2.0 中,由 SecurityContentToken> 元素在訊息 < 中表示的 SCT 只能包含 < 指向伺服器和用戶端上快取之 SCT 值的Identifier> 元素。 換句話說,數值會從用戶端來回傳遞至用來在任一端查閱雜湊表中 SCT 的伺服器。 訊息會受到 SCT 保護,因為兩端都會將識別碼值對應至快取的 SCT。

WSE 3.0 is now able to create a status session from the client's point of view, or is it called status SCT. In WSE 2.0, is sent back from the client to the SCT's server that is used to access the directory at either end. Messages are protected by SCT, because both end-to-end SCTs are supposed to match the SCT values to the fast-tracked SCTs.

不過,有兩個案例需要不只是SecurityContentToken > 元素中的 <識別碼值:

However, there are two cases in which & lt; identifier values in elements need more than SecurityContentToken >:

  1. 服務失敗之後重新建立會話。
  2. 在 Web 服務器陣列中使用會話,這實際上是機器的邏輯集合。

我們將逐一查看這些案例。

We'll look at these cases one by one.

基於許多原因,服務可能不可靠,例如因為負載或壓力狀況而執行的環境,或因其他資源限制而重設應用程式域。 如果服務關閉且記憶體中快取的 () SCT 遺失,則會話會有效地遺失。 不過,藉由在用戶端上保存 SCT 狀態並傳送每個要求,這可讓會話與伺服器重新建立。 訊息中的 SCT 狀態除了Identifier> 元素之外 < ,還會由 <SecurityContentToken> 元素內的 <Cookie> 元素表示。 為了達到效能, < 在 SCT 快取中仍會先檢查Identifier> 元素值。 < Cookie >元素包含工作階段金鑰、存留期,以及用戶端的識別權杖 (例如使用者名稱/密碼權杖) 。 Cookie 會使用伺服器的權杖進行加密,以便只有目標服務能夠解密 SCT 中的 Cookie 來擷取此資訊。 下列 XML 訊息程式碼片段會在用戶端的應用程式要求中傳送具狀態 SCT 時,顯示SecurityContentToken> 元素內的 < 加密 Cookie <EncodedData> 元素。

The service may be unreliable for a number of reasons, such as the environment that is run because of load or pressure conditions, or the reset of application fields because of other resource constraints. If the service is shut down and the memory () SCT is missing, the session will be effectively lost. However, by keeping the SCT status on the client and sending every request, this will allow the meetings and servers to be recreated. The SCT status in the message will be replaced by Identifier> & & ; & & ; & ; ; ; ; and ; and ; > ;


根據預設,Windows 資料保護 API (DPAPI) 是用來加密和解密具狀態 SCT Cookie 中的資料,因為這是一種壓縮的二進位格式,對訊息大小的影響很小。 如需 DPAPI 的描述,請參閱 Windows 資料保護 。 DPAPI 會針對登入的帳戶使用與目前線程相關聯的金鑰。 因此,如果 SCT 簽發者 (STS) 和目標服務是以相同的帳戶 (執行,這是建議的方法) ,則伺服器用來加密 SCT (的伺服器權杖,例如伺服器 x509 憑證或 Kerberos 權杖) ,因為此執行緒的金鑰是用來加密 SCT。 雖然協力廠商 STS 並不常見,但通常最好讓服務做為 STS。

By default, Windows Data Protection API (DPAPI) is used to encrypt and decipher data in the status SCT Cookie because it is a condensed binary format that has little impact on the size of the message. If you need a DPIPI description, please refer to . The DPAPI will focus on the key that links the login account to the current line. So if the SCT (STS) signatory and the target service are the same account (execution, which is the recommended method), the server will use to encrypt the STT (SPV, e. g. server x509 or KerberS) server, which is not the usual SS-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-S-

若要使用具狀態 SCT,其中呼叫的服務也是安全性權杖服務 (STS) ,只需要在服務web.config的statefulSecurityCoNtextToken > 元素上 <enabled屬性設定為true,如下列程式碼片段所示。

To use a state-of-the-art SCT, the service called for is also the Safety Cane Service (STS), only & lt; enabled attributes are set to truestateSecurityCoNTtToken & gt.


您也可以透過 WSE 組態工具設定此值,方法是選取 [權杖][建議 ] 索引標籤,然後選取 [啟用具狀態安全性內容權杖] 核取方塊,如下圖所示。

You can also set this value through the WSE assembly tool by selecting an index label for [the scepter] [suggested ], and then checking for diamonds for [starting state-safe content scepter], as shown in the figure below.

圖 8. 在服務上設定具狀態 SCT

Figure 8. Set the service status SCT

體驗具狀態 SCT 功能以重新建立會話的最簡單方式是改變 SecureConversationPolicy 快速入門範例,讓用戶端 Proxy 呼叫 Web 服務兩次。 請確定服務上已啟用具狀態 SCT,然後在對服務的要求之間,從命令提示字元執行 iisreset.exe ,以模擬服務失敗。 請確定您等候 IIS 重新開機。 啟用具狀態 SCT 時,服務的第二次呼叫將會成功,就如同未發生任何事一樣,也就是重新建立會話。 當具狀態 SCT 停用時,第二次呼叫會失敗,因為訊息中只會傳送識別碼。

The simplest way to recreate the SCT function is to change the SecureConversationPolicy Quick Enter to allow client Proxy to call Web Services twice. Make sure that the service is activated SCT and then, between the service requirements, execute the command hint iisreset.exe to simulate the service. Make sure that you wait for IIS to restart. When SCT is activated, the second call for the service will succeed, as if nothing had happened, that is, to re-establish the session. When SCT is deactivated, the second call will fail, because the message will only send a message.

注意 會話取消和具狀態的 SCT 無法真正組成。 如果啟用具狀態 SCT,則雖然可以取消會話,但下一個用戶端要求會再次重新建立它,就像服務關閉並備份一樣。 請留意您嘗試管理會話的方式。

notes that sessions cancel and state-of-the-art SCTs cannot really be formed. If SCT is enabled, the session can be cancelled, but the next client requests that it be recreated again, as if the service was shut down and back-up. Please keep in mind the way you try to manage the session.

具狀態 SCT 的第二個案例是在 Web 服務器陣列中使用會話。 這個絕佳的文章 :管理 Web 服務器陣列中的安全性內容權杖,說明三種管理 Web 服務器陣列狀態的解決方案。 WSE 3.0 中的具狀態 SCT 類似于此處稱為「將 SCT 的狀態資訊放入 SCT 的擴充性區域」,而描述這項描述的文字直接適用于在 WSE 3.0 中使用具狀態 SCT。 我建議閱讀本文,以瞭解如何管理裝載多個服務實例之伺服器陣列的安全內容權杖。 此外,如先前所述,使用 DPAPI 來保護 SCT 表示您不需要在 Web 服務器陣列中使用伺服器權杖來設定目標服務,這可讓管理性更容易。

The second case with status SCT is the use of a session in the Web server array describes the solution for managing the status of the web server. The status of the system in WEE 3.0 is referred to here as "the extension of the status of the SCT to the SCT" and describes the description of the description as directly applicable to the use of the status SCT in the WSE 3.0 server.

本節涵蓋使用 WSE 3.0 和 Visual Studio 2005 更輕鬆地建置服務導向系統的功能。

This section covers the use of WSE 3.0 and Visual Studio 2005 to create service-guiding systems more easily.

WSE 2.0 引進 SoapClientSoapService 類別,以便能夠在 IIS 外部裝載 Web 服務,並使用使用 SOAP 訊息的 HTTP 以外的通訊協定呼叫它們。 SoapClientSoapService 以及較低層級 的 SoapSenderSoapReceiver 類別建立了 WSE 作為替代傳訊平臺,其中基本原則是傳輸中性傳訊和替代主機。 如需 WSE 2.0 傳訊 API 的詳細資訊,請參閱 Web 服務增強功能 2.0 的 Web 服務傳訊

WSE 2.0 Draws into the categories of SoapCliet and SoapService to enable the installation of Web services outside the IIS and the use of the HTTP using the SOAP message to call them. SoapCliet and SupSender and to create WSE as an alternative message platform, the basics of which are transferable messages and replacement hosts.

為了將傳訊愛帶到 ASMX Web 服務,WSE 3.0 能夠裝載 ASMX Web 服務執行時間。 透過 .NET Framework 2.0,您可以整合 WSE 與 ASMX 程式設計模型,以達成傳輸和主機獨立,並繼續利用 Visual Studio 2005 中的工具支援。

To bring communication love to ASMX Web services, WEE 3.0 can load the ASMX Web service implementation time. By 2.0.NET Framewerk, you can integrate WSE and ASMX programming models to achieve transfer and host independence and continue to use the tools in Visual Studio 2005.

在 WSE 3.0 ASMX Web 服務中,可以裝載于主控台應用程式、Windows 服務、COM+ 元件或 Windows Form 應用程式中,並透過 TCP 通訊協定呼叫。 針對 WSE 發行了數個其他自訂傳輸,包括 UDP 和 MSMQ,也可以利用 ASMX Web 服務的這些替代主機,而不需要只使用 TCP 通訊協定。

In WSE 3.0 ASMX Web services, you can load the mainframe applications, Windows services, COM+ components or Windows Forum applications, and call through TCP communications protocols. Several other custom transfers, including UDP and MSMQ, have been issued to WSE, or use the alternative hosts of ASMX Web services instead of using only TCP communications protocols.

下列程式碼範例示範如何在主控台應用程式中達成此目的。 取得衍生自System.Web.Services.WebServiceStockService類別,就只需要針對透過EndpointReference類別指定的指定 TCP 接聽埠,將此類型提供給SoapReceivers集合即可。

The following code examples illustrate how this can be achieved in the mainframe application. Obtain the strong'Stem.Web.Services.WebService distinction derived from System.


從用戶端,如果 IIS) 也裝載此 Web 服務,則透過 Visual Studio 的 [新增 Web 參考 ] (所產生的 Proxy 類別,只能藉由更新 Proxy 的 Url 屬性來與主控台裝載的 ASMX Web 服務進行通訊。

From the client, if IIS also installs this Web service, it can only communicate with the ASMX Web service installed on the mainframe by updating the Proxy attribute Url via Visual Studio [new web reference ].

注意
在未來的 WSE 3.0 版本中,您可以使用 wsewsdl.exe 工具來透過 TCP 產生衍生自 Microsoft.Web.Services3.WebServicesClientProtocol 的用戶端 Proxy,這可用來與 ASMX Web 服務通訊。

Note In future WE 3.0 versions, you can use wsewsdl.exe tools to generate a user Proxy from Microsoft. Web. Services3. WebServicesClietProtocol, which can be used to communicate with ASMXWeb services.

Wsewsdl.exe 將繼續產生衍生自 SoapClient的用戶端 Proxy,就像今天使用 WSE 2.0 一樣。

Wsewsdl.exe will continue to generate the user Proxy from SoapCliet, just as it is today using WEE 2.0.

下列程式碼片段示範如何使用用戶端 Proxy,透過 TCP 呼叫此主控台裝載的 ASMX Web 服務。

The following code snippet exemplifies how to use the client Proxy to call the ASMX Web service via TCP on this console.



WSE 3.0 與 Visual Studio 2005 和 .NET Framework 2.0 版本一致,而且此範圍會利用基礎平臺的變更。 WSE 3.0 不會在 .NET Framework 1.1 和 Visual Studio 2003 上執行。 因此,WSE 3.0 檔說明將 WSE 2.0 專案向前移至 WSE 3.0 所需的移轉步驟,包括將 WSE 組態檔自動升級至較新版本的組態工具支援。 整體從 WSE 2.0 升級至 WSE 3.0 是一種機械程式,只有有限的重大變更數目。

WSE 3.0 is consistent with Windows Studio 2005 and.NET Framework 2.0, and this range will take advantage of changes in the base table. WSE 3.0 will not run on.NET Framewerk 1.1 and Visual Studio 2003. Therefore, WSE 3.0 files describe the move required to move the WSE 2.0 project forward to WSE 3.0, including the automatic upgrade of the WSE group file to a more recent version of the assembly tool support. The whole upgrade from WSE 2.0 to WSE 3.0 is a mechanical program with only a limited number of significant changes.

WSE 3.0 支援 64 位,視.NET Framework 2.0 的需求而定。

WSE 3.0 support 64 bit depending on the needs of.NET Framework 2.0.

WSE 3.0 版本的主要目標是提供 Indigo 的路徑,以根據 Web 服務通訊協定建置服務導向的應用程式。 WSE 3.0 與 Visual Studio 2005 和 .NET Framework 2.0 波浪一致,並提供 ASMX Web 服務的安全性支援。 Indigo 是因為在 Windows Longhorn 時間範圍內發行,而且是未來建置分散式服務導向應用程式的平臺。

The main objective of WSE version 3.0 is to provide a path to Indigo to define applications for service orientation based on the Web Service Communication Agreement. WSE 3.0 is consistent with Visual Studio 2005 and.NET Framework 2.0 waves and provides security support for ASMX Web services. Indigo is issued within Windows Longhorn time horizons and is the platform for future decentralized service-guiding applications.

WSE 3.0 今年稍後發行時,是完全支援的產品。 此支援聲明相當重要。 當 WSE 1.0 發行時,其支援生命週期有限。 自 WSE 2.0 版起,WSE 已隨著.NET Framework而擴充客戶支援。 如需 WSE 產品生命週期的詳細資訊,請參閱 產品生命週期日期 - 開發人員工具系列

WSE 3.0 was a fully supported product when it was released later this year. This statement of support was important. When WSE 1.0 was released, its life support period was limited. Since WSE 2.0, WSE has been expanded with client support from.NET Framewerk. For details about WSE product life cycle, see .

使用周全安全性案例時,WSE 3.0 提供與 Indigo 的連線層級相容性保證,這表示您可以部署 WSE 3.0 服務,並透過 Indigo 用戶端進行通訊,反之亦然。 WSE 3.0 也會與 Indigo 並存執行,這表示您可以部署服務,並在 Indigo 抵達時視需要新增進一步服務,選擇視需要移轉某些服務,例如可靠性或改善效能。

When a complete safety case is used, WSE 3.0 provides a level of connection compatibility with Indigo, which means that you can deploy WSE 3.0 services and communicate through the Indigo client, and vice versa. WSE 3.0 also runs with Indigo, which means that you can deploy services and look at Indigo when it arrives requires further services, and selects services that need to be transferred, such as reliability or efficiency improvement.

注意 WSE 3.0 與 Indigo 搭配使用 HTTP 通訊協定和對應的周全安全性案例,與 Indigo 相容。 不保證與其他通訊協定的互通性,例如 TCP。

notes that WE 3.0 is compatible with Indigo's well-defined safety cases using HTTP communications protocols and responses. There is no guarantee of interoperability with other communications protocols, such as TCPs.

WSE 3.0 是一種程式設計 API,可用來建置安全的 Web 服務,而且您透過它取得建置應用程式的所有概念和體驗,都適用于 Indigo 和其他互通的 WS-* 工具組。 用來定義服務合約的概念、傳訊模式、與其他產品整合,例如訊息轉換和協調流程的BizTalk Server,以及SQL Server 2005 用於儲存體的概念,全都會流向 Indigo。 換句話說,若要獲得分散式應用程式開發的經驗,請立即使用 WSE 建置解決方案。

WSE 3.0 is a program design API, which can be used to build secure Web services, and through which you obtain all concepts and experiences for building applications that are suitable for use in Indigo and other shared WS-* tool sets. In other words, to define the concept of a contractual service, the mode of communication, the integration with other products, such as BizTalk Server for message conversion and reconciliation, and the concept of SQL Server 2005 for storage, all flow to Indigo.

WSE 3.0 版本也提供程式設計模型中 Indigo 的一些有限同位,特別是與周全安全性案例的對齊方式有關。 WSE 周全安全性判斷提示會與 Indigo 安全性元素系結驗證模式一致。 在撰寫本文時,WSE 組態和原則設定與 Indigo 標準系結之間的對齊和指引仍在進行中,而且將會是未來 WSE 3.0-to-Indigo 互通性文章的主題。

The WSE version 3.0 also provides some of the limited homogeneity of Indigo in the design model, particularly in relation to the alignment of safety cases. The WSE weekly full-security determinations will be consistent with the Indigo safety element validation mode. At the time of writing, the WSE configuration and the original setup were still in progress and would be the subject of a future WSE 3.0-to-Indigo interconnectivity article.

雖然 WSE 3.0 和 Indigo 會並存執行,但程式碼移轉仍是考慮。 從 WSE 3.0 移轉至 Indigo 的目的是要以記載的指引和/或腳本和工具的形式簡單且機械。 移轉會簡化使用周全案例的位置,因為已針對現有基礎結構進行架構決策。

Although WSE 3.0 and Indigo will be running together, the code transfer is still being considered. The move from WSE 3.0 to Indigo is intended to be simple and mechanical in the form of recorded guidelines and/or scripts and tools.

本文已涵蓋 WSE 3.0 功能,但有最能透過簡短常見問題解決的支援和技術選擇問題。

The WSE 3.0 feature is covered, but there are the support and technical options that can best be solved through simple, common problems.

什麼是 WSE 3.0 發行排程?

What's a WSE 3.0 launch schedule?

WSE 3.0 將在 Visual Studio 2005 發行版本的四周內發行,此版本目前已排定于 2005 年 11 月 7 日。 在那之前,每月社群技術預覽版 (CTP) 將可供使用,而且應該透過產品意見反應中心 http://lab.msdn.microsoft.com/productfeedback/ 回報問題。

WSE 3.0 will be released within four weeks of the release of the Visual Studio 2005, which is now scheduled for November 7, 2005. Until then, the monthly social technology preview (CTP) will be available and should report back through the product feedback centre .

我應該使用 WSE 2.0、WSE 3.0 或 Indigo?

Should I use WSE 2.0, WSE 3.0 or Indigo?

WSE 3.0 是一項產品,可擴充 .NET Framework 2.0 ASP.NET 2.0 Web 服務。 其目標為 Visual Studio 2005 時間範圍,發行後即支援且成熟實作最新的 Web 服務規格和標準。 使用周全的安全性案例時,WSE 3.0 可確保與 Indigo 服務互通性。 Indigo 的目標是 Windows Longhorn 時間範圍。

WSE 3.0 is a product that can be expanded by.NET Framework 2.0 ASP.NET 2.0 Web service. Its objective is the Visual Studio 2005 time frame, which supports and matures up-to-date Web service codes and standards. When using a full range of safety cases, WSE 3.0 ensures interconnectivity with Indigo services. Indigo's goal is the Windows Longhorn time horizon.

以 .NET Framework 1.1 為目標的應用程式應該使用 WSE 2.0;不過,WSE 2.0 與 WSE 3.0 或 Indigo 不相容,因為 WS-Addressing 等規格的變更。

Applications targeting.NET Framework 1.1 should use WSE 2.0; however, WSE 2.0 is incompatible with WSE 3.0 or Indigo because of changes in regulations such as WS-Addressing.

WSE 2.0、WSE 3.0 和 Indigo 之間的關聯性為何?

What is the connection between WSE 2.0, WEE 3.0 and Indigo?

WSE 解決了開發人員在 .NET Framework 2.0 上輕鬆建置安全 Web 服務的重要需求。 在 Longhorn 時間範圍內,Indigo 會提供統一的程式設計模型和執行時間,以建置分散式系統。 Indigo 提供現今 Microsoft 技術的超集合來建置分散式系統,包括 COM+、企業服務、MSMQ 和 WSE。 WSE 3.0 保證與 Indigo 相容,並與 Indigo 並存執行。 請將 WSE 視為目前一組 API,以支援進階 Web 服務,並立即啟用應用程式設計的服務方向。 請將 Indigo 視為一組 API,以在 「Longhorn」 波中建置支援 Web 服務通訊協定的分散式系統。

WSE addresses the important need for developers to ease the construction of secure Web services on.NET Framework 2.0. Within Longhorn time horizons, Indigo will provide a single design model and running time to build a decentralized system. Indigo will provide an ultra-assembly of current Microsoft technology to build decentralized systems, including COM+, Enterprise Services, MSMQ, and WSE. WSE 3.0 guarantees compatibility with Indigo, and with Indigo. Please view WSE as the current group of APIs to support the advancement of Web services and to immediately activate the service orientation of the application.

WSE 3.0 是否有與 Indigo 相同的物件模型? WSE 是否與 Indigo 相容?

WSE 3.0 Does it have the same object model as Indigo? Is it compatible with Indigo?

不會。 WSE 提供遵循 Web 服務規格的程式設計模型,以及發行之間的變更。 Indigo 程式設計模型會統一 Microsoft 的技術來建置分散式系統,並納入更廣泛的技術和功能。

No. WSE provides a program design model that follows the Web service code, and changes between distributions. Indigo design models combine Microsoft techniques to build decentralized systems and incorporate broader technologies and functions.

.NET Framework 2.0 是否支援 WSE 2.0?

. NET Framework 2.0. Do you support WSE 2.0?

發行之後,.NET Framework 2.0 上將支援 WSE 2.0 版本。 .NET Framework 2.0 支援使用 WSE 2.0 SP2 和 SP3 應用程式建置的應用程式;不過,WSE 3.0 是 .NET Framework 2.0 的慣用解決方案。 Visual Studio 2005 和 WSE 2.0 的設計階段支援僅支援 32 位,而不是 64 位。 WSE 2.0 SP3 會安裝 Visual Studio 2005 Beta 2 和 .NET Framework 2.0,但不受支援。

After distribution, General.NET Framework 2.0 supports WSE version 2.0...NET Framework 2.0 supports applications built using WSE 2.0 SP2 and SP3 applications; however, WEE 3.0 is a used solution for.NET Framework 2.0. The design sections of Visual Studio 2005 and WSE 2.0 support only 32, not 64. WSE 2.0 SP3 will install Visual Stuart 2005 Beta 2 and.NET Framehork 2.0, but will not be supported.

WSE 2.0 應用程式是否可以與 WSE 3.0 應用程式並存執行?

WSE 2.0 Application Can you store with WSE 3.0 Application?

是。 您可以在相同的電腦上安裝 WSE 2.0 和 WSE 3.0。

Yes. You can install WSE 2.0 and WSE 3.0 on the same computer.

WSE 3.0 回溯是否與 .NET Framework 1.1 和 Visual Studio 2003 相容?

WSE 3.0 Retroactivity compatibility with.NET Framework 1.1 and Visual Studio 2003?

否,WSE 3.0 只會在 .NET Framework 2.0 上執行。

No, WE 3.0 will only run on.NET Framework 2.0.

WSE 2.0 和 3.0 的支援原則為何?

What are the support principles for WSE 2.0 and 3.0?

WSE 2.0 與 .NET Framework 1.1 一致,因此提供 5 年的主要支援,以及 5 年的延伸支援 (5+5) 。 如需 WSE 2.0 支援,請參閱產品生命週期日期 - 開發人員工具系列Microsoft 支援服務生命週期

WSE 2.0 is consistent with.NET Framewerk 1.1 and therefore provides five years of major support, as well as five years of extension support (5+5). For WSE 2.0 support, please refer to and .

WSE 3.0 支援與 .NET Framework 2.0 一致。

WSE 3.0 support is consistent with.NET Framework 2.0.

WSE 2.0 大幅簡化安全 Web 服務的開發和部署,方法是讓開發人員將訊息層級安全性新增至以服務方向原則和新興 Web 服務為基礎建置的應用程式, (WS-*) 規格。

WSE 2.0 significantly streamlines the development and deployment of security Web services by allowing developers to increase the security of information layers to a new (WS-*)-based application based on service orientation and new and emerging Web services.

本文提供 WSE 3.0 的深入概觀,其新增了重要的新功能,包括透過多個傳輸啟用 ASMX 程式設計模型、簡化的安全性原則來啟用周全的安全性傳訊案例、傳送大量二進位資料的 MTOM、與 Indigo 的互通性,以及符合最新的 Web 服務規格。 根據使用 Visual Studio 輕鬆建置安全 Web 服務、簡化服務導向系統的開發,以及提供 Indigo 的逐步解說,WSE 3.0 版本會持續提供生產力、可延伸且便於使用的平臺,立即開發安全的 Web 服務。

This paper provides an in-depth overview of WSE 3.0, which adds important new features, including the use of multiple transfer-enabled ASMX program design models, simplified safety principles to enable the full range of safety communications cases, MTOM for sending large amounts of binary data, interconnectivity with Indigo, and compliance with the latest Web service code. Based on the use of Visual Studio to lighten the construction of a secure web service, the development of simplified service to the system, and the provision of Indigo's progressive interpretation, a secure Web service will be launched immediately, based on the use of the Visual Studio service, which provides a living, extendable and user-friendly platform for version 3.0.

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 支付領域投下震撼彈!美國數位銀行Chime疑與GuardPay 神盾支付合作!

    支付領域投下震撼彈!美國數位銀行Chime疑與GuardPay 神盾支付合作!
    2020年,新冠肺炎(COVID-19)疫情加速數位貨幣進展。例如:2019年4月,國際清算銀行(BIS)的調查顯示,在全球66家中央銀行中,沒有一家計畫發行跨境支付的數位貨幣。惟到了2020年10月,BIS支付委員會主席康利夫(Jon Cunliffe)指出,肺炎疫情拉高民眾對無現金支付的需求,迫使各國加快數位貨幣的研發進程日本與韓國於2021年進入數位貨幣試驗階段。直到2019年12月,美國聯邦準備理事會(Fed)都尚無數位貨幣規劃,惟到了2020年2月,Fed已開始研擬...
  • 区块链:交易系统开发指南

    区块链:交易系统开发指南
    播报编辑《区块链:交易系统开发指南》使用通俗易懂的语言,从技术的角度详细介绍了区块链交易系统应有的功能架构及工作原理,让人们能够张开双臂轻松地拥抱区块链技术,享受区块链交易系统带来的惊喜与成就感。《区块链:交易系统开发指南》共分 7 章,第 1~2 章主要介绍区块链及数字货币的基本概念,以及各种公有链的 API 接口;第3~5 章主要介绍区块链交易系统的分类架构及功能; 6 章主要介绍区块链交易系统面临的问题及演进方向;第 7 章对全书做了总结。《区块链:交易系统开发指南》是...
  • 5.14加密货币价格:BTC突破6.2万美元以太坊和山寨币反映市场情绪

    5.14加密货币价格:BTC突破6.2万美元以太坊和山寨币反映市场情绪
    今天,随着比特币(BTC)的价格突破62 000美元的门槛,顶级加密货币的价格反弹了。 此外,以铁大幅上涨,维持在2 900美元的水平。 此外,其他顶尖山硬币,如索拉纳(SOL )、XRP、卡达诺(ADA )也大幅上涨。    今天密钥加密货币价格 1. 比特币价格    在5月14日星期二撰写本文时,比特币价格上升了2.57%,达到62 487.50美元。 另一方面,在过去24小时内,交易量从65.26 % 急剧上升至277亿美元。 与此同时,加密货币的市场价值为...
  • OKEx回应用户质疑:合约交易非期货 平台无机器人

    OKEx回应用户质疑:合约交易非期货 平台无机器人
       热点点 自选股份 数据中心 数据中心 研究和资料中心 资金流动 模拟交易 客户客户 具体来说,OKEx回答用户的问题:合同交易不是期货,平台不是机器人。 金融同步化,3月22日。    昨天下午,OKEx公司就维护先前用户线下的权利问题对同步财务公司作出了回应,指出OKEx公司提供的合同交易不是期货交易,在旗下的业务中没有正式的机器人。 同时,OKEX称,它不会以非法为由对任何投资损失索赔作出答复。 答复全文如下: 同步你的财务! 近日来,...
  • 0.00006694个比特币等于多少人民币/美金

    0.00006694个比特币等于多少人民币/美金
    0.00006694比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00006694比特币等于4.53424784美元/32.5436 16人民币。比特币(BTC)美元(USDT)人民币(CNY)0.000066944.53424784【比特币密码】32.82795436 16比特币对人民币的最新汇率为:490408.64 CNY(1比特币=490408.64人民币)(1美元=7.24人民币)(0.00006694USDT=0.0004846456 CNY)汇率更新时...
标签列表