Umbraco 7 Content editor randomly hangs when generating thumbnails - asp.net-mvc

Umbraco 7.6.6, running under IIS 8.5 on fully patched Windows Server 2011 R2 Standard, 64bit.
Our content editors notice that often when they create a new article (which has some graphics specified) the system hangs after they try to browse to a different article... or indeed anywhere in the front-end site, too. It only affects them; other users are still able to browse and/or create content.
F12 dev tools shows that browser is pending the result of this type of call:
http://whatever.com/media/1101/thumbnail_pmc-1x2.jpg?width=500&mode=max&animationprocessmode=first
If I try to view that thumbnail without the querystring data, it loads instantly... while the first call is still hanging in it's unresponsive tab:
http://whatever.com/media/1101/thumbnail_pmc-1x2.jpg
DEBUG level Umbraco logs just show this:
2017-10-10 17:02:53,120 [P2816/D6/T57] DEBUG Umbraco.Web.UmbracoModule - Begin request: http://whatever.com/media/1101/thumbnail_pmc-1x2.jpg?width=500&mode=max&animationprocessmode=first.
No errors in the umbraco logs, no errors in IIS logs, nothing in event viewer.
Best I can tell, something is going wonky in the browser. Can anybody please advise on how I can troubleshoot further?
Thanks!

Related

Launching EPIserver website from Visual Studio takes at least 5 minutes

I do not know if this is a Visual Studio, ASP.Net-MVC, IIS Express or EPIserver issue.
The problem is that in Visual Studio, when I click on what looks like a play icon, it takes at least 5 minutes until my local EPIserver development website loads in the browser.
I have tried selecting different browsers from within Visual Studio: Firefox, Chrome, MS Edge.
We have also tested this on 2 identical laptops, and 2 identical desktops. All running the latest Windows 10.
What happens is that about 4-5 seconds after I click on play, a browser instance will be launched. This is pointing to localhost. It then takes at least 5 minutes for the website to start loading in the browser.
This is making it really hard to work efficiently.
I would be very thankful for any tips on what to try, what to check, etc..
I am a relatively new users when it comes to all of the above mentioned components, so I would be very thankful for step by step tips on what to check/test.
Enable log4net logging (usually config file called EPiServerLog.config in the site root) using a relevant appender with debug-level logging.
The logs can probably show you what happens after the site has started. I have seen examples where poor implementations have, for example, iterated all content on a site on startup, causing a ton of database traffic as the cache is populated. Needless to say that takes a long time. :)
If the logs don't give anything away, I would suggest attaching the VS debugger to do some basic profiling on startup.
Example on configuring log4net, albeit an old post.

ActiveX cannot screen capture a page that is hosted on the same server

I have an app that takes a screenshot of web pages and creates a resized image. The app is basically loading a web page that calls an ActiveX to load a web page using IE resources and take the screenshot. This app has been running on a Windows Server 2003 without any problems for a couple of years.
But now that I have upgraded the server to Windows Server 2008, the screenshot action is timing out. From tests I can see that it successfully takes a screenshot of any web page hosted on the Internet... except pages hosted on the same server.
Whenever it tries to capture a page loaded on a site hosted on the same server as the app, it times out. ESC is disabled and it seems that all other permissions are ok, ie: it works for remote pages but for home pages.
Any ideas as to what can be causing this and how to fix it?
After further testing I have narrowed down the reason for failure being due to the page being popluated from a MS-SQL database record on the same server as the one taking the screenshot. The same page generated on a remote server captures ok. I have further established that the error is not peculiar to the ACASystems DLL because it also affects another DLL for creating MHT files from web pages. This DLL (Chilkat.MHT) also uses IE to load and assemble the web page on the fly and then saves it as a.mht file.
So the problem is more related to IE assembling web pages from MS-SQL while running ActiveX. But to resolve this enigma?
Maybe a routing issue (DNS/hostfile..) ? Does the page loads on local session with IE ?
There is no solution for this without editing the ActiveX code. Since the DLLs in question are third party resources, such editing is not possible.
After testing 3 different ActiveX that load a web page that either take a screenshot or save as .mht, it was found that they all failed when loading a page that was querying SQL on the same server. After contacting the 3 DLL developers we were informed by all of them that their ActiveX has no impact on MS-SQL.
Unfortunately, our tests tell us otherwise. At this stage we are left guessing however this article about in-process vs out-process execution may be related.
The workaround for us to solve this problem was to assemble the page to be captured from request queries passed to the page rather than populate from SQL queries. This alternate works perfectly.

Asp.Net-MVC application dying

