I am gettting the following error...
HTTP Error 500.22 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
Most likely causes:
- This application defines configuration in the system.web/httpModules section.
++++++++++++++ IPaymentRESTService.cs +++++++++++++++++++++++++++
using System.ServiceModel;
using System.ServiceModel.Web;
namespace PayMentRESTService
{
[ServiceContract]
public interface IPayMentService
{
[OperationContract]
[WebInvoke(Method = "GET", UriTemplate = "/PayBill/{PayId}", BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
string PayBill(string PayId);
}
}
+++++++++++++++++ PaymentRESTService.svc.cs +++++++++++++++++++++++++++++++++++++++
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace PayMentRESTService
{
public class PayMentService : IPayMentService
{
public string PayBill(string PayId)
{
{
return "Transaction having PayId " + PayId + " was successful";
}
}
}
}
++++++++++++++++++++++++++ web.config ++++++++++++++++++++++++++++++++++
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.6"/>
<httpRuntime targetFramework="4.6"/>
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
</httpModules>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service name="PayMentRESTService.PayMentService" behaviorConfiguration="ServiceBehavior">
<endpoint binding="webHttpBinding" contract="PayMentRESTService.IPayMentService" behaviorConfiguration="web">
</endpoint>
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<!--<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>-->
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>