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

2010年3月12日 星期五

70-513 MCTS: WCF Development with Microsoft .NET Framework 4 考試參考大綱

考70-513這科考試除了可以取得 MCTS: Windows Communication Foundation Development with Microsoft .NET Framework 4 之外,也是MCPD: Windows Developer 4 或是 MCPD: Web Developer 4 可以選考的科目之一,基本上WCF到了.NET 4.0的時候並沒有翻天覆地的大改變,雖有新功能的加持,不過底層架構還是一樣,這讓亞當斯慶幸不少。

不像WF 流程那可就真的是翻天覆地的架構大異動,所以我猜想WF的認證考試一定變更難,因此到目前為止,ASP.NET 4.0、ADO.NET 4.0、WCF 的認證範圍都大致上有個雛形了,但是卻尚未看到WF的身影,由此可知一般。

以下整理列出WCF考試的範疇以及配置內容:

Creating Services (20%)

  • Create service and operation contracts.

    This objective may include but is not limited to: one-way, duplex, and request reply; creating and specifying  fault contracts; configuration-based contracts; exposing service metadata; selecting serialization (e.g., data contract serializer vs. XML serializer)

    This objective does not include: designing service and operation contracts; transactions, instantiation, security-related attributes

  • Create data contracts.

    This objective may include but is not limited to: managing Known Types; controlling data serialization; using required and order attributes on data members; implementing versioning using IExtensibleDataObject; POCOs

    This objective does not include: using custom serializer (ISerializationSurrogate)

  • Create message contracts.

    This objective may include but is not limited to: body and header elements; using required and order attributes on members

  • Implement generic message handling.

    This objective may include but is not limited to: creating a catch-all contract; reading and writing messages; working with properties; working with headers

    This objective does not include: inheriting from Message class; using BodyWriter; creating Fault messages

  • Implement RESTful services.

    This objective may include but is not limited to: accessing HTTP context; WebGet/WebInvoke, UriTemplates; JSON/POX

  • Create and configure a Routing service.

    This objective may include but is not limited to: filters, static and dynamic, context-based routing, content-based routing; router interfaces

  • Create and configure a Discovery service.

    This objective may include but is not limited to: configuring ad hoc and managed modes; Discovery scopes; service announcements

Hosting and Configuring Services (18%)

  • Create and configure endpoints.

    This objective may include but is not limited to: default and standard bindings; custom bindings created from standard binding elements; standard endpoints; transports including HTTP, TCP, named pipes, UDP, MSMQ code-based service configuration; message encoding

    This objective does not include: creating a custom binding element; creating new standard endpoints, loading configuration from a location other than the default application configuration file, security, transaction, reliable sessions

  • Configure Behaviors.

    This objective may include but is not limited to: applying service, endpoint, and operation behaviors in configuration and code

    This objective does not include: creating a custom behavior; creating and using dispatch behaviors,loading configuration from a location other than the default application configuration file

  • Implement self hosting.

    This objective may include but is not limited to: configuring and instantiating a service host

    This objective does not include: implementing a custom service host

  • Implement Web server hosting.

    This objective may include but is not limited to: configuring IIS/WAS for WCF; deploying to IIS/WAS; file-less configuration; specifying a ServiceHost

    This objective does not include: Windows Application Server

Consuming Services (19%)

  • Create a service proxy.

    This objective may include but is not limited to: using a proxy class or channel factory to create a proxy; creating a proxy for an asynchronous communication; creating a proxy for a duplex communication

    This objective does not include: SvcUtil command-line switches

  • Configure client endpoints.

    This objective may include but is not limited to: standard bindings, custom bindings created from standard binding elements, configuring behaviors; code-based and configuration-based bindings; configuring addresses

    This objective does not include: security; creating custom behaviors

  • Invoke a service.

    This objective may include but is not limited to: invoking a service operation synchronously and asynchronously; handling service faults ; using the Message class; managing the life cycle of the proxy (open channels, close channels, abort channels, handle faulted channels); implementing duplex communication

  • Consume RESTful services.

    This objective may include but is not limited to: access HTTP context; JSON/POX

  • Implement service Discovery.

    This objective may include but is not limited to: configuring target scope; monitoring service announcements

