Solved

WCF Web.Config Question

Posted on 2011-02-21
6
642 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

This tutorial will show you how to add an attribute to an XML (http://en.wikipedia.org/wiki/XML) stream returned from a Windows Communication Foundation (http://en.wikipedia.org/wiki/Windows_Communication_Foundation) (WCF) Web Service.  Some knowled…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now