Click to See Complete Forum and Search --> : Dynamically changing a Shortcut that contains the Port Number


carrolls
January 16th, 2008, 10:34 AM
I am developing a c# ASP.net web application.
This application has to be installed on many PCs.
I want to be able to place a shortcut to the start page on the desktop on all machines.
The problem is that the base URL contains the Port number of the PC I was debugging on.
ie
BASEURL=http://localhost:1104/TimerViewerDefault.aspx
This port might not be available on another PC and ASP.net will choose another port, so the shortcut will not work on other machines.
How can I get over this problem? Or change the shortcut dynamically?
Cheers, Carrolls

Yeorwned
January 16th, 2008, 02:45 PM
Easiest solution is to set the port number for your application in IIS. If you wanted to move it afterwards, you could create another site running on the old port that includes a downloadable batch file to update the shortcut, or simply redirect.

Alternatively, if it is in a domain, you could push a policy down that updates the desktop's shortcut.