-1

I have created WCF service and hosted it on remote server. i am able to browse the said service from remote as well as on my local machine (firefox)

But when i copy the same url and say "add service reference" to my vs 2012 project file it gives me error

enter image description here

Shaggy
  • 5,422
  • 28
  • 98
  • 163

1 Answers1

0

You may want to check the MSDN link. I had a similar issue and it turned out that I wasn't having the right Handler Mappings in local IIS.

Extract from the above link:

If you installed IIS after Windows Communication Foundation (WCF) was installed you must run the following command.

"%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r

This registers the required script maps in IIS.

Tony Stark
  • 781
  • 6
  • 22
  • It produces new error `Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel` – Shaggy Sep 15 '14 at 11:25
  • I search on SO and did everything but this error not solved `http://stackoverflow.com/questions/15688930/could-not-load-type-system-servicemodel-activation-httpmodule-from-assembly-s` – Shaggy Sep 15 '14 at 11:26
  • What version of .Net is your application targeting? Could you post the complete error? – Tony Stark Sep 15 '14 at 12:16
  • Check whether you an entry for ServiceModel in IIS-->Modules pointing to version 4. If there are multiple entries or entries for older version, take a copy of your applicationHost.config (C:\Windows\System32\inetsrv\config) and remove the entries other than the one pointing to v4.0 – Tony Stark Sep 15 '14 at 12:48