ok, that makes sense.
So this is what I'd do;
a) create a variable in the WebServer procedure;
perf_web &NetWebServer
b) On the Performance extension set
Web Server Object : perf_web
c) In your code assign perf_web to either the secure web server, or the insecure web server....
if client wants SSL
perf_web & = ThisSecureServer
Else
perf_web & = ThisWebServer
end
Unfortunately though, while this answers your question, it's completely the wrong way to solve your actual problem. Your actual problem is that you want to make SSL optional to the user hosting the exe.
To do that;
a) on the General tab make the Port number an Expression (say, loc:port where loc:port is the port you want the server to use. This is a really good option anyway for intranet apps because the standard ports may already be in use.)
b) In the WebServer procedure code, ie right click on the procedure and choose Source, search for the line
ThisWebServer.SSL = 1 ! Use SSL to make a Secure Web Server
In the embed straight after that put in
ThisWebServer.SSL = SomeUserSetting
You would set everything up in development as if the site would be SSL - but the user can just turn it off by changing that property.
Oh, and obviously using this approach you only need the one nettalk object in the procedure, not two, so the performance question falls away.
cheers
Bruce