Reputation: 55
i've got installer class in client project
public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
using (ServiceReference1.ClientClient client = new ServiceReference1.ClientClient())
{
if (!client.Register(Context.Parameters["firstname"], Context.Parameters["lastname"], Context.Parameters["email"], Context.Parameters["password"]))
{
throw new InstallException("Email address is already used");
}
}
}
Result: Could not find default endpoint element that references contract 'ServiceReference1.IClient' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
Any ideas to fix it?
Upvotes: 0
Views: 311
Reputation: 12680
WCF looks for a YourInstallerAssemblyName.EXE.config file for configuring the WCF client (Service Reference) your installer code is using. The file needs to contain the serviceModel
element from the app/web.config file where you create the Service Reference.
Upvotes: 0