Dime Attachment ID property fails to parse

Hello

I am using VS2005 and Opennetcf liabrarys to consume webservices the problem is only when i create a dimeattachment object and try setting its ID property i get a System.URIexception. There is not example for opennetcf v2.0 using dime attachment this things works fine with VS2003 and OpennetCFv1.0

Following is the code

Dim da As New DimeAttachment()

da.Id = Guid.NewGuid.ToString() -> Fails Here

da.Stream = s

da.Type = dimetype

da.TypeFormat = TypeFormatEnum.MediaType

Following is the error code

System.UriFormatException: {"Invalid URI: The format of the URI could not be determined."}
InnerException: Nothing
Message: "Invalid URI: The format of the URI could not be determined."

Can some one help




Answer this question

Dime Attachment ID property fails to parse

  • mikewo

    I would be happy to look into this (I did the port from 1.0 to 2.0). I'd appreciate if you could provide a test project, preferrably both ends. I do this in my spare time and at the moment I don't have much of it.

  • AdrianG

    Hi Alex ,

    Got the solution for the problem just need to add ":" for the id property the opennetcf uses CF liabrary where it fails

    System.URI (

    id = new Uri(value).ToString(); ) --> this where it needs ":" in the id string

    example

    Dim da As New DimeAttachment()

    da.Id = "uuid:" & Guid.NewGuid.ToString("D")

    da.Stream = s

    da.Type = dimetype

    da.TypeFormat = TypeFormatEnum.MediaType

    Regards

    Gauls



  • TjMulder

    Thanks for letting me know.

  • ST_SHIR

    Hi Alex,

    Aplologies for double posting wasn't sure of the right topic to go in thanks for the help i have created a test project please find the link below

    TestDime.rar

    http://www.yousendit.com/download/RTSbuwCt4oA%3D

    Thanks Again

    Regards

    Gauls



  • Dime Attachment ID property fails to parse