News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
namespace ContosoWCF
{
[ServiceContract]
public interface IRateService
{
[OperationContract]
decimal GetCurrentRate();
}
public partial class RateService : IRateService
{
public decimal GetCurrentRate()
{
decimal currentRate = GetRateFromDatabase();
return currentRate;
}
}
}

You build the service library and deploy its assembly to an IIS application. You need to ensure that the GetCurrentRate method can be called from JavaScript. What should you do?

  1. Add a file named Service.svc to the IIS application.
    Add the following code segment to the file.

    <%@ ServiceHost Service="ContosoWCF.IRateService" Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" %>
    
  2. Add a file named Service.svc to the IIS application.
    Add the following code segment to the file.

    <%@ ServiceHost Service="ContosoWCF.RateService" Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" %>
    
  3. Apply the script service attribute to rate serice class Rebulid the WCF servicelibrary, and redploy the assembly to the IIS application.

  4. Apply the Web get attibute to the Get Currant rate interface Method.Rebuild the WCF servicelibrary, and redploy the assembly to the IIS application.

Answer: Answer is b
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;