When disabling a web service from exposing metadata by setting the HTTPGetEnabled configuration setting in the web service web.config file to False; and the Host Server is restarted or the service instance refreshed, an exception is thrown when the SmartObject is executed.
- Create an Endpoint WCF Service instance and configure it to point to a web service
- Create a SmartObject
- Edit the Web Service web.config and change the HTTPGetEnabled property to False
- Restart the K2 service
- Try executing the SmartObject again. An exception is raised.
As of K2 blackpearl 4.6.8, there is a new Service Key setting available when registering or editing the Service Instance called Store Service Metadata and by default is set to False.
- When creating a new service instance or updating an existing one, the HTTPGetEnabled configuration setting for the web service must always be set to True, as K2 needs access to the required service metadata.
- Set the Store Service Metadata field to True while creating\updating the service instance.
- Set HTTPGetEnabled configuration setting to False.
- Now the Host Server can be restarted and the SmartObject can be successfully executed.
Note that if you need to refresh the service instance to discover changes to the service you will need to perform these same steps again.