Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with VS 2005 Development Server

Problem with VS 2005 Development Server

Scheduled Pinned Locked Moved ASP.NET
visual-studiohelpquestioncsharpjavascript
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FinishedOnTime
    wrote on last edited by
    #1

    Hi, I'm having a problem with Visual Studio 2005 Development Server. I've recently upgraded from 2003 to 2005. I used to develop and debug against IIS, so I still have it installed on my workstation. When I run my app using Development Server, files in subdirectories don't get rendered. For example, images in ~/supportpages/images/ appear as broken links. I get the same thing for things like references to .js files where the script doesn't seem to get served. It looks like non-.aspx/.ascx pages outside the root folder of the site don't get served. However, if I open up IIS on my workstation and make a virtual path to the same folder (using a different alias), the site appears just fine, with all images and scripts working as they should. How can I fix this problem so I can just keep working with development server, but still see my site properly? (It's bad if my development environment doesn't work as closely as possible to my production environment). Thank you very much for any insight you may have.

    M Y 2 Replies Last reply
    0
    • F FinishedOnTime

      Hi, I'm having a problem with Visual Studio 2005 Development Server. I've recently upgraded from 2003 to 2005. I used to develop and debug against IIS, so I still have it installed on my workstation. When I run my app using Development Server, files in subdirectories don't get rendered. For example, images in ~/supportpages/images/ appear as broken links. I get the same thing for things like references to .js files where the script doesn't seem to get served. It looks like non-.aspx/.ascx pages outside the root folder of the site don't get served. However, if I open up IIS on my workstation and make a virtual path to the same folder (using a different alias), the site appears just fine, with all images and scripts working as they should. How can I fix this problem so I can just keep working with development server, but still see my site properly? (It's bad if my development environment doesn't work as closely as possible to my production environment). Thank you very much for any insight you may have.

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, As you may already know that the ASP.NET development server only serves the requests for the files which are in the application scope. If the web page in your application has a link to a static file like the image which is outside the application directory, the link will be broken. In this case, you may create a virtual directory for it and use the absolute path ( http://....) to get reference to the resource, or you can make a copy of the static files inside the application scope. Another way is to use your IIS to develop the application. If the static file is inside the application scope, then you may consider the authorization issue, since they are all subject to the ASP.NET authorization even including the static files.

      1 Reply Last reply
      0
      • F FinishedOnTime

        Hi, I'm having a problem with Visual Studio 2005 Development Server. I've recently upgraded from 2003 to 2005. I used to develop and debug against IIS, so I still have it installed on my workstation. When I run my app using Development Server, files in subdirectories don't get rendered. For example, images in ~/supportpages/images/ appear as broken links. I get the same thing for things like references to .js files where the script doesn't seem to get served. It looks like non-.aspx/.ascx pages outside the root folder of the site don't get served. However, if I open up IIS on my workstation and make a virtual path to the same folder (using a different alias), the site appears just fine, with all images and scripts working as they should. How can I fix this problem so I can just keep working with development server, but still see my site properly? (It's bad if my development environment doesn't work as closely as possible to my production environment). Thank you very much for any insight you may have.

        Y Offline
        Y Offline
        yesimlucky
        wrote on last edited by
        #3

        HI, The problem is not with 2003 or 2005. how can you get any image by virtual path without making the folder container virtual. and as per your msg. you are accessing the images outside of the root folder (not a virtual directiory). which makes it simply impossible. correct me if i am wrong. to solve the issue. copy the folder in the root folder if can be done. which would solve the problem. Regards. Sudhaakar D P

        F 1 Reply Last reply
        0
        • Y yesimlucky

          HI, The problem is not with 2003 or 2005. how can you get any image by virtual path without making the folder container virtual. and as per your msg. you are accessing the images outside of the root folder (not a virtual directiory). which makes it simply impossible. correct me if i am wrong. to solve the issue. copy the folder in the root folder if can be done. which would solve the problem. Regards. Sudhaakar D P

          F Offline
          F Offline
          FinishedOnTime
          wrote on last edited by
          #4

          Thank you both for attempting to help. My project structure is like this: The root folder of my project on my hard disk is in: My Documents\Visual Studio 2005\Projects\myproject\website\ From this root folder: / - Maps to http://localhost:/myproject using Development server, or http://localhost/mp using IIS /brands/default/images/ - location of my images files /scripts/ - location of my javascript files The images and javascript files do not get served using development server. They are not outside the root and they aren't in a subproject with another web.config or virtual folder defined to point to them. If I access the site using the IIS virtual folder then the site is served correctly, but if I try to debug against it using Visual Studio 2005 I get an error that the server isn't configured for debugging. (However, I can debug against this server using VS 2003). When I use the development server, the images and scripts aren't served properly but I can debug against that. As far as I can tell, the virtual folders for both IIS and development server are the same. For security, I tried giving the EVERYONE account full access to My Documents\Visual Studio 2005\Projects\myproject\website\ and all subfolders but that doesn't seem to help. Does anyone know what user process the development server runs under or anything else I can try to change its configuration? I have the same problem when viewing the site with either internet explorer or firefox. Also I verify that the paths to the images is correct in the html source from browser view source command. Thank you again for any insight you may have.

          M 1 Reply Last reply
          0
          • F FinishedOnTime

            Thank you both for attempting to help. My project structure is like this: The root folder of my project on my hard disk is in: My Documents\Visual Studio 2005\Projects\myproject\website\ From this root folder: / - Maps to http://localhost:/myproject using Development server, or http://localhost/mp using IIS /brands/default/images/ - location of my images files /scripts/ - location of my javascript files The images and javascript files do not get served using development server. They are not outside the root and they aren't in a subproject with another web.config or virtual folder defined to point to them. If I access the site using the IIS virtual folder then the site is served correctly, but if I try to debug against it using Visual Studio 2005 I get an error that the server isn't configured for debugging. (However, I can debug against this server using VS 2003). When I use the development server, the images and scripts aren't served properly but I can debug against that. As far as I can tell, the virtual folders for both IIS and development server are the same. For security, I tried giving the EVERYONE account full access to My Documents\Visual Studio 2005\Projects\myproject\website\ and all subfolders but that doesn't seem to help. Does anyone know what user process the development server runs under or anything else I can try to change its configuration? I have the same problem when viewing the site with either internet explorer or firefox. Also I verify that the paths to the images is correct in the html source from browser view source command. Thank you again for any insight you may have.

            M Offline
            M Offline
            minhpc_bk
            wrote on last edited by
            #5

            FinishedOnTime wrote:

            The root folder of my project on my hard disk is in: My Documents\Visual Studio 2005\Projects\myproject\website\ From this root folder: / - Maps to http://localhost:/myproject using Development server, or http://localhost/mp using IIS /brands/default/images/ - location of my images files /scripts/ - location of my javascript files The images and javascript files do not get served using development server. They are not outside the root and they aren't in a subproject with another web.config or virtual folder defined to point to them.

            Does that mean the brands/default/images and scripts are all the subfolders of the ..myproject\website\ physically?

            FinishedOnTime wrote:

            but if I try to debug against it using Visual Studio 2005 I get an error that the server isn't configured for debugging. (

            You need to make sure the debug attribute of the compilation entry in the web.config file is set to true.

            FinishedOnTime wrote:

            Does anyone know what user process the development server runs under or anything else I can try to change its configuration?

            The built-in ASP.NET development server ( or Cassini) runs under the account which you use to log on to the machine.

            FinishedOnTime wrote:

            Also I verify that the paths to the images is correct in the html source from browser view source command.

            How do the authentication and authorization settings in the web.config look like? Like I said earlier, that might be a matter of the authorization. Since the ASP.NET serves all the requests for the files in the application even the static files, so if an unauthenticated user accesses a web page ( with the built-in server), he might not be able to view the image files. If this is the case, you may use the location tag in the web.config file to allow an anonymous or unauthenticated user to access the static files.

            F 1 Reply Last reply
            0
            • M minhpc_bk

              FinishedOnTime wrote:

              The root folder of my project on my hard disk is in: My Documents\Visual Studio 2005\Projects\myproject\website\ From this root folder: / - Maps to http://localhost:/myproject using Development server, or http://localhost/mp using IIS /brands/default/images/ - location of my images files /scripts/ - location of my javascript files The images and javascript files do not get served using development server. They are not outside the root and they aren't in a subproject with another web.config or virtual folder defined to point to them.

              Does that mean the brands/default/images and scripts are all the subfolders of the ..myproject\website\ physically?

              FinishedOnTime wrote:

              but if I try to debug against it using Visual Studio 2005 I get an error that the server isn't configured for debugging. (

              You need to make sure the debug attribute of the compilation entry in the web.config file is set to true.

              FinishedOnTime wrote:

              Does anyone know what user process the development server runs under or anything else I can try to change its configuration?

              The built-in ASP.NET development server ( or Cassini) runs under the account which you use to log on to the machine.

              FinishedOnTime wrote:

              Also I verify that the paths to the images is correct in the html source from browser view source command.

              How do the authentication and authorization settings in the web.config look like? Like I said earlier, that might be a matter of the authorization. Since the ASP.NET serves all the requests for the files in the application even the static files, so if an unauthenticated user accesses a web page ( with the built-in server), he might not be able to view the image files. If this is the case, you may use the location tag in the web.config file to allow an anonymous or unauthenticated user to access the static files.

              F Offline
              F Offline
              FinishedOnTime
              wrote on last edited by
              #6

              Thank you minhpc_bk for your reply. Yes, brands/default/images and /scripts are subfolders ..myproject\website\brands\default\images and ..myproject\website\scripts respectively. The are just subfolders off of the root of my project. If I open my site using iis (http://localhost/mp/) then my site appears properly, all images visible. However, if I try to access the site using Cassini (http://localhost:/myproject) then images and scrips do not get served in the html source. (I had to use mp on IIS because the alias myproject was detected to be declared already, as it is used for the development web server). The debug attribute of the compilation entry is set to true. (see web.config contents pasted below) I think that it is likely a security issue but as it should be running under my user account Cassini should be able to access the files in My Documents, and therefor access the project folder which is nested in my documents\visual studio 2005\projects... with inhereted permissions. I also added the EVERYONE account and that did not help. I do not get any errors in the web browser either. Is there a log file somewhere I could check for clues? Here is the web.config if it helps to provide clues: <?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings> < ... custom key values are in here ... > </appSettings> <connectionStrings/> <system.web> <compilation debug="true" defaultLanguage="c#" /> <authentication mode="Windows"/> <customErrors mode="RemoteOnly" ></customErrors> <trace enabled="true" pageOutput="true" /> </system.web> </configuration> Thank you again for your help. I'm REALLY stuck here!!! -- modified at 21:39 Wednesday 29th March, 2006

              F 1 Reply Last reply
              0
              • F FinishedOnTime

                Thank you minhpc_bk for your reply. Yes, brands/default/images and /scripts are subfolders ..myproject\website\brands\default\images and ..myproject\website\scripts respectively. The are just subfolders off of the root of my project. If I open my site using iis (http://localhost/mp/) then my site appears properly, all images visible. However, if I try to access the site using Cassini (http://localhost:/myproject) then images and scrips do not get served in the html source. (I had to use mp on IIS because the alias myproject was detected to be declared already, as it is used for the development web server). The debug attribute of the compilation entry is set to true. (see web.config contents pasted below) I think that it is likely a security issue but as it should be running under my user account Cassini should be able to access the files in My Documents, and therefor access the project folder which is nested in my documents\visual studio 2005\projects... with inhereted permissions. I also added the EVERYONE account and that did not help. I do not get any errors in the web browser either. Is there a log file somewhere I could check for clues? Here is the web.config if it helps to provide clues: <?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings> < ... custom key values are in here ... > </appSettings> <connectionStrings/> <system.web> <compilation debug="true" defaultLanguage="c#" /> <authentication mode="Windows"/> <customErrors mode="RemoteOnly" ></customErrors> <trace enabled="true" pageOutput="true" /> </system.web> </configuration> Thank you again for your help. I'm REALLY stuck here!!! -- modified at 21:39 Wednesday 29th March, 2006

                F Offline
                F Offline
                FinishedOnTime
                wrote on last edited by
                #7

                Since you told me that the name of the web server is Cassini it gave me new google-fodder. I found some articles which helped me to find a work-around. I had setup my solution to include my website by using direct file access. When I changed this to use local-iis I am now able to debug using IIS. Now that I can debug using IIS I don't need to use Cassini any more. At this point I am able to get back to work. The clues you gave me helped me to find a solution to my problem. Thank you very much! Do me a favor and download my software from www.sen.us Its free.

                M 1 Reply Last reply
                0
                • F FinishedOnTime

                  Since you told me that the name of the web server is Cassini it gave me new google-fodder. I found some articles which helped me to find a work-around. I had setup my solution to include my website by using direct file access. When I changed this to use local-iis I am now able to debug using IIS. Now that I can debug using IIS I don't need to use Cassini any more. At this point I am able to get back to work. The clues you gave me helped me to find a solution to my problem. Thank you very much! Do me a favor and download my software from www.sen.us Its free.

                  M Offline
                  M Offline
                  minhpc_bk
                  wrote on last edited by
                  #8

                  Great :-D!

                  FinishedOnTime wrote:

                  Do me a favor and download my software from www.sen.us Its free.

                  I will.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups