VS Web Server relative hyperlink problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chambersdon@hotmail.com

    VS Web Server relative hyperlink problem

    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

  • Stevanich

    #2
    Re: VS Web Server relative hyperlink problem

    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.co m

    <chambersdon@ho tmail.comwrote in message
    news:1195052597 .960074.57530@v 65g2000hsc.goog legroups.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
    >

    Comment

    Working...