Service reference: Custom Tool warning: Cannot import wsdl:portType

我的未来我决定 提交于 2019-12-24 17:53:02

问题


This is in relation to my previous question, which I think might be caused by this problem.

I added a new service to add a varbinary to my database table: Afbeeldingen

  • id:int
  • afbeelding1:varbinary(max)

I made the service contract like this:

[OperationContract]
public void setAfbeelding(Afbeelding a)
{
    dc.Afbeeldings.InsertOnSubmit(a);
    dc.SubmitChanges();
}

I compiled the project, added the service reference to my main project and then I get the following errors:

Custom tool warning: Unable to load one or more of the requested
types. Retrieve the LoaderExceptions property for more information.

Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Exception has been thrown by the target of an invocation.
XPath to Error Source: //wsdl:definitions[@targetNamespace='']/wsdl:portType[@name='EditAfbeeldingService']

....

I managed to fix this, by adjusting the reference like explained here. But I don't think this is healthy and I think it is now causing me isseus with what I'm trying to do. ('OndernemersAward.EditAfbeeldingServiceReference.Binary' does not contain a constructor that takes 1 arguments, is the error I'm getting)

I really hope somebody can help, silverlight and WCF have been one big mess for me so far.. Thank you in advance, Thomas

来源:https://stackoverflow.com/questions/8273959/service-reference-custom-tool-warning-cannot-import-wsdlporttype

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!