I have a strange issue with an Asp.NET MVC application.
Using Asp.NET MVC 3 Preview 1 on IIS 7.5 - Integrated
After building the application everything runs fine. Then after some random amount of time (or sometimes after updating a view or js file) the application dies.
Meaning, requesting the root page, I get the 403 error and requesting any other page I get a 404 error.
After a rebuild everything works fine again for a little while until it dies again.
I am seeing this on two different development machines. Also, I have another application which is very similar (MVC 3, IIS etc) on both dev machines and this one runs without problem. I have inspected the config files in detail and cannot see anything of notable difference.
Does anyone know what could cause an application to die or where to look for further information? (I can still access elmah.axd though no information is there).
There's not much to go on here, but the 403 and 404 are clues that at least ASP.NET routing is not working; 403 is coming back because the web server thinks you want to do a directory browse, 404 because your request doesn't have a valid corresponding resource.
Since you are using the new version of MVC, I would suspect the issue may lye there. When you get the error condition, can you browse to a regular .aspx page? Does it execute server side code correctly?
You have the site hosted in IIS 7.5, not just the built in Visual Studio web server, right? Is it possible to turn on monitoring/event logging to see if IIS is taking a hit?
I apologize for not having any actual answer, sounds like you have a tough issue to debug.
Good Luck!

Crystal Reports CrystalImageHandler and MVC .NET

I am unable to show images in CR reports. I'm developing a MVC 2 project in VS 2008 with Crystal Reports that comes with it (10.5). Everything works fine, except for images. I can see them in the preview mode within the CR designer, but not when the app is deployed, which means I am loading data OK but something's wrong with IIS and/or routing.
When running the app, images appear with the red cross and if I navigate to the following url directly I get a 404 error.
http://localhost:1234/CrystalImageHandler.aspx
I think my problem is similar to the one here but that workaround doesn't seem to work for me.
I should also comment that I'm using the Areas feature within MVC.
EDIT: Forgot to add: When exporting the report to PDF the images are shown ok.
I don't know much about crystal reports, but is there an Http Handler? If there is and you are running IIS 7 on the live server, is the handler registered in the web.config under both system.web/httpHandlers and under system.webServer/handlers?
I forget to register the handlers under system.webServer/handlers for our IIS 7 server sometimes and we were having a similar issue with the Microsoft Charting Controls.

Using WatiN through MbUnit to test ASP .Net MVC web application

I am trying to apply some WatiN UI tests to my new ASP .Net MVC application, running the WatiN tests through MbUnit, but am having some difficulties.
If I follow the instructions (exactly) on this page, then the google homepage loads, up the text is inserted, the search is done and the test passes. (no problem here).
However, when I simply change the URL of the line...
var ie = new IE(new Uri("http://www.google.co.uk"));
to the website hosted on my PC through IIS (on Win7), (e.g. to http://localhost/myapp/) the homepage of my application loads fine, but the test-runner seems to still be waiting for confirmation that the page has loaded and then the test fails due to a timeout.
Here's the failed response from within the IDE...
*** Failures ***
Exception
WatiN.Core.Exceptions.TimeoutException: Timeout while Internet Explorer state not complete
at WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.ThrowTimeOutException(Exception lastException, String message)
at WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.HandleTimeOut()
at WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.Try[T](DoFunc`1 func)
at WatiN.Core.WaitForCompleteBase.WaitUntil(DoFunc`1 waitWhile, BuildTimeOutExceptionMessage exceptionMessage)
at WatiN.Core.Native.InternetExplorer.WaitForComplete.WaitWhileIEReadyStateNotComplete(IWebBrowser2 ie)
at WatiN.Core.Native.InternetExplorer.IEWaitForComplete.DoWait()
at WatiN.Core.DomContainer.WaitForComplete(IWait waitForComplete)
at WatiN.Core.IE.WaitForComplete(Int32 waitForCompleteTimeOut)
at WatiN.Core.DomContainer.WaitForComplete()
at WatiN.Core.Browser.GoTo(Uri url)
at WatiN.Core.IE.FinishInitialization(Uri uri)
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess)
at WatiN.Core.IE..ctor(Uri uri)
at FppRendersUI.Test.Program.DoSomething() in C:\Dev\MyCode.Test\Program.cs:line 18
Anybody else get this, or is it just me?
There should be no significant differences testing a website on locahost.
Two possible causes:
If your webpage contains any significant AJAX then it's possible that the page never appears to be fully loaded so WatiN just keeps waiting.
I have fixed one or two bugs in WatiN now and then related to detecting that a page has been fully loaded. You might try grabbing the WatiN trunk source and building a fresh copy of the latest code.
If none of that helps, WatiN also has "NoWait" variants of several actions like clicking. You can also override what it means to WatiN to wait for a page to be complete by registering a WaitForComplete handler.
I've had this happen to me when I had a reference to a resource that didn't load.
Do have a reference to a JS, CSS, or image file that doesn't exist?
If you look at the HTTP traffic with Fiddler do you see any connections timing out?
Make sure the program is running as an administrator. On Win7 it will load the page but Watin can't access the DOM unless Visual Studio or Gallio Icarus are started with administrator privileges.

Resources