Learn About MCSD Microsoft .NET Skills

Posted on

These questions are based on Cert-70-554VB: MSCert: UPGRADE: MCSD Microsoft .NET Skills to MCPD Enterprise Application Developer Using the Microsoft .NET Framework: Part 2 – Section 1.

A Self Test Software Practice Test

Objective: Create and Access XML Web services.
Sub-objective: Create and configure an XML Web-service method.

Single answer, multiple-choice

You are an enterprise application developer at Verigon Corp. You are creating an XML Web service named ClaimService for an insurance organization. The Web service connects to multiple data sources, including a DB2 and SQL Server 2005 database to retrieve and process customer claim data. The ClaimService Web service is defined as follows:

Public Class ClaimService
Inherits WebService
<WebMethod()> _
Public Function ProcessClaim(ByVal ClaimID As String) As Integer
‘Implementation code
End Function
End Class

The ProcessClaim method must authenticate with each database using the network credentials of the client application. The client application requires all users to log in to the Windows domain before processing or accessing claim data. Which code should you use to invoke the ProcessClaim method?

A.    Dim proxy As New ClaimService
Dim nc As New System.Net.NetworkCredential(“CurrentUser”,”Pa$$w0rd”)
Dim cc As New System.Net.CredentialCache()
cc.Add(New Uri(proxy.Url), “Basic”, nc)
proxy.Credentials = cc
proxy.ProcessClaim(“1001″)

B.    Dim proxy As New ClaimService
proxy.Credentials = System.Net.CredentialCache.DefaultCredentials
proxy.ProcessClaim(“1001″)

C.    Dim proxy As New ClaimService
Dim cc As New System.Net.CredentialCache()
proxy.Credentials = cc.DefaultNetworkCredentials
proxy.ProcessClaim(“1001″)

D.    Dim proxy As New ClaimService
proxy.Credentials =
a.    System.Net.CredentialCache.DefaultNetworkCredentials
proxy.ProcessClaim(“1001″)

Answer:
D.    Dim proxy As New ClaimService
proxy.Credentials =
a.    System.Net.CredentialCache.DefaultNetworkCredentials
proxy.ProcessClaim(“1001″)

Tutorial:
You should use the following code to invoke the ProcessClaim method with the current client log-in credentials:

Dim proxy As New ClaimService
proxy.Credentials =
System.Net.CredentialCache.DefaultNetworkCredentials
proxy.ProcessClaim(“1001″)

This code is correct because it sets the Credentials property of the Web proxy to the network credentials of the current security context and then calls the Web method. This code instantiates a ClaimService Web proxy and sets the Credentials property to the DefaultNetworkCredentials property of the CredentialCache class. When the ProcessClaim method is invoked the domain credentials will be sent to the ClaimService Web service for authentication with the required databases.

The CredentialCache class is used to store credentials for multiple resources. Whenever such a resource is requested, the credentials for the resource are retrieved from the CredentialCache class for authentication. This class has two properties:

•    DefaultCredentials: Retrieves the local system credentials of the current security context. The system credentials refer to the account(s) on the local machine.
•    DefaultNetworkCredentials: Retrieves the network credentials of the current security context. The network credentials refer to the local account(s) impersonated across the network or Windows domain.

You should not use the following code to invoke the ProcessClaim method with the current client log-in credentials:

Dim proxy As New ClaimService
Dim nc As New System.Net.NetworkCredential(“CurrentUser”,”Pa$$w0rd”)
Dim cc As New System.Net.CredentialCache()
cc.Add(New Uri(proxy.Url), “Basic”, nc)
proxy.Credentials = cc
proxy.ProcessClaim(“1001″)

This code does not specify the current network credentials of the client application because it codes new network credentials. It instantiates a new NetworkCredential object with the username and password as “CurrentUser” and “Pa$$w0rd”, respectively. The code then instantiates a CredentialCache object and adds the NetworkCredential object. The Add method takes three parameters: the Uniform Resource Identifier (URI) of the Web service, the authentication protocol (Basic, Digest or Integrated) as a string and NetworkCredential instance.

Then the Credentials property of the Web proxy is set to CredentialCache object, and the ProcessClaim method is invoked. This will send new network credentials to the ClaimService Web service. In this scenario, you should use the DefaultNetworkCredentials property to specify the network credentials of the current client log-in.

