If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.

Code Example - If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.

                
                        Then I went to Visual Studio and changed the server setting (Right mouse on the project, properties, tab Web, click Use local IIS Web Server and click Create Virtual Directory. When I did this, it worked under IIS with the code above.