Solved

WCF Web.Config Question

Posted on 2011-02-21
6
646 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

751 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