Search code examples
c#wcfweb-serviceswsdl

creating web service proxy and deleting WSDL file issue


i just need to know that after creating web service proxy if i delete wsdl file then is there will be any problem for creating web service class related instance?

so guide what i need to do after deleting wsdl file from VS2010 IDE as a result there will be no problem to call web service.

my first question was about web service(ASMX) file. so my question is still same but what i need to do in case WCF service. because there is also wsdl file generate after creating proxy. if i delete wsdl file in this case also so how could i make a call to wcf service.

please explain in details.


Solution

  • When you add a Service Reference, Visual Studio creates a file called Reference.svcmap inside the Service References/<service name>/ folder, which describes your service. It contains links to the various metadata sources and the configuration options that you used when creating the Service Reference ("Configure Service Reference" from the context menu).

    This Reference.svcmap is the only file that you must not delete. When you right-click your Service Reference and select "Update Service Reference" from the context menu, Visual Studio will re-download all the required metadata from their upstream sources, re-create the client proxy and update your app.config file.

    From the Service References/<service name> directory, the client proxy Reference.cs is the only file that's actually used when compiling your client app (so you shouldn't delete this either, though Visual Studio will automatically re-generate it for you) - none of these files are used at runtime.

    This article also explains what all these files are about: http://scottseely.com/2009/01/26/misunderstood-add-service-reference/