I am working on a program in VS.net that has a main form that calls child forms that contain a webbrowser. Basically, I call the child webbrowser form, have to do some stuff, and close it. Then, I have parent form change the TCP/IP host file. After I change the hostfile, I want to call the child webbrowser again and have it do the same thing but now on a different server (thats why the host file change). Now the host file is getting changed but the webbrowser is not showing the changes.
I put the webbrowser in a child form so that I can close it and hopefully allow it to use the updated host file but its not doing that. Right now, I am disposing the webbrowser in the closing event of the child form as well as disposing the first form before I open up another version of the child webbrowser. However, the host file changes are not being used.
If I close the whole program and restart it again, then the changes show up in the webbrowser.
I know the host file is changed correctly cause I can open up IE and it shows the correct server.
PS: I have to change the host file for this project cause all the servers have the same url.