Author: AshleyRudland | Posted on: 9/22/2008 9:24:50 AM | Views : 277

Hi there,

I have created a WCF service as described below:


using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Web;

namespace WebApplication1
{
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1
{
[OperationContract]
public string DoWork()
{
// Add your operation implementation here
return HttpContext.Current.User.Identity.Name;
}

// Add more operations here and mark them with [OperationContract]
}
}


I am testing this works by using the following:


using System;
using System.Web.Security;

namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
...

Go to the complete details ...