Wednesday, October 17, 2012

issues when creating WCF proxy

I have changed my WCF services and updated the service reference on my test project.
But I could not build the project after that. Then I tried to build it on my old machine and it was built. So this should be an environment issue. I had the following errors & warnings in the output.

Custom tool warning: Cannot import wsdl:portType

Custom tool error: Failed to generate code for the service reference  

There are blogs which say I need to unclick the Reuse types in reference assemblies. But it didn’t work for me.  
Then I tried to run using the WCFStorm tool and I got the following errors

Metadata contains a reference that cannot be resolved: 'http://localhost:8082/Service.svc'.
Import Error : Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Schema with target namespace


I found some blogs which says I need to repair ServiceModelReg & need to run aspnet_regiis.exe –iru. But anything didn’t help me.
Then I found the following link it says this is happening because of permission issues in c:\windows\temp
http://blogs.infosupport.com/unable-to-generate-a-wcf-proxy-using-svcutil-but-retreiving-the-wsdl-works/
Yes It was the issue of environment. Thank you for the above blog writer you have saved my time.

No comments: