In folder ..\Terrasoft.WebApp\ServiceModel create file VvtTalkdeskChatWebhookHandler.svc and add the following code
Code Block <% @ServiceHost Service = "Terrasoft.Configuration.VvtTalkdesk.Services.VvtTalkdeskChatWebhookHandler" Debug = "true" Language = "C#" %>
In the files ..\Terrasoft.WebApp\ServiceModel\http\services.config and ..\Terrasoft.WebApp\ServiceModel\https\services.config add the following block <services>:
Code Block <services> ... <service name="Terrasoft.Configuration.VvtTalkdesk.Services.VvtTalkdeskChatWebhookHandler"> <endpoint name="VvtTalkdeskChatWebhookHandlerEndPoint" address="" binding="webHttpBinding" behaviorConfiguration="RestServiceBehavior" bindingNamespace="http://Terrasoft.WebApp.ServiceModel" contract="Terrasoft.Configuration.VvtTalkdesk.Services.VvtTalkdeskChatWebhookHandler" /> </service> </services>
In the file ..\Terrasoft.WebApp\Web.config add block<location> to section <configuration>:
Code Block <configuration> ... <location path="ServiceModel/VvtTalkdeskChatWebhookHandler.svc"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location> ... </configuration>
In the file ..\Terrasoft.WebApp\Web.config change attribute 'value' in the section<appSettings>:
Code Block <configuration> ... <appSettings> ... <add key="AllowedLocations" value="[previous values];ServiceModel/VvtTalkdeskChatWebhookHandler.svc" /> ... </appSettings> ... </configuration>
Reload the application in IIS
Configuration for .Net6
In the file appsettings.json to AnonymousRoutes block add
Code Block |
---|
"Terrasoft.Configuration.VvtTalkdesk.Services.VvtTalkdeskChatWebhookHandler": [
"/ServiceModel/VvtTalkdeskChatWebhookHandler.svc"
] |