Solved

WCF Web.Config Question

Posted on 2011-02-21
6
648 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

628 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