Alex Rivera | Logout

IIS 7.5 Error on Restful WCF 4.0

Asked 2010-09-13T23:36:59.133
15

I've been trying to do a simple restful wcf service that will return JSON. Its working if i will run it in the development server. However if I deploy it on IIS 7.5, i will have this error when i accessed it using http://localhost:70

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

Config Error The configuration section 'standardEndpoints' cannot be read because it is missing a section declaration

Here is my configuration file: This is the default file generated by the VS2010.

<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
  </system.webServer>

  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
    <standardEndpoints>
      <webHttpEndpoint>
        <!-- 
            Configure the WCF REST service base address via the global.asax.cs file and the default endpoint 
            via the attributes on the <standardEndpoint> element below
        -->
        <standardEndpoint name="LocationService" helpEnabled="true" automaticFormatSelectionEnabled="true"/>
      </webHttpEndpoint>
    </standardEndpoints>
  </system.serviceModel>

</configuration>

Im new to WCF specially on .net 4.0 and IIS 7.5.

Can anybody help? Or anybody has experienced the same and has fixed already?

Edit
Report

1 Answer

-1

Sorry to ask a question that may seem obvious to some, but it might help others (mainly me) if you could clarify the last step:

Then go to Application Pools...

Where do I find Application Pools ?

If you can't tell I am used to working for big companies where someone else did that for me and now I am playing developer and IT director.

Thanks

Ok, after 10 seconds of research (I opened my eyes) and looked right above Sites in IIS Manager

enter image description here

answered 2012-04-17T18:34:09.267

Your Answer