We have an umbraco install that just recently started taking forever for the home page to load. Like 5+ minutes. I'm a developer but have never really worked with umbraco. How can I go about trying to debug this?
Edit** So I've pinpointed it to this line. Any ideas why it's making the site so slow?
<xsl:variable name="ContentItem" select="umbraco.library:GetXmlNodeById($itemToDisplay)" />
Unlikely the GetXmlNodeById is so slow. XSLT is outdated,I assume that you also have an old umbraco like 4,5,6
To find the issue use the Debug mode.
In the web.config below <appSettings>
set umbracoDebugMode to true
<add key="umbracoDebugMode" value="true" />
Go to your slow page and add this querystring ?umbDebug=true&umbDebugShowTrace=true to the URL.
Related
My local copy of Umbraco has the save button showing up as [buttons_saveAndPublish] and a lot of the other links in Umbraco have the same issue. I checked my console and I don't have any JavaScript issues showing.
OK, so it looks like it broke when I changed my target framework from 4.5 to 4.6 to fix a TLS related API call issue
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="51200" fcnMode="Single" />
Once I changed the 4.6 to 4.5 this issue went away
Http/2 is enabled on server and yesterday I noticed that on Iphone (IOS 10.2) does not load some resources with error:failed to load resource:connecting to server is not possible. When I connect Iphone to Mac there are no errors in console but simply result of some requests result imidiatelly in that error. Interesting thing could be the fact that resources which are not loaded are subdomain of real domain( CNAME to be correct). Site is on https.
Server is Windows server 2016.
EDIT:
We resolved this subdomain problem, but still there are requests from same domain that are not responding with any response.
I know IOS > 9.3 supports http/2 when resources are loaded over https but thing that resources which not working are not part of that domain could help to resolve this problem but I don't know how.
I know that probably problem is related to http/2 protocol because my android native appliacation also stopped working with error : java.io.IOException: stream was reset: PROTOCOL_ERROR . I resolved that problem by forcing my application to use http/1. Now works. But how to resolve that iphone safari problem?
I'm using ASP.NET Web Forms as backend (which supports http2 since ASP.NET 4.6 which I'm using).
It seems that solution has been found. After few days of investigating disabling dynamic content compression helped.
The answer has already been correctly provided here above by Vlado Pandžić.
I cannot comment as I am new on this site, but I wanted to add something I found.
IOS less than version 11 does support HTTP/2. BUT! It will get stuck if the page is too big and compressed. I'm not sure what the cut-off is, but if you open a small page which has dynamic compression (Gzip or whatever) it will work fine. ASP or PHP etc, doesn't matter. Once the page reaches a compressed data size which requires multiple round-trips to pull the data, then Safari gets it's knickers in a twist.
It will literally go into an endless loop, hammering your server with requests. I was seeing thousands of page hits while Safari was just stuck on a blank white screen.
The problem for me, is that disabling dynamic compression on your entire website will result in penalties from Google for mobile-friendliness. Google wants you to have compression on, but you have to disable it for Safari, which sucks.
My solution to this was the enable dynamic compression on the entire website, but I used web.config file to disable it for specific pages which I know can be quite large in size.
<location path="large-page.aspx">
<system.webServer>
<urlCompression doDynamicCompression="false" />
</system.webServer>
</location>
Good luck!
Matt
You can also disable gZip and use brotli instead for compression, older versions of Safari don't support it so it seems to work.
https://github.com/saucecontrol/Brotli-IIS
This is quite an old thread, however, there's a better answer if you need don't want to cut off old iOS devices than disabling all compression for either this site (accepted answer) or for all browsers for a given resource (Matt Deemer).
A URL Rewrite rule can disable compression just for the resources and browsers that matter.
Recently, I wanted to move an established Classic ASP site, which can serve large, dynamically created resources, to HTTP/2.
The following rule allowed everyone but old WebKit versions to get the content compressed.
<rule name="No compression for old WebKit">
<match url="^(.+\.asp.*)" />
<conditions>
<add input="{HTTP_USER_AGENT}" pattern="AppleWebKit\/60[0-3]" />
</conditions>
<serverVariables>
<set name="HTTP_ACCEPT_ENCODING" value="none" />
</serverVariables>
<action type="Rewrite" url="{R:1}" />
</rule>
NOTES: WebKit/604 and greater do not have the http/2 - compression issue.
url-rewriteclassic-asp
I am writing a Federated web solution it has multiple projects. Debugging has been working fine until yesterday when suddenly (I don't recall messing with anything critical) I got the 'breakpoint will not currently be hit. No symbols have been loaded for this document' message on my 3 ASP.MVC projects in the solution.
I trawled around the web and this site for advice and these are the things I have done.
checked build > configuration manager for correct build setting
checked project > properties to ensure ASP.Net ticked for debuggers
checked Web.config to ensure 'compilation debug="true" targetFramework="4.0"'
iisreset
deleted bin & obj directories in each project
clean and rebuild the solution
deleted the contents of
'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files'
exited and restarted VS2010
cried like a baby
After doing these things 2 of the 3 ASP.MVC projects are debugging properly, but the 3rd and critically the one I actually want to step through is not.
other info for you
using locally install IIS (not IIS express)
Windows 7
VS2010 with all service packs
ReSharper is installed
Chrome is the Browser I'm using
Any help appreciated.
This may be obvious, but it wasn't in your list of things you've done and in a state of panic can get forgotten, but have you checked the the Directory in IIS is the same as the one the code VS has loaded?
VS should recreate the site (depending on project settings), so try closing VS, deleting the site, reopening the project and letting VS recreate the IIS site for you.
I have worked out what the problem is.
While I had the initial problem of all projects not debugging the federation project turned out to be a special case. I have been away on leave and had forgotten that I had this in my web config
<federatedAuthentication>
<!--
<wsFederation passiveRedirectEnabled="false" issuer="https://localhost/FederationProvider/"
realm="https://localhost/Application/Home/FederationResult" requireHttps="true" />
-->
<wsFederation passiveRedirectEnabled="false" issuer="https://localhost/Issuer/"
realm="https://localhost/Application/Home/FederationResult" requireHttps="true" />
<cookieHandler requireSsl="true" path="/Application/" />
</federatedAuthentication>
When I changed it so I am using the federator rather than the issuer directly the debugger works.
<federatedAuthentication>
<wsFederation passiveRedirectEnabled="false" issuer="https://localhost/FederationProvider/"
realm="https://localhost/Application/Home/FederationResult" requireHttps="true" />
<!--
<wsFederation passiveRedirectEnabled="false" issuer="https://localhost/Issuer/"
realm="https://localhost/Application/Home/FederationResult" requireHttps="true" />
-->
<cookieHandler requireSsl="true" path="/Application/" />
</federatedAuthentication>
I feel pretty stupid for not realising this earlier. VS2010 was just being too smart.
The Report Viewer control apparently only works in a Web Forms page (I'm using MVC 2). So, I make one, add my report to it, and try making a link to it from one of the Views in my MVC 2 site. I consistently get the error "The resource cannot be found". I've tried every possible URL I can think of it get it to work. I even dragged and dropped a Hyperlink tool into the page and set it to link to the Web Form in question and got the same results.
The Web Form is in the /Views/MaintenanceReports folder. I've tried URLs such as ~/Views/MaintenanceReports/DriverList.aspx (with and without the *.aspx) and a few others. But, I'm very sure this should be the URL.
I also added this page route to the Global.asax file in hopes that it would do something magical routes.MapPageRoute("DriverListing", "MaintenanceReports/DriverListing", "~/Views/MaintenanceReports/DriverListing.aspx");
I also tried adding, per the suggestion of one of my fellow programmers, an iframe to an MVC View that had the Web Form in question as its source. This also gave me the same error.
I've got the book Pro ASP.NET MVC 2 on hand and it doesn't give me anything that helps. It basically says that there shouldn't be an issue.
The server runs IIS 7 and has the .NET 4 framework installed.
Normally I'd spend more time looking for an answer, but I'm quite pressed for time currently. This is my last day here (internship) and I'd like to get this last thing done before I leave.
Thank you for all your help.
Try using the StopRoutingHandler. I think the issue is you need to tell MVC to ignore those urls.
routes.Add(new Route("MaintenanceReports/{*resource}",
new StopRoutingHandler()));
Update
It looks like the above doesn't work for routing within the Views folder. The simple solution is to move the WebForms out of the Views folder, and the WebForms work out of the box alongside MVC.
You can also add this line into to display a .asxp page
<httpHandlers>
<!-- see below -->
<clear />
<add path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory"/>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler" />
</httpHandlers>
My ASP.NET MVC application is within a folder called Stuff within IIS 6.0 webroot folder. So I access my pages as http://localhost/Stuff/Posts. I had EMLAH working while I was using the in-built webserver of Visual Studio. Now when I access http://localhost/Stuff/elmah.axd, I get resource not found error. Can anyone point my mistake here! Here is config file entry,
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/> //Handler
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/> //Module
Working with IIS7 I found I needed both sections of the web.config populated (system.web AND system.webServer) - see Elmah not working with asp.net site.
Perhaps this is related.
Have you added an ignore *.axd routes in global.asax?
For Elmah, we need to differentiate between two things:
First the http modules doing all the work of error logging, emailing...etc.
Second, the http handlers, displaying the error log page and other pages (rss...etc.)
I was having the same problem of 404 resource not found because I have a weird setup!
on my development machine, (windows 7, iis 7 ) elmah was working like a charm because the application pool was working in the integrated pipeline mode. In the production machine, however, the application was using the managed pipeline and I tried all my best to make elmah work but it was all useless...
I then got the idea of displaying the UI (error log page, rss, error detail,...) using regular aspx pages.
I downloaded the source code, made some changes (sorry Atif, I was forced to do this because I needed the quickest solution) and then in my application , I created a folder under which I created regular aspx pages which inherits from Elmah defined pages.
The page only contains one line (ex: for the detail page: <%# Page Language="C#" Inherits ="Elmah.ErrorDetailPage"%>)
Now, I was able to run Elmah regardless of IIS 6/7 and it is working like a charm.. and It saved me from a big headache of correctly configuring http handlers and troubleshooting its work! additionally, configuring security is much simpler!
I don't know if the community is interested in this solution (If so, I am ready to post my full changes).
Hope that this gives you an idea on how to solve the problem in an alternative way (and if you need the modified dll with complete instructions on how to use it, just tell me!)
In the application pool settings in IIS set Managed Pipelin Mode to Classic if you don't want to change code or the web.config file. Your axd.s will then work as before.
Can you post the rest of your web.config?
Or, if you're comfortable enough, can you just ensure that the httpHandlers and httpModules (NOT handlers and modules) sections are filled in properly in the web.config?