Solved

WCF Web.Config Question

Posted on 2011-02-21
6
645 Views
Last Modified: 2012-05-11
Given issues I am having with my classic Web Service, I decided to port everything over to IIS today and I thought I had everything setup properly but I cannot find a reference to the new service.  According to what I have read, all I need to add to my current web.config file is the following:

</system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
  </system.webServer>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

Which I did and then I compiled my website, pushed out the SVC and appcode files and nothing I do brings up a reference to this new service.  I have tried http://localhost/service.svc, http://localhost/service, http://localhost/service.svc?wsdl - and others - and nothing works.

What am I missing?
0
Comment
Question by:ktola
  • 5
6 Comments
 
LVL 12

Accepted Solution

by:
DarinTCH earned 500 total points
ID: 34944771
which version of IIS are you using?

IIS 7 on windows 2003 or 2008?

some of the services we were familiar with in IIS6/2003 are not visible or not even avaialble in IIS7

try outside of the browser

that svc should be visible on the local web server box in this location

C:\inetpub\wwwroot\service.svc
0
 

Author Comment

by:ktola
ID: 34945598
I cannot browse directly to it either - here is my original web.config that also does not work:

<system.serviceModel>
    <services>
      <service name="ServiceZ">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost/ServiceZ"/>
          </baseAddresses>
        </host>
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding openTimeout="0:10:00" sendTimeout="00:10:00" />
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
0
 

Author Comment

by:ktola
ID: 34945911
Sorry - I forgot the endpoints - here is what I have now but it does not work either - I must be missing some kind of configuration setting...

<system.serviceModel>
    <services>
        <service name="ServiceZ">
            <endpoint address="http://localhost/Website/ServiceZ" binding="basicHttpBinding"        
                name="MainHttpPoint" contract="IServiceZ" />
            <endpoint address="mex" binding="mexHttpBinding" name="MexEP"
                contract="IMetadataExchange" />
        <host>
            <baseAddresses>
                <add baseAddress="http://localhost/Website/ServiceZ" />
            </baseAddresses>
        </host>
    </service>
</services>
<bindings>
    <basicHttpBinding>
        <binding openTimeout="0:10:00" sendTimeout="00:10:00" />
    </basicHttpBinding>
</bindings>
<behaviors>
    <serviceBehaviors>
        <behavior>
            <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
    </serviceBehaviors>
</behaviors>
</system.serviceModel>
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:ktola
ID: 34946004
Never mind - a reboot of IIS suddenly cleared that part up.  Now I am having an issue where the WSDL is downloaded but breaks due to local references:

The document was understood, but it could not be processed.
  - The WSDL document contains links that could not be resolved.
  - There was an error downloading 'http://MyServer/ServiceZ.svc?wsdl=wsdl0'.
  - The remote name could not be resolved: 'MyServer'

This occurs in Production but I have a full URL listed - i.e. www.prodserver.com - so why the local references?
0
 

Author Comment

by:ktola
ID: 34946405
The answer to this questions can be found here - http://stackoverflow.com/questions/5070468/wcf-web-config-question 
0
 

Author Closing Comment

by:ktola
ID: 34948022
Figured it out myself but thanks for trying
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question