Debug an always pending request IIS MVC - asp.net-mvc

How do I debug an always pending request? This morning something strange started to occur, one request (which should download an PDF file) stopped working. When I reproduce the error I can't see anything in the web browser (tried multiple browsers just in case) or any log files on the server.
All the other requests works fine which makes everything seems strange. I have checked at another server with identical code and there it works just fine, also I have tried to do an iisreset without any success. On the hardware side everything seems great (cpu, ram, disk, network).
We use windows server 2012 and IIS 8
Any ideas on where can I start look for errors?

Related

MVC precompiled site "HTTP Error 403.14 - Forbidden" suddenly appeared after 11 months

I have a precompiled MVC site which runs successfully on multiple servers, and on multiple sites within each server.
One particular site a few days ago suddenly stopped working, returning
HTTP Error 403.14 - Forbidden
I couldn't find anything that would cause it, and rebuilt the site using the same source code as other sites on the same server, in a different folder, and the site ran fine for about 24 hours before once again suddenly experiencing the same error.
There is nothing in the Windows logs (Win 2K12 Server) or in the IIS (6.2) logs (other than confirming the 403). This particular site is running on a Virtual Server in Azure, but plenty of other sites are too, including on the same virtual server using the same source code and settings (other than domain name bindings).
I've currently moved the binding to a different process which is working fine, but I really need to get to the bottom of this in case it suddenly happens again.
I've googled this for days without success. Turning on directory browsing works, but of course not something I can or want to permanently do with MVC. Both home and MVC route requests return the same result, but calls for specific files (eg, a text file in a sub-folder) are successful. That certainly suggests a MVC-specific issue. But I can't work out how to specifically isolate the issue.
Obviously I've reset the application pool, the site itself, and indeed set up a new site using the same application pool (which is working currently, but I'm worried it too will suddenly break at the worst time).
Does anyone have any pointers for working out the main cause, please?

Rails server gets response, but localhost page hangs randomly until system reboot

I'm working on a project with a Rails 6.0 backend using webpacker with a React frontend. While working on the frontend with the rails server, my app will sometimes break on Google Chrome, endlessly loading but never even showing the new page title on the tab.
The rails server is receiving the request. It will hit debuggers in the backend and it returns with a 200 status code, but Chrome refuses to load the page while giving no errors or messages indicating what is wrong. This persists even after I restart the rails server, if I restart it on a different port, and if I restart the webpack dev server. I've tried clearing my cache and disabling the cache with devtools, but the only thing that fixes it is rebooting my entire system.
It seems to happen randomly, though I think it may be happening if I refresh the page out of the chrome debugger. I am using ajax for calls to my backend API, not sure if that's possibly a factor.
I've never had this problem before and I'm unsure what it even possibly could be. Does anyone have any idea what might be happening here?

Published mvc app loading forever

I've published an MVC application on IIS 7.5 on external server. But when i run it it just says "Waiting for..." and nothing is happening! No errors, no application logs (because the application didn't even started), no IIS logs, no errors/warnings in event viewer. Can you tell me what can I do to track what is going on? Keep in mind that in development environment everything works fine. Also I already published the same application on another server and it is working like a charm.
the best you can do is to add glimpse to your project and see its reports,
btw, if you are using a shared host it could be a memory limitation, slow CPU, slow bandwidth,....a lot of possibilities....

Rails app on heroku: blank pages on a specific computer

I have a fairly vanilla Rails application on heroku that works fine ... except on my Dad's computer. It is Windows 7, and the site always shows as a blank page. I have checked the following:
Both Chrome, Firefox and IE (latest versions) all exhibit the problem. Web inspector on Chrome and FF shows either a 200 or 304 response code, but blank body.
I have tried clearing the cache.
Curl on his machine successfully downloads the page.
My laptop on his network views the page fine.
His laptop on other networks still exhibits the problem.
His other laptop works fine.
Multiple other machines (5+) work fine.
Server logs show a successful response being served.
Turned off Microsoft Security Essentials.
Turned off the firewall.
I'm stumped. What other debugging steps should I try?
For reference, the site is http://gccc.herokuapp.com/
Solution from twitter: https://www.malwarebytes.org/ picked up a couple of Trojans that were causing issues. I had assumed "Microsoft Security Essentials" was doing this, but I guess that is something different.

