I have created an Android application with C# on the server side. Following this tutorial, I am using Json web service. Everything is working well, but the only issue is if someone hits www.mydomain.com/Handler.ashx?ANDROID, then all the methods written on server side are downloaded as a text file and the code can be read easily.
What I want to do is that the server should respond only if request is being made from my android application. If someone(hacker/cracker) hits the url, then he should not be able to download the code and should be redirected to some specific page saying unauthorized access prohibited.
Can someone help me with this? Let me know if this question is not clear.