<asp:Label ID="lblApplicationPath" runat="server"
Text='<%# HttpContext.Current.Request.ApplicationPath %>'>
This depends on where the application is actually defined. In the cases described, it appears that the application is defined at the
/ level but the files sit in a subfolder. Your own example appears to use the built in web server to the studio. Perhaps you should configure your local IIS to serve this website and force the application root to be defined at some subfolder level other than