Previous Next

Thread: set different port to IIS and Access without Port number

Last post 05-14-2008 1:57 PM by jeff@zina.com. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 05-14-2008, 3:23 AM

    • eashokan
    • Not Ranked
    • Joined on 03-07-2007, 6:45 AM
    • Posts 2
    • eashokan

    set different port to IIS and Access without Port number

    Hi all.

    I have developed a sample page and run it in localhost as follows:

    http://localhost/Sample/Default.aspx

    Then I have changed the default port number  80 to some other port number (for eg: 1080).

    Now I have accessed the page as http://localhost:1080/Sample/Default.aspx

    But I need to access my page as http://locahost/Sample/Default.aspx regardless of port number. How can I access my page regardless of port number. 

     

     

     

  • 05-14-2008, 4:13 AM In reply to

    • petsch
    • Not Ranked
    • Joined on 05-23-2006, 8:42 PM
    • Denmark
    • Posts 2
    • petsch

    Re: set different port to IIS and Access without Port number

    Hi

    One way of solving this could be using hostheaders on your website.

    Although you might have to add a record to your internal DNS og hosts file for this to work proberly.

    For your new website, hosting you current sample page on port 1080, you can change the port back to port 80 and then add a hostheader e.g. servername.

    For more information on how to work with hostheaders, see this great article by Kristofer Gäfvert: http://www.gafvert.info/notes/iis_multiple_websites.htm

    Hope this helps you on the way, to solve you problem. 

     

    ----
    Peter Schmidt
    ITPRO, MCTS, MCSE:S/M/I, MCDBA
    Blog: www.iis-digest.com
  • 05-14-2008, 5:30 AM In reply to

    • eashokan
    • Not Ranked
    • Joined on 03-07-2007, 6:45 AM
    • Posts 2
    • eashokan

    Re: set different port to IIS and Access without Port number

    Thanks for your reply.

    I want to user ip address instead of localhost. i.e  http://192.168.1.3/SampleApp/Default.aspx

    If the port number of IIS is 80, http://192.168.1.3/SampleApp/Default.aspx works fine. If I changed the port number, it wont work.

    what shall i do for this?

     

     


     

     

    .

     

  • 05-14-2008, 8:46 AM In reply to

    • petsch
    • Not Ranked
    • Joined on 05-23-2006, 8:42 PM
    • Denmark
    • Posts 2
    • petsch

    Re: set different port to IIS and Access without Port number

    This is possible.

    I suggest that you have these two websites:

    • Default website
    • New sample website

     Leave the "Default website" with the default port (80) and the IP Address information to "All unassigned".

    For the "New sample website" use the default port (80) and under IP address information enter or select the server IP address: 192.168.1.3.

    This way the new sample website will respond to: http://192.168.1.3/SampleApp/Default.aspx and the "old" Default website will respond to http://localhost or http://servername or if the server has more IP addresses it will also respond to one of them.

    Hope this might help.

     

    ----
    Peter Schmidt
    ITPRO, MCTS, MCSE:S/M/I, MCDBA
    Blog: www.iis-digest.com
  • 05-14-2008, 9:09 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Lawrenceville, NJ
    • Posts 3,543
    • IIS MVPs
    • tomkmvp

    Re: set different port to IIS and Access without Port number

    eashokan:
    I want to user ip address instead of localhost. i.e  http://192.168.1.3/SampleApp/Default.aspx

    If the port number of IIS is 80, http://192.168.1.3/SampleApp/Default.aspx works fine. If I changed the port number, it wont work.

    what shall i do for this?

    There's nothing you can do for that.  What OS are you using?

  • 05-14-2008, 1:57 PM In reply to

    Re: set different port to IIS and Access without Port number

    petsch:
    This way the new sample website will respond to: http://192.168.1.3/SampleApp/Default.aspx and the "old" Default website will respond to http://localhost or http://servername 

    No it won't.  One site won't start if you have only one IP and try to bind two services to the same port.  You have to bind each site to a single IP/Port combination exclusive of the others.

    If you have multiple IP addresses, then the seocnd site will respond to any IP that isn't responded to by the first.  Although this only works on Server or Vista, since workstation versions from XP and prior will only serve a single site.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
Page 1 of 1 (6 items)
Page view counter