Page 1 of 2 12 LastLast
Results 1 to 40 of 49

Thread: [RESOLVED] Question about localhost:nnnn vs localhost

  1. #1

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Resolved [RESOLVED] Question about localhost:nnnn vs localhost

    If I hit F5 in Visual Studio, my web app is running from localhost:nnnn. None of my images or styling is available. If I modify the URL in the browser and delete the :nnnn so it's just localhost, the page is styled and all images resolve.

    Any idea why this is happening and how I can prevent it; that is, make it run from localhost to begin with?

    Thanks.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  2. #2
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    Re: Question about localhost:nnnn vs localhost

    You can set the port that cassini will use from the Web tab in the project properties. The question is how are you setting the paths to your css and image files if they break when a port number is added?
    This pattern in common to all great programmers I know: they're not experts in something as much as experts in becoming experts in something.

    The best programming advice I ever got was to spend my entire career becoming educable. And I suggest you do the same.

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Question about localhost:nnnn vs localhost

    odds are the pathings are full... rather than relative...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Question about localhost:nnnn vs localhost

    Are you running this through local IIS or with the VS web server?
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  5. #5

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    1. Are you running this through local IIS or with the VS web server? Local IIS.
    2. odds are the pathings are full... rather than relative... Are you saying make them relative? I shouldn't have to modify any existing code because it is working; that is, it's a live site and all I did was get the project from another developer. I don't want to change anything just to make it work on my machine.
    3. You can set the port that cassini will use from the Web tab in the project properties. What is cassini?

    Thanks for the answers. I will look into this further.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  6. #6
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by MMock View Post
    1. Are you running this through local IIS or with the VS web server? Local IIS.
    2. odds are the pathings are full... rather than relative... Are you saying make them relative? I shouldn't have to modify any existing code because it is working; that is, it's a live site and all I did was get the project from another developer. I don't want to change anything just to make it work on my machine.
    3. You can set the port that cassini will use from the Web tab in the project properties. What is cassini?

    Thanks for the answers. I will look into this further.
    Cassini is what Visual Studio is using to run your web application, rather than IIS itself. Typically when I am building web applications, I set the project to use local IIS rather than Casini, so that it avoids just this kind of confusion.

    You can set your project to use IIS rather than Casini by going into project properties, clicking the "web" tab and setting the project to use local IIS.

  7. #7

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Ah, so that popup that says ASP.NET Development Server - that is Cassini. Good to know (better late than never, right?)

    At this risk of sounding (even more) like an idiot, I can't find what you (and the rest of the world) are telling me to do...

    You can configure a web project within Visual Studio to use IIS by right-clicking on the project and pulling up its properties (and then by clicking on the “Web” tab within the properties window)":


    Which properties - property pages or properties window? Neither one of these is giving me a Web tab.
    Last edited by MMock; May 2nd, 2013 at 07:13 AM. Reason: typo
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  8. #8

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    And if I wanted to still use Cassini (I don't think I've ever not used it - didn't know you had a choice or what pros/cons were) I can't change the port number?
    Attached Images Attached Images  
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  9. #9

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Someone posted this: When I look at Properties for the project, I just see two properties: Full Path and Opened URL. When I look at the Property Pages, I see 6 sections: References, Build, Accessibility, Start OPtions, MSBuild Options, and Silverlight Applications. THe Start Options has a "server" section that only has two options: Use default Web server, and Use custom server. Nothing about Use Visual Studio Development Server. There is no "Web" section. here, so I am reading that thread as that is exactly what I see for properties.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  10. #10
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    Lots of talk here - but back to an initial question / observation...

    What are the paths - full or relative?

    And a followup question - do you really care if the images do not appear while you are working the page? In otherwords - are you adding an enhancement and then simply shipping your changes back to the production user?? You could possibly - for the time you are working the app - create an image folder "where the page is looking for it" locally...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  11. #11
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by MMock View Post
    What is cassini?
    Sorry, I thought this was common terminology. I didn't mean to muddy the issue with it.

    I've attached a couple of screen shots to get you in the right place. If you're using VB.NET you'll double click on My Project to get to the properties while it'll just say Properties in a C# project. From there you can click on the Web tab on the left hand side to get to the server section in the other screenshot.

    Name:  MyProject.jpg
Views: 681
Size:  8.8 KB

    Name:  ServerSetup.jpg
Views: 668
Size:  47.3 KB

    You'll see that if you use IIS Express you can override the root URL.
    This pattern in common to all great programmers I know: they're not experts in something as much as experts in becoming experts in something.

    The best programming advice I ever got was to spend my entire career becoming educable. And I suggest you do the same.

  12. #12

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    The paths look like this:
    Code:
    <a href="<%= theURL %>/default.aspx">Home</a>&nbsp;<img src='/Images/bullet-nd.gif' border='0'>&nbsp;
    So I assume that is \Images off something else?

    Yes, I could totally ignore this issue. The images are resolved if I simply override, once the browser is up, the URL and remove nnnn from localhost:nnnn. But, I am bored and was told to "familiarize" myself with the code, so I figured why not delve into this issue and understand it? But, you are totally right and I was just given something else to do so I will switch out of this for the time being. Thanks Steve.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  13. #13

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Thanks MattP. I will look at that when I get a break from a report I have to modify. And muddy? Hell, no. I learned something which I always took for granted - I thought it was always using the ASP.NET Development Server and never even noticed when it wasn't (by "it", I mean everything I ever ran!)
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  14. #14
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    Here's a screen shot from VS 2008 - working on a web app that is not "setup as a project" (I believe).

    I got to properities that seem to look like the screen shot from VS 2010 by right-clicking the "D:\ACS DESKTOP\AWC" spot and going into properties...

    At any rate - when you start the DEBUGGER running with F5 you are setting up communications through a particular PORT...

    Why do you feel comfortable removing that "port designation" from the URL? Doesn't that stop the page from working further (or is this some static type of page without much back and forth?)
    Attached Images Attached Images  

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  15. #15

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by szlamany View Post
    Why do you feel comfortable removing that "port designation" from the URL? Doesn't that stop the page from working further (or is this some static type of page without much back and forth?)
    No, there's plenty of back and forth, or at least forth. I'm comfortable with it because it works. Is that because it navigates using Server.Transfer so once I've changed the port it keeps that change? (Or is that a stupid question?)

    I'll look at your screen shot when I have a couple minutes.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  16. #16
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    I also do not know - I'm curious to hear from someone else how removing the port from the URL is doing anything to fix this situation...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  17. #17
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Question about localhost:nnnn vs localhost

    Hey,

    What is this:

    <%= theURL %>
    And where is it getting set?

    Gary

  18. #18
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by szlamany View Post
    I also do not know - I'm curious to hear from someone else how removing the port from the URL is doing anything to fix this situation...
    I don't see how it could help.

    In one instance, the web site of being rendered by ASP.Net Development Server (Cassini), using the allocated Port Number. When you strip off the Port Number you are rendering the page from the site hosted under the local IIS. Although both of these things might be looking at the same files, they are ultimately coming from different servers.

    I suspect that if we find out what is in the variable that I just asked about, we will find out where the problem lies.

    Gary

  19. #19
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    Right - so it could actually appear to be working since the documents being pulled be either SERVICE EXECUTABLE are likely the same.

    But you would certainly lose any APP DATA or CONFIG DATA or any of the session stuff that ASP.Net gives you.

    If this is the case - then Mock should edit some of the posts here where she removed the port # and INDICATE that it's not a PROPER SOLUTION...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  20. #20
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Question about localhost:nnnn vs localhost

    Yes, any session state would be lost, as they are coming from two different places, unless of course any session state was being persisted elsewhere, i.e. SQL Server.

    Yes, I would agree with that, removing the port number is NOT a solution.

  21. #21
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    This code - which I do in one of my web methods - for example - would not work (as the Application object is persisted by the web service executable - I've stopped the ASP.NET DEVELOPMENT SERVER to reset this collection)

    Code:
        Private Sub DetermineParameters(ByRef dcn As SqlConnection, ByRef cmd As SqlCommand, Optional ByRef errorText As String = "")
            Dim blnError As Boolean = False
            Dim blnDoClose As Boolean = False
            With Application
                .Lock()
                If .Item("g_prmSP") IsNot Nothing Then
                    g_prmSP = DirectCast(.Item("g_prmSP"), Dictionary(Of String, SqlParameter()))
                End If
                .UnLock()
            End With
    .
    .
    .
            With Application
                .Lock()
                .Item("g_prmSP") = g_prmSP
                .UnLock()
            End With
        End Sub

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  22. #22
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Question about localhost:nnnn vs localhost

    Yes, that would make sense as well.

  23. #23

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by szlamany View Post
    then Mock should edit some of the posts here where she removed the port # and INDICATE that it's not a PROPER SOLUTION...
    I didn't see any post of mine where I said that. I didn't say "I'm not getting images" and then "oh, I fixed that by removing the port #'. I posted to understand what's going on, and I am describing what I observe. Can you direct me to which post you felt I had indicated some solution to this?
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  24. #24

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by gep13 View Post
    Hey,

    What is this:



    And where is it getting set?

    Gary
    It's in a master page, and I am not sure how it gets set...
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  25. #25
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by MMock View Post
    ... I'm comfortable with it because it works.
    Post #15 - this reply here and the fact that removing the port was part of the first post here made me concerned that if this thread was quickly read someone might think it was ok to alter the URL that the IDE decided to launch a debug session with.

    Of course - that's not the case - as the SERVICE EXECUTABLE is only listening on that PORT. Removing the PORT is like removing your leg and putting on wheels - gonna get unexpected results.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  26. #26

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Well, the removal of the port was actually the issue - not the solution. If I'd thought it was a solution, I never would've posted in the first place because I knew right away that with no port number my images resolved. But I wanted to know why.

    And the only reason I even thought to try removing the port and see what happened was because my coworker sent me a screen shot of the app running locally on her PC, and I noticed the difference in our URL's.

    If this thread is too confusing and is going to steer someone astray, by all means delete it.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  27. #27
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    No - not at all - good conversation going on here - and I would like to know how the image paths are being handled differently by the two different ASP.Net host apps.

    If you can re-direct your IDE to use the NON-CASSINI SERVICE - and the IMAGE work - then you have a solution that is viable and reasonable.

    Leaving open the question as to why the "ASP.NET DEVELOPMENT SERVER" is doing it different.

    Do the images work if the IDE launches to a different service you have on your machine?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  28. #28

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by szlamany View Post
    Do the images work if the IDE launches to a different service you have on your machine?
    I'm sorry, I don't quite know what that means, "launch to a different service"...

    I may ask stupid questions back to your intelligent questions - I don't know anything about this app yet. I just installed the project for future maintenance when it was turned over from another department to ours.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  29. #29
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost


    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  30. #30

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Uh, does it matter if I am running VS2010 and IIS 5.1???
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  31. #31
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    Googled for

    vs 2010 use iis express

    http://msdn.microsoft.com/en-us/libr...v=vs.100).aspx

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  32. #32
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by MMock View Post
    It's in a master page, and I am not sure how it gets set...
    It is probably worth looking into this. If you do a view source on the rendered page, what is the output for the above link?

    Gary

  33. #33

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by gep13 View Post
    It is probably worth looking into this. If you do a view source on the rendered page, what is the output for the above link?

    Gary
    OK, from the top, here is a snippet of the source from file Master/Producer.master:
    Code:
    				<div id="searchTopNav">
    					<a href="<%= theURL %>/default.aspx">Home</a>&nbsp;<img src='/Images/bullet-nd.gif' border='0'>&nbsp;
    					<a href="<%= theURL %>/careers.aspx">Careers</a>&nbsp;<img src='/Images/bullet-nd.gif' border='0'>&nbsp;
    					<a href="/GlobalFiles/SiteRequirements.asp">Site Requirements</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    (I renamed to "theURL" here from our company acronym XXX). So these are three (broken) links at the top of the page to go to Home, Careers and Site Requirments.

    If I hover over these links, I get localhost, localhost, localhost:1609 respectively.

    If I View Source, I get
    Code:
    	<div id="searchTopNav">
    					<a href="http://localhost/XXX web enrollment/default.aspx">Home</a>&nbsp;<img src='/Images/bullet-nd.gif' border='0'>&nbsp;
    					<a href="http://localhost/XXX web enrollment/careers.aspx">Careers</a>&nbsp;<img src='/Images/bullet-nd.gif' border='0'>&nbsp;
    					<a href="/GlobalFiles/SiteRequirements.asp">Site Requirements</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    Does that lend any understanding to what's going on?
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  34. #34

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Maybe I should also add...if I next edit the URL displayed in the browser and remove 1609, the links resolve and the styling kicks in, I hover over the three links and they are localhost/localhost/localhost, I view source and I get:
    Code:
    				<div id="searchTopNav">
    					<a href="http://localhost/XXX web enrollment/default.aspx">Home</a>&nbsp;<img src='/Images/bullet-nd.gif' border='0'>&nbsp;
    					<a href="http://localhost/XXX web enrollment/careers.aspx">Careers</a>&nbsp;<img src='/Images/bullet-nd.gif' border='0'>&nbsp;
    					<a href="/GlobalFiles/SiteRequirements.asp">Site Requirements</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  35. #35
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    Are default.aspx and SiteRequirements.asp in the same folder?

    Or is /GlobalFiles in the same folder as SiteRequirements.asp?

    If you change it to this

    <a href="GlobalFiles/SiteRequirements.asp">Site Requirements</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    does it work?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  36. #36

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    I should never have said the links resolve. It is the images that resolve. In other words, see how it is using bullet-nd.gif? That image is just a tiny red square used as a separator. So it goes Home ~ Careers ~ Site Requirements and the tilde is this image. I described this correctly in post #1. When the port is 1609, I don't have the red square, I have an X.

    On the other hand, the links do not work either way. Home wants to go to default.aspx and if I click it I get The resource cannot be found. Same thing with the Careers link trying to go to careers.aspx. And Site Requirements, because it's asp, gives me a 404.

    You asked if these pages are in the same folder. So no, it appears I do not even have them.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  37. #37
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    First - let's make things clear - the port has nothing to do with your issue. When you see the PORT on the URL that means you are getting pages served to you by the default iis service for the IDE.

    You need to get the IDE to know where these files are.

    Removing the PORT is disconnecting you from the IDE - from the debugger. All the port is is a listening channel for the "service". No port simply DEFAULTS to PORT 80!!!

    So - back to the problem - what do you mean by

    So no, it appears I do not even have them.
    Are you saying you do not have a folder with these files in it?

    Can you take a screen shot of the SOLUTION EXPLORER so we can see the folder and files you are dealing with?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  38. #38

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    Quote Originally Posted by szlamany View Post
    Removing the PORT is disconnecting you from the IDE - from the debugger
    Oh, I see that now that you've pointed it out...

    Quote Originally Posted by szlamany View Post
    Are you saying you do not have a folder with these files in it?
    Can you take a screen shot of the SOLUTION EXPLORER so we can see the folder and files you are dealing with
    No, I'm sorry - this company is very secure and I am a contractor not an employee so I'd rather err on the side of caution. I know that makes it difficult to get help. I will say that nowhere in the solution do I have a Careers.aspx file
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  39. #39

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,562

    Re: Question about localhost:nnnn vs localhost

    If I open a browser and enter: http://localhost:1609/Images/bullet-nd.gif I get a 404 Not Found.

    If I open a browser and enter: http://localhost/Images/bullet-nd.gif I see my image.

    So it sounds like all this is, is that I don't have the /Images folder I need when I am running in VS?

    Because I do have C:\inetpub\wwwroot\images.

    So just copy that \images folder to a folder in the solution?
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  40. #40
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Question about localhost:nnnn vs localhost

    you can only use 1609 if that's the port that VS started the ASP.Net dev environment under - do you know how to see the port being currently used? It's in the HIDDEN ICONS taskbar thingy for me on my Windows 7 machine...

    At any rate - - poke around and create an IMAGES folder up or down from the folder it's looking for and see if you can at least get the image to be found.

    Also - if you use FIREBUG you can see the actual path being attempted by the tcpip call.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width