The target is: I need a wcf method which will create user in the database.
I am using membership provider. and My client is SmartPhone/mobile device.
I wrote a method which will create user BUT when I test the method I get the following error.
error:
An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax. Parameter name: connectionString
And I get this error in the following line:
Membership.CreateUser(name, password,email,"question","answer",true,out createStatus);
I am using the same connectionString that I use to read data from the database.
My connection string is:
<add name="MajangoEntities" connectionString="metadata=res://*/EntityModel.MajangoEntityModel.csdl|res://*/EntityModel.MajangoEntityModel.ssdl|res://*/EntityModel.MajangoEntityModel.msl;provider=System.Data.SqlClient;provider connection string="data source=tcp:sql2k298.discountasp.net;initial catalog=SQL2008R2_835021_myddb;user id=SQL2008R2_835021_mydb_user;password=mypassword;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
Can anybody help me with some ideas??