It is working.
It is working fine.
But not as you think...
C# and VB code is run at the Server, not the Client. So when you call MsgBox it is executed at teh Server, and the message box is display, at the server. The Client sees nothing.
When you ran it in development, the Server and the Client were the same physical machine so it appeared to work - but it didn't really.
If you want to show a message box at the client, then look at something like the
JavaScript Alert[
^] instead.