Solved

WCF Web.Config Question

Posted on 2011-02-21
6
644 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

In previous Articles, we have discussed how we can upload a file using .asmx web service and isolated storage space. Here, in continuation to the topic, I am going to discuss how we can use WCF for the same purpose. Steps: 1.Create the silverli…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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