I have My Interface as :
[ServiceContract]
interface IDataRetrieve
{
[OperationContract]
SqlConnection CreateSQLConnection(string connectionString);
//DataSet GetSQLData(SqlConnection sqlConnection);
}
and the Implementation as:
[DataContract]
public class DataRetriever:IDataRetrieve
{
[OperationBehavior]
public SqlConnection CreateSQLConnection(string connectionString)
{
SqlConnection connection = new SqlConnection(connectionString);
return connection;
}
}
Now while trying to access the service , getting unaccessible error.
The moment I change the return type of the method as void , service starts working. What am I doing wrong?