Page view counter

Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

Last post 03-16-2008 1:40 PM by jotacuspi. 9 replies.

Sort Posts:

  • Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    01-11-2008, 11:56 PM
    • Loading...
    • bfallar3
    • Joined on 01-12-2008, 4:47 AM
    • Posts 5
    • Points 0

     Hi,

    I created a Visual Studio 2005 ASP.NET project in my Windows Vista machine using ASP.NET Development Server (not local IIS).

    The web site has a master page file and a content page for that masterpage. When viewing the content page in the IDE, it works fine will all references images and stylesheets.

    But they I view the page in the brower using the right-click, View in Browser, the page loads but all images are broken and the stylesheets does not apply in the content page with the masterpage.

    To further isolate the problem, I tried to publish my project in a remote IIS, and view the site using IE from the remote IIS and it works fine. 

    What do you think is the problem with my ASP.NET development server on my Vista?

    By the way, I applied the VS 2005 SP1 and latest fixes for Vista also.

     Please advise ASAP.

  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    01-12-2008, 1:04 AM
    • Loading...
    • dparsons
    • Joined on 12-13-2007, 3:26 PM
    • Akron, Ohio
    • Posts 191
    • Points 854

    I am going to venture a guess here but are all of your image links and references otherwise using either of these notations:

    src="/images/foo.gif" mce_src="/images/foo.gif" or src="~/images/foo.gif" mce_src="~/images/foo.gif"

    If they are, the reason they are broken when you view the site through VS is because your URL looks something like this:

    http://localhost:XXXX/<yoursite>/default.aspx

    by using either of the notations above, you are saying this:

    http://localhost:XXXX/images/foo.gif

    which is obviously incorrect.  I imagine the reason it works directly through IIS is because you access the site as www.mydomain.com

    ===========================================================
    Hope that helped.
    -Doug

    If this post solved your problem please mark it as being the answer so that we all
    know you have been helped!
  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    01-13-2008, 10:01 AM
    • Loading...
    • bfallar3
    • Joined on 01-12-2008, 4:47 AM
    • Posts 5
    • Points 0

    Hi, My master pages uses the src="~/images/foo.jpg" notation.

    so, how would i resolve this issue in my VS IDE when viewing the page that uses the master page?

  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    01-13-2008, 11:07 AM
    • Loading...
    • FuriousMojo
    • Joined on 05-12-2005, 12:34 PM
    • Philadelphia, PA
    • Posts 29
    • Points 137

    Just a stab in the dark, but maybe that development server does not have read access to those images?  Maybe look at the windows permissions on the /images folders and files underneath and ensure ASPNET has read access to them.

  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    01-14-2008, 12:00 AM
    • Loading...
    • bfallar3
    • Joined on 01-12-2008, 4:47 AM
    • Posts 5
    • Points 0

    There is no problem in our development server when we deploy the project in Visual Studio 2005.

     The problem occured when we are viewing the web site application using Visual Studio in ASP.NET Development server.

     

  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    01-14-2008, 7:15 AM
    • Loading...
    • dparsons
    • Joined on 12-13-2007, 3:26 PM
    • Akron, Ohio
    • Posts 191
    • Points 854

    You could use relative paths but that could become tricky with MasterPages since, I am sure, you have pages that use your MasterPage below the Root Level.

    Alternatively you can use Request.ApplicationPath to return the path of your application

    So if your URL is http://localhost:XXXX/myapp Request.ApplicationPath returns /myapp

    ===========================================================
    Hope that helped.
    -Doug

    If this post solved your problem please mark it as being the answer so that we all
    know you have been helped!
  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    02-11-2008, 9:41 PM
    • Loading...
    • muppetmaster
    • Joined on 02-12-2008, 2:33 AM
    • Posts 2
    • Points 2

    I am having this same issue with one particular site out of dozens.  It is the only one that will not load images or css or whatever and it is a problem for any developer in our shop who tries to run/view the thing at all using the VS dev webserver.  The site works fine out on the main dev server, but never on anyone's local box.

     It really feels like a permission issue but I can't find any differences with working sites. 

    What could I be missing?  What is the VS user?  I assumed it would be the system user but I don't know.


     

  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    02-15-2008, 2:03 AM
    • Loading...
    • bfallar3
    • Joined on 01-12-2008, 4:47 AM
    • Posts 5
    • Points 0

    When using the ASP.NET Development Web server, the account used is Administrator, therefore, file permissions should not be an issue.

    There should be a better workaround or solution from Microsoft team! Confused

  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    02-15-2008, 7:32 PM
    • Loading...
    • muppetmaster
    • Joined on 02-12-2008, 2:33 AM
    • Posts 2
    • Points 2

    Thanks for the response.  As it turns out mine is not an MS issue at all.  We are running a custom CMS the does url rewrites.  I was the victim of some outdated code that was not obtaining a local context when running from VS.

     

     

  • Re: Problem in display page in Internet Explorer using VS 2005 ASP.NET Development Server

    03-16-2008, 1:40 PM
    • Loading...
    • jotacuspi
    • Joined on 03-27-2007, 7:37 PM
    • Posts 4
    • Points 3

    I have the same problem... it happens in VS2005 and VS2008... after searching on the net for a solution I tried to do some workarround... and what I found is really weird.

    When I set the Forms authentication on my web.config, and then test my web page on the developement server, all images are gone, and css not applied.

     <authentication mode="Forms"/>

     If I set the authentication mode to "Windows" then everything works fine..

    Can anybody tell me why? and... is there any solution?

Page 1 of 1 (10 items)