I have a WinForms based application that I'm launching over http
(Microsoft's buzz word for this is aparently "SmartClien t"). I had an
issue trying to get parameters passed in through the URL that I
thought I had solved. For example, let's say I wanted to do this:
http://myserver/appdir/mywinformapp....ame=joe&age=12
Providing code access security permissions allow it, mywinformapp.ex e
is downloaded to the client and launches though IEExec.
I found a way to get to the QueryString params though:
Environment.Get CommandLineArgs (); this command returns a string array
with two entries, the second entry is:
http://myserver/appdir/mywinformapp....=12#12ABF5C3FX...
It's the full URL plus the session hash code. I built a parser method
to strip out the name/value pairs of the QueryString nad all was well,
then for no apparent reason the app started having problems extracting
the command line args (it begin adding a .config on to the end and
attempting to load a .config file that didn't exist). The .NET
Framework began returning a run-time error when the app lunches that
says "Error loading XML file:
http://myserver/appdir/mywinformapp.ex e?username=joea ge=12.config",
it's as if the application is looking for an app.config file and
trying to resolve it's location from the
Environment.Get CommandLineArgs ().
Does anyone know how to resolve this?