Search code examples
web-servicesinfopathclass-libraryinfopath-2007

Infopath + Class Libraray + Webservice = could not find default endpoint element that references contract


Ok, this question has been answered many times. But not for this scenario. I created new 'Infopath Form Template' project, added new Class Library project to the solution and then created a Web Service proxy in that Class Library. When I try to create an instance of the Web Service client proxy I get this exception.

The usual solution is to copy the app.config into the Windows/Web application, but what about Infopath Form Template? I tried just adding the app.config to the project, but it didn't work.

Does anyone have an idea?

Thanks! Michael


Solution

  • What eventually worked for me: I created a solutions which contains only the Class Library project with the service. I edited the Form code using VSTA project (not form template project in regular Visual Studio), and copied there the app.config.

    Works :)