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

1.8k views Asked by At

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']

....

service reference errors

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

0

There are 0 answers