Bouthaina Tlijani

Bouthaina Tlijani

  • NA
  • 265
  • 22.8k

cannot access wcf service hosted in iis

Feb 1 2018 5:21 AM
Hello Guys,
 
I want to deploy my wcf service in iis and actually i'm getting this error :
 
ERREUR HTTP 500.19 - INTERNAL SERVER ERROR
You cannot access the page you requested because the related configuration data for the page is not valid.
 
this is my web.config
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <configuration>  
  3. <connectionStrings>  
  4. <add name="MyDbConn" connectionString="Data Source= BTI-LAPTOP\SQLEXPRESS2014; Integrated Security=true;Initial Catalog= icemwebappDB; uid=YourUserName; Password=yourpassword; " providerName="System.Data.SqlClient" />  
  5. </connectionStrings>  
  6. <appSettings>  
  7. <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />  
  8. </appSettings>  
  9. <system.web>  
  10. <compilation debug="true" targetFramework="4.5" />  
  11. <httpRuntime targetFramework="4.5"/>  
  12. </system.web>  
  13. <system.serviceModel>  
  14. <services>  
  15. <service behaviorConfiguration="CodeDefautServiceBehavior" name="icemRESTws.AccessService">  
  16. <endpoint address="" behaviorConfiguration="RESTEndpointBehavior"  
  17. binding="webHttpBinding" contract="icemRESTws.IAccessService" />  
  18. </service>  
  19. </services>  
  20. <behaviors>  
  21. <endpointBehaviors>  
  22. <behavior name="RESTEndpointBehavior">  
  23. <webHttp />  
  24. </behavior>  
  25. </endpointBehaviors>  
  26. <serviceBehaviors>  
  27. <behavior name="CodeDefautServiceBehavior">  
  28. <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />  
  29. <serviceDebug includeExceptionDetailInFaults="false" />  
  30. </behavior>  
  31. <behavior name="">  
  32. <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />  
  33. <serviceDebug includeExceptionDetailInFaults="false" />  
  34. </behavior>  
  35. </serviceBehaviors>  
  36. </behaviors>  
  37. <protocolMapping>  
  38. <add binding="basicHttpsBinding" scheme="https" />  
  39. </protocolMapping>  
  40. <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />  
  41. </system.serviceModel>  
  42. <system.webServer>  
  43. <httpProtocol>  
  44. <customHeaders>  
  45. <add name="Access-Control-Allow-Origin" value="*" />  
  46. </customHeaders>  
  47. </httpProtocol>  
  48. <modules runAllManagedModulesForAllRequests="true"/>  
  49. <!--  
  50. Pour parcourir le répertoire racine de l'application Web lors du débogage, définissez la valeur ci-dessous sur true.  
  51. Définissez-la sur false avant le déploiement pour ne pas divulguer d'informations du dossier de l'application Web.  
  52. -->  
  53. <directoryBrowse enabled="true"/>  
  54. </system.webServer>  
  55. </configuration>  
help please :(

Answers (2)