VS Web Server relative hyperlink problem
am 14.11.2007 16:03:17 von chambersdon
I have 2 projects, in the same Visual Studio solution, with hyperlinks
between them. These are file system projects that use the Visual
Studio Web Server, not my local IIS. When the Visual Studio Web
Server starts the projects are running on a port, and each project has
a different port.
For example, website1 runs on http://localhost:1234/webSite1
And website2 runs on http://localhost:5678/webSite2
Because of the port I cannot link between the two projects. In
webSite1 I want a relative hyperlink that links to webSite2 (href="/
webSite2/somePage.aspx"). How can I accomplish this?
These are existing projects that were built using IIS. Due to
security concerns we are no longer able to run IIS on our development
machines and must use the Web Server that comes with Visual Studio.
I'm trying to make this work with changing code or our design. Is
that possible?
Thanks for any help,
Don
Re: VS Web Server relative hyperlink problem
am 23.11.2007 20:03:22 von Stevanich
Don,
What you might try doing is setting the port to be static in the web
projects, and using the configuration file to specify the other site's
address. Then you can pull the base address from the configuration file to
build your URLs between the sites.
To set the port to be static, left-click on the web project. In the
Properties property grid, set "Use dynamic ports" to false, and set a value
for "Port number".
--
Hope this helps,
Steve - dotneticated.com
wrote in message
news:1195052597.960074.57530@v65g2000hsc.googlegroups.com...
>I have 2 projects, in the same Visual Studio solution, with hyperlinks
> between them. These are file system projects that use the Visual
> Studio Web Server, not my local IIS. When the Visual Studio Web
> Server starts the projects are running on a port, and each project has
> a different port.
> For example, website1 runs on http://localhost:1234/webSite1
> And website2 runs on http://localhost:5678/webSite2
>
> Because of the port I cannot link between the two projects. In
> webSite1 I want a relative hyperlink that links to webSite2 (href="/
> webSite2/somePage.aspx"). How can I accomplish this?
>
> These are existing projects that were built using IIS. Due to
> security concerns we are no longer able to run IIS on our development
> machines and must use the Web Server that comes with Visual Studio.
> I'm trying to make this work with changing code or our design. Is
> that possible?
>
> Thanks for any help,
> Don
>