razor performance on web server much slower than using VS development server

I have an MVC 3 application where browser page loads are much faster when running in debug mode using VS2010 and the VS Development server on my desktop (windows 7 with 8GB RAM) than they are when loading from an actual web server (a virtualized 2008 server running IIS 7.5 and hosted on an Intel box with twin Xeon CPUs on the same LAN as my desktop). Just the opposite of what one would expect and hope for.
To help figure out what is going on I added code to log the start and end times corresponding to executing the controller code and the razor code as well as the interval between the two. I repeatedly switched between loading the instrumented page and another web page in the same application in my browser (FF) then looked at the logs from both servers. (FYI the pages in question are loaded via Ajax so there's no caching on the browser side)
I skipped the initial cycle which included the time to compile the razor code and averaged the results over the subsequent 5 load cycles although the numbers for all the repetitions were pretty similar.
The controller code execution time was 133 msecs for IIS vs 113 for my dev server. Somewhat surprising considering that the dev server was running the debug version and IIS the release version but not significant at least from a user perspective.
However the razor execution time was 823 msecs for IIS vs 72 msecs for my dev server, over an order of magnitude difference!! At first I though perhaps the razor code was always getting recompiled on IIS but the logging showed a large time lapse between end of controller execution and start of razor execution for the first load and only a few msecs for all subsequent loads for both IIS and the VS dev server so it seems clear that the compiled razor code is being used in both cases.
I verified that both were running as 32 bit apps (by logging the size of intptr) and also that Enable 32 bit apps was set true in the IIS app pool settings (also set to v4 and integrated mode).
I verified that the IIS version was running the release code and the dev server the debug code (by logging HttpContext.IsDebuggingEnabled in controller)
I also repeated the experiment with other pages in my app and they all show the same loading behavior for pages of similar complexity so it does not appear to be something funny with that particular page (much simpler pages did load more quickly as one would expect)
So far what I've concluded from these results are:
It's not likely a difference in resources on the two boxes as the execution time of the controller code is virtually the same and there was no other significant traffic on the virtual server besides me at the time of the tests.
It's not due to a failure to cache and reuse the compiled razor code (evident from the time pattern in the logs)
It's not likely due to the application as all the pages of similar complexity experience similar problems
It's not a browser side issue as the same browser instance was used to view both.
It's not a 64 vs 32 bit issue as both are apparently using 32 bits.
It's also not some difference in the code because I published the code to the web server at the same time I performed the tests ( and they both have the new logging code I added).
I considered the possibility it could be the LAN (because presumably the razor code is being rendered and sent at the same time it is executing rather than being buffered and sent after rendering) but the payload is only around 140KB (from Net tab in Firebug) and the LAN is 100MB switched. To help eliminate this as a factor I found a file of around 240KB on a file share on the same web server and copied it to my desktop. The transfer was almost instantaneous. Certainly nowhere near 800 msecs.
So far I am stumped as to what may be causing this 700+ msec additional time when rendering on the web server.
UPDATE: I succeeded in getting IIS 7 installed on my desktop and pointing directly at my project. Page loads are as snappy as they are using the VS development server so it does not appear to be simply an IIS vs VS Dev Server issue.
UPDATE: I've added code to print out Environment.Version.
Dev Box: 4.0.30319.468
Web Server: 4.0.30319.1
I'm going to figure out how to update the web server. Also not sure if this is the whole story. Perhaps the MVC dll's have separate versioning but don't know yet how to figure it out.
I also find it curious that even after publishing (when I have built the release version), when I run my local web server (which points at the same folder that is published) it shows debug mode.
UPDATE: I checked and it appears that I'm providing all the Razor dlls in the project's bin folder and thus they should be the same on the server and the desktop. Presumably MVC will check first in the bin then the GAC.

Resources