dataservicequeryexception when trying to execute a WCF Data service web get method

polassaxz

New Member
I'm trying to execute a web get method to add a user in the asp membership db. i'm calling the method 'CreateUsr' from the client side. First, i need to log on, and then then the page 'add user' appears but when i try to add the user, i got the dataservicequeryexception. heres the code that cause the exception: \[code\]protected void Button1_Click(object sender, EventArgs e) { Uri u = new Uri(string.Format(LogIn.ctx.BaseUri + "/CreateUsr?name='{0}'&pass='{1}'", New_UserName.Text, New_UserPass.Text), UriKind.RelativeOrAbsolute); LogIn.ctx.Execute(u, "GET"); // this is the code underlined when the excpetion is handled }\[/code\]the code of the createusr webget method: \[code\][WebGet] public static void CreateUsr(string name, string pass) { MembershipUser newUser = Membership.CreateUser(name, pass); }\[/code\]my context is intialised as u can see in the LogIn page and declared as static :\[code\]public static Uri serviceRootUri = new Uri("http://localhost:18024/WcfDataService1.svc/");public static XpoContext ctx = new XpoContext(serviceRootUri);\[/code\]Thanks in advance.
 
Back
Top