Js and css files not loading from bundle.cs after upgrading umbraco (return 404) - asp.net-mvc

we upgraded our umbrao from 7.10.0V to 7.12.4V.
after installation we have noticed that all js & css files which suppose load from bundle.cs return 404 status.
why is that happened?
thank you all!

after searching for an answer we've noticed that global.asax not fired at all!.
seeing the history of the file showed that
<%# Application Codebehind="Global.asax.cs" Inherits="**" Language="C#" %>
line was overridden after the upgrade.
changing this code back to what it was fixed the problem :).

Have yoou checked namespace of Global.asax? Maybe still novice to umbraco.
Needed: Umbraco.Global instead of: Umbraco.Web.UmbracoApplication

Related

Google Site Map error in Umbraco

I've installed google site map on my Umbraco (I installed it in 4.9, 4.8 and 4.7). I followed steps in [this site][1] http://our.umbraco.org/projects/website-utilities/google-sitemap-for-umbraco-4-%28jespercom%29 . But when I browse mydomain.com/GoogleSiteTree.aspx I get this error
This page contains the following errors:
error on line 2 at column 1: Document is empty
Below is a rendering of the page up to the first error.
I am unable to find the reason. Anyone knows the answer please help.
Can you open your masterpage and-or XSLT and make sure there is no whitespace at the top of the file?
You may need to bump up the macro in the masterpage that renders the macro, like so:
<%# Master ... %><asp:Content ContentPlaceHolderID="MyPlaceHolder" runat="server"><umbraco:Macro Alias="GoogleSitemap" runat="server" /></asp:ContentPlaceHolder>
This might fix your problem as I've seen similar issues when rendering XML or RSS feeds direct from a macro out to the HTTP response.

could not load type MvcApplication on Global.asax

I copied my MVC3 Razor website using FTP. However, when I type the URL I get an error:
"Could not load type Mynamespace.MvcApplication"
and it shows the problem is with Global.asax:
Line 1: <%# Application Codebehind="Global.asax.cs" Inherits="MvcPanamaVibes.MvcApplication" Language="C#" %>
My project runs fine on my computer. I tried by only uploading Global.asax and the rest but got the error. I uploaded Global.asax.cs as well but the problem persists.
If my application is fully compiled and runs fine on my computer, why is it complaining about this? what am I missing?
I encountered this problem, it was fixed when I rebuilt my MVC project on the server.
I was working using IIS Express, and tried with many solutions but none of them worked, after 2 days I found out 1 possible solution:
Copy dlls from release output folder, especially [project name].dll
Paste to debug output folder then run.

Why does intellisense quit working

I'm working in an ASPX page where intellisense is not functioning. The page compiles and functions correctly - but if I intentionally create a syntax error, instead of placing the message in-line it's being displayed in the top line - the <%# Page Title="Stuff" Language="C#"...%>
In the same project, but a different page, everything works as expected.
Declaration:
<%# Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<OrderRow>" %>
Curiously have you updated your project from Visual Studio 2005/2008?
Myself and my work colleagues had a similar situation, and I managed to fix it by running devenv.exe /resetuserdata. This completely wiped all my user data (as hinted by the argument!) and so I had re-add my themes, settings and keyboard shortcuts.
It's had varying degrees of success, I'll be honest, but it seems to be quite a serious issue for a lot of developers right now.
Accidentally found the condition that was preventing Intellisense:
The original page had a code block:
<%
=paymentAmt%>
At one point during my editing I collapsed that whitespace for sake of readability to:
<%=paymentAmt%>
Intellisense highlighting reappeared.

umbraco front end site stopped working suddenly

