I have a controller action in web api that return string token as below.Howver, the problem is whenever there is ‘/’ appear in server side response string, at client side I always get ‘/’ instead where ‘\’ is addition to original string. How can i get rid of it?

public string GetTrackProfile()
{
string token="0Q2l7m4dAekjCt/yIxk0txzyZAxjZMYZq6+OAXHPNorrel7hez2vnkLe61Mf2ZLL";
return token;
}
client side response
0Q2l7m4dAekjCt/yIxk0txzyZAxjZMYZq6+OAXHPNorrel7hez2vnkLe61Mf2ZLL
If this string is part of an HTTP header, then you should be aware that according to the RFC 2616 specification
/is considered as a separator character and must be properly escaped (which is what the Web API does for you by prepending it with\):UPDATE:
According to the comments, this string is part of a JSON serialized response. It is properly encoded. Let’s take the following example:
When you execute this code the correct string is shown –
a/b. So this is a perfectly normal behavior.