benja
benja

Reputation: 9

Header title has a string addition and ignores one of the parameters when I run it remotely

I have the following problem: one member of the header row is an addition of strings like this:

"Amount (" + ContextHelper.GetLocalCurrency().ToString + ")"

in order to show, in case of us local currency:

Amount (US)

it works fine when I run this locally, whether if I do it in my PC hitting the localhost or if I run locally the VM through a Remote Desktop Connection, also hitting the localhost.

But when I try hitting the service that is running in the VM from my PC (as the client will), the member of the header row only shows

"Amount ()"

meaning ContextHelper.GetLocalCurrency().ToString is returning NULL.

Any ideas why this is happening?

Upvotes: -1

Views: 30

Answers (1)

benja
benja

Reputation: 9

If anyone comes across this problem, a symbol $ in that string was giving Visual Studio a hard time when trying to understand the currency as I was trying to show:

Amount(US$)

When I took away the $ it works fine.

Upvotes: 0

Related Questions