Internet hosted EXE doesn't like app config file
-
I have a WinForm app that is fine and dandy when executed as a simply local exe. I'd like to host it via a webserver (http://blahwebserver/MyApp/Myapp.exe). I've gotten through a few initial issues which brought to light some holes in exception handling, but I'm really running into a problem with the config file apparently not being loaded. I don't really know what to do about this or where to research on it, though I kinda hoped it would have been mentioned in here[^] but it wasn't. So I've got nothing at this point.
-
I have a WinForm app that is fine and dandy when executed as a simply local exe. I'd like to host it via a webserver (http://blahwebserver/MyApp/Myapp.exe). I've gotten through a few initial issues which brought to light some holes in exception handling, but I'm really running into a problem with the config file apparently not being loaded. I don't really know what to do about this or where to research on it, though I kinda hoped it would have been mentioned in here[^] but it wasn't. So I've got nothing at this point.
If you have ASP.NET running on the server, it might be blocking access to the .config file because of a bug in .NET 1.0. Edit the machine.config* [edit]on the server[/edit] and change line 447 from
path="*.config"
topath="web.config"
This will allow your app.config file to download but still block downloading of the web.config file. [edit]*On my computer it is at: C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\CONFIG If you have .NET 1.1 installed on the server then this change has already been made, but if you told IIS to use .NET 1.0 for that application (or for the whole server) then you still need to edit the machine.config[/edit] James "I despise the city and much prefer being where a traffic jam means a line-up at McDonald's" Me when telling a friend why I wouldn't want to live with him