I created one webapplication and placed the default.aspx page in the root folder of the umbraco (i.e., httpdocs folder) and the application dll into the bin folder.
I used the name “Default.aspx” as the other names are not working.
Now the issue is all the pages are redirecting to the default.aspx page (I haven’t made any config changes anywhere in the umbraco setup)
I found this root cause and removed the default.aspx page and its respective dll from the bin folder.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /default.aspx
I stuck up here and struggling to resolve it.Please help me out on this
THanks,
Srilakshmi
Have you tried the 'republish website' option by right-clicking on the top level content folder icon after logging into Umbraco as an admin?
For what it's worth - and I know this is an old question - but this happens when default.aspx has been either overwritten, deleted or otherwise changed so that it doesn't call umbraco.UmbracoDefault. Just make sure that default.aspx contains only the following code :
<%# Page language="c#" Codebehind="default.aspx.cs" AutoEventWireup="True" Inherits="umbraco.UmbracoDefault" trace="true" validateRequest="false" %>
Thought this might help others as I overlooked it today with a similar problem :)

CSS not updated during debugging ASP.NET MVC application

I am working on a test application based on ASP.NET MVC. I am new to CSS stuff so I am learning that as well.
I have created a master page called "new.master" and created a new css "new.css". I am calling the view from controller as:
return View ("About", "new");
What I am doing is that I am frequently updating the css and master page. So I run the application in debug mode frequently. After sometime I stop seeing the effect of changes in css. When I "view source" in chrome and check the css, it shows an old version.
When I change the name of both master page and css, I start to receive updated views but that works for sometime and then again I stop getting the CSS updates. Have you faced this problem? How can I fix it? (Its terribly annoying!)
Your browser is caching the css. If you force a refresh with F5 that should display any changes.
I think this may be a browser cache issue. In in IE and FF I usually do Ctrl + F5 or Ctrl + Refresh button. Also you can manually clear the cache. For IE you can use the IE Dev Toolbar and for Firefox there is Firebug with both you can clear the cache easily. Not sure about chrome, sorry.
Sayed Ibrahim Hashimi
My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build
I found another case in which this can happen.
We started our application with just plain links to the CSS files, then switched to using bundling. We updated the old <link href="#Url.Content("~/somePath/someStyle.css")" rel="stylesheet" type="text/css" /> to #Styles.Render("~/Styles/bundles/someStyle").
We also use a few stylesheets which are only needed for some pages, and they have their own bundle. Now, for one of them, we forgot to change the link tag to the #Styles.Render statement.
The result was that this CSS got updated now and then (so we thought everything is OK; the style wasn't missing), but we could not influence when the update happens. When I started making changes to the file, I realized that nothing I do (emptying the cache, rebuilding the project, restarting Cassini) will trigger an update. The browser always got a 304 Not modified.
So, if you have these symptoms, check your links.
Please use Ctrl+F5 to refresh your browser.
F5 may give you the same page even if the content is changed, because it may load the page from cache. But Ctrl - F5 forces a cache refresh, and will guarantee that if the content is changed, you will get the new content.
hope this will help you
Thank you
go to chroom developer panel by right click inspect -> then go to Network tap -> tick the Disable cache checkbox (note: this should always be checked) -> Refresh the page by pressing F5.
this work for me, hope this help others who have this issue! :)
It's very possible that css is being cached in your browser, so simply clearch browser cache, it should help
This happened to me when I had a master view that would load partial views depending on which partial view the user wanted to see, but the answer from this page helped, https://forums.asp.net/t/1763494.aspx?applying+CSS+layouts+to+a+partial+view
CSS must be referenced in the of the Html document. As a
consequence you cannot include them in a partial view...because in
such case the css is included in the Html body. Please plce the style
sheet in head of the page that hosts the partial view.
I would have css links in my partial views and any modifications to the css files would never happen, even if I pressed Ctrl-F5 in the browser. I also tried clearing cache contents in the developer tools. I noticed by viewing the source stylesheets that the css files linked by the partial views were not changing, so the fix for me was to move the css links from the partial view to the main view where these partial views were to be held.
I had something similar happening to me.
Then suddenly noticed the bundle was added to the page:
#Styles.Render("/bundles/classifiedDetailCss")
instead of:
#Styles.Render("~/bundles/classifiedDetailCss")
Note the missing ~ character in the first example.
(The first example only worked after building the project, otherwise it would return a cached version even in debug mode.)
This can help solve this issues in both dev and production.
use asp-append-version="true"

Resources