Securing Services (17%)

  • Configure secure Bindings.

    This objective may include but is not limited to: transport, message, mixed mode

  • Configure message security.

    This objective may include but is not limited to: specifying protection levels on different message parts

  • Implement Authentication.

    This objective may include but is not limited to: Microsoft ASP.NET Membership Provider, Custom Provider, Windows Integrated Security, certificates (X.509), Federated Authentication endpoint identity; configuring client credentials; Custom Validator

    This objective does not include: Geneva Framework

  • Implement Authorization.

    This objective may include but is not limited to: role based, claim based; configuring role providers for endpoints; principal permission attribute

    This objective does not include: rights-management authorization such as Active Directory Rights Management Services (AD RMS)

  • Implement Impersonation.

    This objective may include but is not limited to: configuration and code; configuring WCF-specific Internet Information Services (IIS) impersonation properties; configuring impersonation options; operation-based and service-based

  • Implement security auditing.

    This objective may include but is not limited to: using serviceSecurityAudit behavior, service auditing, audit log

Managing the Service Instance Life Cycle (13%)

  • Manage service instances.

    This objective may include but is not limited to: per call; per session; single; code and configuration; activation and deactivation; durable services; throttling

  • Manage sessions.

    This objective may include but is not limited to: code and configuration; session management attributes; throttling; reliable sessions; transport-level and application-level sessions; invoking a callback contract

  • Implement transactions.

    This objective may include but is not limited to: distributed transactions; transactional queues;transaction flow; configuring transaction binding attributes; WS-AtomicTransaction (WS-AT); transactional behavior attributes at the service and operation level; using transactions in code

  • Manage concurrency.

    This objective may include but is not limited to: single, multiple, and reentrant concurrency modes; SynchronizationContext and CallbackBehavior

    This objective does not include: deadlocks and other multithreading issues

  • Manage consistency between instances, sessions, transactions, and concurrency.

    This objective may include but is not limited to: possible combinations between instances, sessions, transactions, and concurrency (for example, instance mode single with concurrency mode multiple)

Monitoring and Troubleshooting Distributed Systems (14%)

  • Configure message logging.

    This objective may include but is not limited to: configuring message listeners; logging level; message filters; configuring logging known PII

    This objective does not include: secure message logs

  • Configure diagnostics.

    This objective may include but is not limited to: WMI; performance counters; event logging

  • Debug client-service interactions.

    This objective may include but is not limited to: sending server exception details to client; end-to-end tracing; interpreting output from the trace viewer (single message and end to end)

    This objective does not include: tracing viewer features outside of viewing traces

以上大綱整理來自微軟官方網站,如想得知認證更詳細資料,請參考:http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-513&locale=en-us#tab1

2010年1月23日 星期六

WCF Service cant HOST in IIS 7.0 Troubleshooting

這幾天突然心血來潮,想要測試一些ASP.NET整合WCF的功能,因此為了方便測試起見,直覺就是把WCF Service放在IIS 7.0 中,讓IIS自動來控管,興高采烈的新增了一個WCF服務的網站

image

然後先進行service的測試,是否可正常運作,因此把Service.svc跑起來,想說應該是很理所當然的執行成功,沒想到突然IE上出現的錯誤訊息,讓我愣了一下。因為之前都是使用File System的方式建立網站,因此當把WCF實際放到IIS 80 port的路徑下時,就錯誤了。

image

當然,以上的錯誤訊息很明顯是IIS中的"處理常式對應"沒有在IIS對應到svc的副檔名,但是亞當斯想了想,當初明明是IIS先裝再裝vs.net的,因此理論上有關.NET的IIS metadata都會自動安裝完成,怎還會對應不到? (目前猜想中可能是因為之前裝了一些.NET測試小工具,影響到IIS的設定,至於是哪一個小工具,目前尚無法確定),打開IIS的"處理常式對應",發現真的是沒有svc的對應。

解決方式為 :

1.在VS.NET的命令提示字元視窗下指令,先安裝對應的WCF metadata:

C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -i

2.在VS.NET的命令提示字元視窗下指令以查詢設定狀況:

ServiceModelReg.exe -vi

image

此時,在machine的web.config就會自動加入副檔名的執行對應(如下),但是IIS中卻還是不會自動加入。

<add path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />

3.回到IIS 7.0管理工具,設定IIS的處理常式對應,如下圖:

image

並且新增一個svc對應的處理常式:

  • 要求路徑:*.svc
  • 類型:System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
  • 名稱:svc-Integrated。

image

4.設定好之後,執行IIS網站中,任一個已經設計好.svc的服務,就可以呈現正常的服務頁面了。

image