Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8434223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:35:54+00:00 2026-06-10T06:35:54+00:00

I have my ASP.NET site generated from Web Forms template in Visual Studio 2012.

  • 0

I have my ASP.NET site generated from Web Forms template in Visual Studio 2012. I have this code in the master page:

<asp:PlaceHolder runat="server">
    <%: Styles.Render("~/Content/themes/base/css", "~/Content/css") %>
    <%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>

When I run my site from VS, all works fine. When I deploy it to the server, css files cannot be loaded because the above code resolves as

<link href="/Content/themes/base/css?v=UM624qf1uFt8dYtiIV9PCmYhsyeewBIwY4Ob0i8OdW81" rel="stylesheet" type="text/css" />
<link href="/Content/css?v=tMLDfv3u-lElLSOX_gsfU7tfsfKPoY_vJBePC7KLa6U1" rel="stylesheet" type="text/css" />
<script src="/bundles/modernizr?v=EuTZa4MRY0ZqCYpBXj_MhJfFJU2QBDf0xGrV_p1fHME1" type="text/javascript"></script>

All the paths are counted from the domain’s root, while my site is deployed under a subfolder, like http://MyDomain.com/MySyte/. Obviously, the tilde operator ~ is not handled right. In all other places, like hrefs, it is properly replaced and navigation works fine in deployed site.

Another example. For this code from master page

<asp:ScriptManager runat="server" AjaxFrameworkMode="Explicit">
    <Scripts>
        <asp:ScriptReference Name="MsAjaxBundle" />
        <asp:ScriptReference Name="jquery" />
        ...
    </Scripts>
</asp:ScriptManager>

I have this html output

<script src="/bundles/MsAjaxJs?v=eYkLZimNY09iWQvWpdPDkxCLGwdMBLWkJ4bU5r3y6GU1" type="text/javascript"></script>
<script src="Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>

So the path to jquery is proper and relative, while MsAjaxBundle resulted in some absolute path.

I consider this behavior being a bug. How can I workaround it?

Update:

  • Windows 7 x64
  • IIS 7.5
  • ASP.NET Application Target Framework 4.5
  • IIS Application Pool Framework 4.0
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:35:56+00:00Added an answer on June 10, 2026 at 6:35 am

    The problem was caused by our proxy server, who actually forwards http://MyDomain/MySite/ to http://InternalDomain:InternalPort/. And for that internal domain application root was actually a site root.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web site in asp.net that uses a master page. In this
I have an Visual Studio 2010 ASP.Net project. And I want to deploy this
I have an ASP.NET web forms site with a rather large menu. The HTML
I have an ASP.NET MVC4 site with mobile content. When I deploy this on
I have a asp.net web site that was developed on the .Net Framework v2
I have a ASP.NET Web Forms application that internally makes many SOAP and REST
In WebForms ASP.NET site (IIS, single app pool), I have call to lengthy web
My setup: ASP.NET 4.0 Web Site running on IIS 6.0. I have a site
I have an asp.net 4.0 web site that generates email alerts based on several
I have an ASP.NET web site technology that I use for scores of clients.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.