tags:

views:

40

answers:

2

I have a service with the metadata exposed. Trouble is when I browse to the wsdl the service page it has the machine name as below:

MasterLibrary Service

You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

svcutil.exe http://mymachine/Master/Master.svc?wsdl

How do I make it show it as:

http://www.url.co.uk/Master/Master.svc?wsdl
A: 

If using iis7 in server 2008 just right click the service in iismanager select edit bindings if its http, then edit the http binding. In the hostname dialog box enter your custom hostname.

This link talks more about it metadataservice

Miker169
I am using IIS 6, but this at least lets me know that I am on the right track. I have been trying to use the adsutil.vbs script to configure for IIS 6 but it seems it doesn't serve up the page afterwards. The command I am using is.CSCRIPT adsutil.vbs set w3svc\1\serverbindings ":80:www.url.co.uk"Thanks,Neil.
Neil B
A: 

You can query your current site bindings for the default web site as following:

cscript //nologo %systemdrive%\inetpub\adminscripts\adsutil.vbs get W3SVC/1/ServerBindings

Here is the command to change it:

cscript //nologo %systemdrive%\inetpub\adminscripts\adsutil.vbs set W3SVC/1/ServerBindings “:80:www.fancydomain.com”

You can also change it from IIS Manager UI. For HTTPS, the following command would work:

cscript //nologo %systemdrive%\inetpub\adminscripts\adsutil.vbs set W3SVC/1/SecureBindings “:443:www.fancydomain.com”

2) Recycle the AppDomain

Once you changed IIS settings, WCF does not automatically pick up the changes from IIS Metabase. You have to recycle the current AppDomain for the virtual application. There are a few different ways to do that:

· Change web.config file for the virtual application · Kill w3wp.exe process · Run “iisreset.exe” 3) Query the WSDL

Miker169