You should not use the code that specifies the DefaultCredentials property because this does not represent the network credentials for the current client log-in. The DefaultCredentials property indicates the system credentials on the local machine, not the credentials across the network. In this scenario, you should use the DefaultNetworkCredentials property to specify the network credentials of the current client log-in.

You should not use the code that instantiates a CredentialCache object and specifies the DefaultNetworkCredentials property because this property is a class member. Thus, you do not need to and should not instantiate a CredentialCache object to specify the DefaultNetworkCredentials property.

References:
MSDN2 Library, Search, “.NET Development,” “.Net Framework SDK,” “Class Library Reference,” “System.Net,” “CredentialCache Class.”

MSDN2 Library, Search, “.NET Development,” “.Net Framework SDK,” “Class Library Reference,” “System.Net,” “NetworkCredential Class.”

MSDN2 Library, Search, “.NET Development,” “.Net Framework SDK,” “Class Library Reference,” “System.Net,” “CredentialCache Class,” “DefaultNetworkCredentials Property.”

Objective: Configure and customize a Web-service application.
Sub-objective: Configure SOAP messages.

Single answer, multiple-choice

As an enterprise application developer, you have created the following Web service for Verigon Corp. contractors:

<WebServiceBinding(Name:=”PartnerBinding”, _
Namespace:=”http://www.GeoTrek.com/Verigon”)> _
<WebServiceBinding(Name:=”ExternalBinding”, _
Namespace:=”http://www.Verigon.com/External”, _
Location:=”http://www.Verigon.com/External/ContractSevice.xsd”)> _
<WebService(Namespace:=”http://www.Verigon.com/internal”)> _
Public Class ContractService
Inherits System.Web.Services.WebService

Public Sub MakePayment(ByVal amount As Double)
‘implementation
End Sub

Public Sub AdjustRate(ByVal amount As Double)
‘implementation
End Sub
End Class

The MakePayment method should be available to external contractors while the AdjustRate method must remain internal to Verigon. What should you do?

A.    Apply the following attribute to the MakePayment method:
<SoapDocumentMethod (Binding := “PartnerBinding”)> _
Apply the following attribute to the AdjustRate method:
<SoapDocumentMethod (Binding = “ExternalBinding”)> _
B.    Apply the following attribute to the AdjustRate method:
<SoapDocumentMethod (Binding = “VerigonBinding”)> _
C.    Apply the following attribute to the MakePayment method:
<SoapDocumentMethod (Binding = “ExternalBinding”)> _
D.    You do not need to do anything in this scenario.

Answer:
C.    Apply the following attribute to the MakePayment method:
<SoapDocumentMethod (Binding = “ExternalBinding”)> _

Tutorial:
You should apply the following attribute to the MakePayment method as follows:

<SoapDocumentMethod (Binding = “ExternalBinding”)> _
Public Sub MakePayment(ByVal amount As Double)
‘implementation
End Sub

This will bind the MakePayment Web method to the binding named ExternalBinding, while the AdjustRate will remain available only through the default binding.

A binding is an interface of ports and operations in a Web service. Each binding represents a different set of available Web methods accessible through specified ports. To specify the available bindings for a Web service, the WebServiceBinding attribute is applied to the Web service. You either use the default binding for a Web service method or explicitly specify a binding by using the Binding property of the SoapDocumentMethod or SoapRpcMethod attributes.

The WebServiceBinding attribute has five properties for each binding you apply to a Web service:

•    Name: The name of the binding. This is used internally as the Binding property for the SoapDocumentMethod or SoapRpcMethod attribute.
•    Namespace: The namespace for the messages of the binding. If not specified, the default namespace is used.
•    Location: The location where the binding messages are defined. If not specified, the binding is assumed to be defined in the current Web-service WSDL file. The WebServiceBinding attribute also provides two other properties:
o    ConformsTo: The Web Service Interoperability (WS-I) specification to which the binding conforms. The only supported WS-I profile is currently the Basic Profile Version 1.1 (BasicProfile1_1).
o    EmitConformanceClaims: Whether or not the conformance specified in the ConformsTo property is provided when a WSDL description of the Web service is published.

You should not associate the MakePayment method with the PartnerBinding binding and the AdjustRate method with the ExternalBinding binding because the MakePayment method should be external to all contractors and the AdjustRate method should be locally available only. You should have associated the MakePayment method with the ExternalBinding binding and kept the AdjustRate method associated with the local binding.

You should not associate the AdjustRate method with the VerigonBinding binding because no such binding is specified using the WebServiceBinding attribute. You should have associated the MakePayment method with the ExternalBinding binding and kept the AdjustRate method associated with the local binding.

If you do nothing in this scenario, both the MakePayment and AdjustRate methods will remain with the local binding by default. In this scenario, MakePayment method should be external to all contractors. You should have associated the MakePayment method with the ExternalBinding binding.

References:
MSDN2 Library, Search, “.NET Development,” “.Net Framework SDK,” “Class Library Reference,” “System.Web.Services.Protocol,” “SoapDocumentMethodAttribute Class,” “Binding Property.”

MSDN2 Library, Search, “.NET Development,” “.Net Framework SDK,” “Class Library Reference,” “System.Web.Services,” “WebServiceBindingAttribute Class.”

Objective: Create, configure and deploy remoting applications.
Sub-objective: Create a client application to access a remote object.

Single answer, multiple-choice

As an enterprise application developer, you have created a .NET remoting application on the server TestMachine that provides a server activated object (SAO) remote type named ProductService. The SAO remote type is a singleton object that uses the TCP port 8800 for communication.

You need to create a client application to consume the remote ProductService object. Which code should you add to the client application configuration file?

A. <system.runtime.remoting>
<application>
<client>
<wellknown
type=”ProductService, Product”
url=”tcp://TestMachine:8800/ProductService” />
</client>
</application>
</system.runtime.remoting>

B. <system.runtime.remoting>
<application>
<service>
<wellknown
type=”ProductService, Product”
url=”tcp://TestMachine:8800/ProductService” />
</service>
</application>
</system.runtime.remoting>

C. <system.runtime.remoting>
<application>
<client>
<wellknown mode=”Singleton” type=”ProductService, Product”
objectUri=”ProductService” />
</client>
<channels>
<channel ref=”tcp” port=”8800″ />
</channels>
</application>
</system.runtime.remoting>

D. <system.runtime.remoting>
<application>
<service>
<wellknown mode=”Singleton” type=”ProductService, Product”
objectUri=”ProductService” />
</service>
<channels>
<channel ref=”tcp” port=”8800″ />
</channels>
</application>
</system.runtime.remoting>

Answer:
A. <system.runtime.remoting>
<application>
<client>
<wellknown
type=”ProductService, Product”
url=”tcp://TestMachine:8800/ProductService” />
</client>
</application>
</system.runtime.remoting>

Tutorial:
You should add the following code to the client application configuration file to consume the remote ProductService object:

<system.runtime.remoting>
<application>
<client>
<wellknown
type=”ProductService, Product”
url=”tcp://TestMachine:8800/ProductService” />
</client>
</application>
</system.runtime.remoting>

This code applies the client and wellknown elements for server-activated object remote types in a client application and specifies the remote type and remote URL as the TCP port number 8800 on the TestMachine server.

In .NET remoting, remote types can be classified according to activation:

•    Server-activated Object (SAO): SAO remote types are created and controlled by the server application. The remote object is created on the server, and the server controls the lifetime of the remote object. SAO remote types, also referred to as “well-known” remote types, have two object modes: SingleCall and Singleton.
SingleCall SAO remote types are instantiated or activated every time a method is invoked. The remote object does not maintain state between method invocations. Singleton SAO remote types remain in memory for a specified time and are not deactivated between method invocations.
In Singleton mode, the client invokes methods on the same remote object, whereas in SingleCall the client invokes a method on a different remote object.
•    Client-activated Object (CAO): CAO remote types are created and controlled by the client application. The remote object is created on the server, but the client makes the creation request and controls the lifetime of the remote object.

You must register the remote types either programmatically or through configuration files on both the server and client. A remote type registration is included in a remoting application. The remoting application must define a channel (IPC, TCP or HTTP) and port for communication and a registration entry in the application for each remote type.

On the client application, the client element is used for client registration. Either the wellknown or activated element should be specified whether the remote object is SAO or CAO. Both of these elements specify the displayName, type and url attributes for contacting the remote object in the server application.

On the server application, the service element is used for server registration. When registering an SAO, the wellknown element specifies the mode, type and objectUri attributes. When registering a CAO, the activated element specifies only the type attribute.

You should not use the codes that specify the service element because these codes are used for server registration in the server application of remote type, not client registration. You should specify the client element in the client application configuration file.

You should not use the codes that specify the mode and objectUri attributes, but do not specify the url attribute for the wellknown element because this client registration only requires the type and url attribute. Server registration requires the other attributes in the wellknown element. If used, an exception will be thrown.

Reference:
MSDN2 Library > Development Tools and Languages > Visual Studio > .NET Framework Programming in Visual Studio > .NET Framework Core Development > Configuration > Registering Remote Objects Using Configuration Files > Client-Side Registration

Objective: Implement asynchronous calls and remoting events.
Sub-objective: Call Web methods asynchronously.

Single answer, multiple-choice

You are an enterprise application developer at Globecomm Corp. You are developing an ASP.NET 2.0 Web application for customers to renew their existing insurance policies. The Web application consumes a Web service named InsuranceSolutionService.

The InsuranceSolutionService Web service is defined as follows:

Public Class InsuranceSolutionService
Inherits WebService
<WebMethod()> _
Public Function RenewPolicy(ByVal number As Integer, _
ByVal amount As Single, ByVal duration As Integer) As Boolean
‘Implementation code
End Function
End Class

One of the Web pages, RenewPolicy.aspx, has a button for customers to renew their existing policies. When a user clicks the RenewPolicyButton Web control in the client Web application, the RenewPolicy method should be invoked before displaying the next Web page to the user. You enable the asynchronous operations on the page.

The RenewPolicy method takes a significant amount of time to complete execution. While the RenewPolicy method is executing, the user should be taken to the next page in the Web application. Which code should you use to invoke the RenewPolicy Web method?

A. Protected Sub RenewPolicyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim proxy As New InsuranceSolutionService()
proxy.RenewPolicy(policyNumber, amount, 365)
Server.Transfer(“RenewalProcess.aspx”)
End Sub
B. Protected Sub RenewPolicyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim proxy As New InsuranceSolutionService()
AddHandler proxy.RenewPolicyCompleted, AddressOf RenewPolicyCompleted
proxy.RenewPolicyAsync(policyNumber, amount, 365)
Server.Transfer(“RenewalProcess.aspx”)
End Sub

Protected Sub RenewPolicyCompleted(ByVal sender As Object, _
ByVal args As RenewPolicyCompletedEventArgs)
‘process the results
End Sub
C. Protected Sub RenewPolicyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim proxy As New InsuranceSolutionService()
Dim aResult As IAsyncResult = _
proxy.BeginRenewPolicy(policyNumber, amount, 365, Nothing, Nothing)
aResult.AsyncWaitHandle.WaitOne()
proxy.EndRenewPolicy(aResult)
Server.Transfer(“RenewalProcess.aspx”)
End Sub
D. Protected Sub RenewPolicyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim proxy As New InsuranceSolutionService()
proxy.RenewPolicy( policyNumber, amount, 365 )
Response.Redirect( “RenewalProcess.aspx” )
End Sub

Answer:
B. Protected Sub RenewPolicyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim proxy As New InsuranceSolutionService()
AddHandler proxy.RenewPolicyCompleted, AddressOf RenewPolicyCompleted
proxy.RenewPolicyAsync(policyNumber, amount, 365)
Server.Transfer(“RenewalProcess.aspx”)
End Sub

Protected Sub RenewPolicyCompleted(ByVal sender As Object, _
ByVal args As RenewPolicyCompletedEventArgs)
‘process the results
End Sub

Tutorial:
You should use the following code to invoke the RenewPolicy method asynchronously and take the user to the next page in the meantime:

Protected Sub RenewPolicyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim proxy As New InsuranceSolutionService()
AddHandler proxy.RenewPolicyCompleted, AddressOf RenewPolicyCompleted
proxy.RenewPolicyAsync(policyNumber, amount, 365)
Server.Transfer(“RenewalProcess.aspx”)
End Sub

Protected Sub RenewPolicyCompleted(ByVal sender As Object, _
ByVal args As RenewPolicyCompletedEventArgs)
‘process the results
End Sub

This code uses the RenewPolicyCompleted event and invokes the RenewPolicyAsync method for asynchronous programming. The code then invokes the Transfer method on the Server object to transfer processing to the next page while waiting for the asynchronous result.

In the .NET Framework 2.0, Web methods can be called asynchronously using the proxy method XXXAsync and the XXXCompleted event. For example, if the synchronous method was named GetData, then the asynchronous method would be GetDataAsync and the associated event would be GetDataCompleted.

The XXXAsync method takes the same arguments as its synchronous version, and the event handler assigned to the XXXCompleted event will execute once the asynchronous invocation is complete. The Result property of the XXXCompletedEventArgs parameter is used to access the return results.

In the .NET Framework 1.0 and above, Web methods can also be called asynchronously by clients using the proxy class methods BeginXXX and EndXXX. For example, if the synchronous method was named GetData, then the asynchronous methods would be BeginGetData and EndGetData. The BeginXXX method accepts the same arguments as the synchronous version, as well as two other arguments: an AsyncCallback delegate to invoke when complete and an argument of type object for passing data to the AsyncCallback delegate.

The BeginXXX method returns an instance of type IAsyncResult to monitor the asynchronous invocation. This instance is used by the EndXXX method to retrieve the results. Based on when and how the EndXXX method is invoked, the following techniques can be implemented:

•    Waiting: In this technique, you use the AsyncWaitHandle property of the IAsyncResult object to wait for the WaitHandle instance to receive a complete signal and then invoke the EndXXX method. This will block the executing thread until the WaitHandle condition is satisfied (more on the WaitHandle class below).
•    Polling: In this technique, you can poll the IAsyncResult object by checking its IsCompleted property. When the value of the IsCompleted property is True, the EndXXX method can be invoked. This will block the executing thread only while checking the IsCompleted property.
•    Callback: In this technique, you pass an AsyncCallback delegate to the BeginXXX method. The callback delegate will execute the specified method on a separate thread when the asynchronous invocation is complete. The method will then invoke the EndXXX method and retrieve the results.

You should not use the codes that invoke the synchronous RenewPolicy Web method because these codes do not invoke the RenewPolicy method asynchronously. It does not matter whether the Server.Transfer or Response.Redirect method is invoked because the RenewPolicy method is not invoked asynchronously, and in both cases, the next page will display only after being blocked by the synchronous operation. You should invoke the BeginRenewPolicy or RenewPolicyAsync methods to perform an asynchronous operation.

You should not use the code that invokes the WaitOne method because this will block the asynchronous operation until it completes. You should not use the WaitHandle class in this scenario because no waiting is required.

The WaitHandle class enables classes to implement a signaling mechanism for exclusive access to a shared resource. The WaitHandle class has three important methods to block execution based on thread signals: WaitAll, WaitOne and WaitAny.

•    WaitAll: This method accepts an array of WaitHandle instances and blocks execution only when all the elements in the array have received a complete signal. This is a class member.
•    WaitOne: This method returns control only when the current WaitHandle instance receives a complete signal. This is an instance member.
•    WaitAny: This method accepts an array of WaitHandle instances and blocks execution until one of the elements in the array has received a complete signal. It returns the element index that completed. This is a class member.

References:
MSDN2 Library > Development Tools and Languages > Visual Studio > Windows-based Applications, Components, and Services > XML Web Services in Managed Code > Accessing XML Web Services in Managed Code > How to: Access an XML Web Service Asynchronously in Managed Code

MSDN2 Library > Development Tools and Languages > Visual Studio > Windows-based Applications, Components, and Services > XML Web Services in Managed Code > XML Web Services Created Using ASP.NET and XML Web Service Clients > Building XML Web Service Clients > Communicating with XML Web Services Asynchronously

MSDN2 Library, Search, “.NET Development,” “.Net Framework SDK,” “Class Library Reference,” “System.Threading,” “WaitHandle Class,” “WaitHandle Methods.”

Objective: Implement Web-services enhancements (WSE) 3.0.
Sub-objective: Enable WSE in client and server applications.

Single answer, multiple-choice

As an enterprise application developer, you want to enable WSE 3.0 on an existing Web service. This Web service has never been WSE enabled. What should you do?

A. Add a reference to the Microsoft.Web.Services3 assembly and the following to the web.config:
<configSections>
<section name=”microsoft.web.services3″
type=”Microsoft.Web.Services3.Configuration.WebServicesConfiguration,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35″ />
</configSections>

B. Add a reference to the Microsoft.Web.Services3 assembly and the following to the web.config:
<system.web>
<webServices>
<soapServerProtocolFactory       type=”Microsoft.Web.Services3.WseProtocolFactory,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35″ />
</webService>
</system.web>

C. Add a reference to the Microsoft.Web.Services3 assembly and the following to the web.config:
<soapExtensionTypes>
<add type=”Microsoft.Web.Services3.WebServicesExtension,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35″ priority=”1″ group=”0″ />
</soapExtensionTypes>

D. Add a reference to the Microsoft.Web.Services3 assembly and have the Web service inherit from the WebServicesProtocol class.

Answer:
B. Add a reference to the Microsoft.Web.Services3 assembly and the following to the web.config:
<system.web>
<webServices>
<soapServerProtocolFactory       type=”Microsoft.Web.Services3.WseProtocolFactory,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35″ />
</webService>
</system.web>

Tutorial:
To enable WSE 3.0 for a Web service, you should add a reference to the Microsoft.Web.Services3 assembly and the following to the web.config:

<system.web>
<webServices>
<soapServerProtocolFactory       type=”Microsoft.Web.Services3.WseProtocolFactory,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35″ />
</webService>
</system.web>

This configures the WseProtocolFactory class to intercept SOAP messages to process the Web-service specifications that WSE 3.0 supports. The WseProtocolFactory class is located within the Microsoft.Web.Services3 assembly, so you must also add a reference to that assembly. Also, if you need to configure WSE 3.0 through configuration elements, you should also add the following to the web.config file:

<configSections>
<section name=”microsoft.web.services3″
type=”Microsoft.Web.Services3.Configuration.WebServicesConfiguration,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35″ />
</configSections>

The WSE Settings 3.0 Tool will automatically add this section and the library reference when enabling WSE 3.0. To add the soapServerProtocolFactory element automatically, you can check the Enable WSE 3.0 Soap Protocol Factory checkbox.

You should not add the section element to the configSections section of the web.config because this will only enable WSE 3.0 configuration elements in the web.config. This will not enable the Web service to intercept SOAP messages to process the Web-service specifications that WSE 3.0 supports. The soapServerProtocolFactory element should be added to the webService section to enable WSE 3.0 for the Web service.

You should not add the soapExtensionTypes element to the web.config because this is how WSE 2.0 is configured, not WSE 3.0. Unlike WSE 2.0 that was implemented as a SOAP extension, WSE 3.0 uses a custom SOAP protocol rather than the default SOAP protocol normally used in ASP.NET 2.0.

The soapServerProtocolFactory element enables a developer to override the default SOAP protocol with a custom implementation. The WseProtocolFactory class provides manages the custom WseProtocol object in WSE 3.0. Although WSE 3.0 still uses a SOAP extension for some functionality, the WseProtocol injects the WseProtocolExtension SOAP extension dynamically at startup.

Thus, no soapExentsionsTypes section is necessary when using WSE 3.0 because the soapServerProtocolFactory element and specified WseProtocolFactory class configure all of the required settings at runtime.

You should not have the Web service inherit from the WebServicesProtocol class because there is no such class in the .NET Framework. The WebServicesClientProtocol is required by the Web client proxy to enabled WSE 3.0, not the Web service. You should add the soapServerProtocalFactory element to the web.config file instead.

Reference:
MSDN Library > .NET Development > Web Services > Programming with WSE > Creating a WSE-enabled Web Service > Web Services Enhancements 3.0 > How to: Configure a Web Service to Use WSE

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
CertMag Staff

ABOUT THE AUTHOR

Certification Magazine was launched in 1999 and remained in print until mid-2008. Publication was restarted on a quarterly basis in February 2014. Subscribe to CertMag here.

Posted in Archive|

Comment: