Last post Apr 24, 2018 01:57 AM by Edward Z
Apr 23, 2018 04:16 PM|kobosh|LINK
Hi I am trying to use SvcUtil with asmx webservice to generate proxy class I get error: cannot generate XmlSerilaizer types for assembly .....No service contract types were found.
I tried to add service contract but it does not exist for asmx.
my command : SvcUtil.exe directory/bin/WebService1.dll /out: directory/myproxy.cs
I noticed the command works fine when supplying end point of web service in IIS: SvcUtil.exe
Apr 23, 2018 09:45 PM|DA924|LINK
Are you sure you are not suppose to use the WSDL tool?
Apr 24, 2018 01:57 AM|Edward Z|LINK
You could not generate client code from webservice.dll by svcutil.exe.
For webservice.dll, it did not define the Service Contract in the dll which will be retrieved by svcutil.exe. You need to access the Service Contract from webservice.asmx?wsdl.
If you do not want to access the web service from IIS, and want to access from dll, you could try wcf service library instead of asmx web service.