I had another issue. I have an IIS asmx application, and inside I've placed a subfolder with svc. Configured it properly, but it didn't give me the metadata until I found this in web.config in parent directory:
Fixed it by removing my new service to a separate directory.