views:

39

answers:

2

Hi guys, I have a simple DataContract structured in this way:

    [DataMember(EmitDefaultValue = false, IsRequired = true, Name = "TablePath", Order = 1)]
    public string TablePath { get; set; }

The Value that I try to insert is something like that:

%PATH%\%SPECIAL%\file.txt

And I receive this message using the WCF Test Client UI

"... is not a valid value for this type." I tried different combinations of characters, and for example something like this works great "%PATH%".

The problem is if there is a combination like "%\".

How I can fix this problem as I will receive any type of characters inside this property?

Thank you in advance.

+1  A: 

Did you try adding the @ sign before the string @"%PATH%\%SPECIAL%\file.txt" ?

Without it I think you need to use "\ \" instead of "\" .....

Dani
Let me have a look, I am trying actually to write a call within C# as using the WCF Test client it doesn't work also with \\ or @ before the value.
Raffaeu
A: 

It seems that the problem is only with the WCF Test Client tool. If I use the same metadata through C# it works ... Weird as I don't have a UI now to test my services ... I must work with TDD.

Raffaeu