Reputation: 110
In my WinForms app, I have a login window that uses a web service in order to authenticate the username/password in order to grant access. The problem I am seeing is that once I compile my app, it generates an appname.exe.config which has the URL of the web service endpoint.
It seems that this URL can be modified by the user in a text editor. Will that not makes the application easier to crack since the person can just run a dummy web service with the same method names and change the URL in the config file and simply return "true" in order to gain access?
Is there a way to get visual studio to not use the app.config to store the URL and have it hardcoded in my app so it can't be changed with such ease? If I simply delete this config file, I get an error that the default endpoint element could not be found.
Any guidance would be greatly appreciated.
Upvotes: 0
Views: 44
Reputation: 76
How are you calling the web service? Are you doing it in code or by another way?
Maybe you can create a static class to storage your web service URL and get the URL to use a method like staticClass.getURL().
Upvotes: 1