IIS 7.5 site displays page cannot be displayed - c#

Yesterday I was setting up a new site the same way I always do and when I went to test it I was at first getting error 503 and the application pool would stop for the site when that page was displayed.
Today its no longer displaying the 503 error and is now displaying page cannot be displayed. Also the application pool is no longer stopping.
I checked the Event Viewer and its getting the following error whenever I try to get onto the site:
A process serving application pool 'CP4_ICEGROUP' suffered a fatal communication error with the Windows Process Activation Service. The process id was '8136'. The data field contains the error number.
I have many sites that I have set up previous to this and they work fine. I have tried creating a different site since but that also wont work.
I have installed debugdbg and created a dump file and read it with the debugdbg analysis but was unable to find what is causing the problem.
Any help will be greatly appreciated.

Set up the user login for the database for the site wrongly!

Related

HTTP 503 error when behind ZScaler corporate proxy and trying to access web app

A couple of days ago our web app started showing a 503 error when trying to access our web app. It works fine when ZScaler is off. This is an old app running .NET MVC 5 on a Windows Server 2012 machine. No changes were made from our side when the issue started happening, so I was suspecting that the networking team had done something. However, they cannot seem to locate the issue.
When trying to access the page through Chrome, I get a HTTP 503 error, but on Firefox it shows a blank page and says that the connection is not secure. I can access the web app through the server hostname URL fine. However, when trying to use the registered domain name, it is displaying this error. I have checked the logs on the server, but it isn't showing anything specific to this error.
Does anyone know what this could be? Is there anything in IIS that I should look at specifically?
I have checked the logs on the server, but it isn't showing anything specific to this error.
An HTTP 503 error usually indicates that the server is currently not able to handle the request due to maintenance or capacity issues. It could be caused due to many factors, like a server outage, an issue with the network, or a problem with the application itself.
Here are a few things you can try to troubleshoot the issue:
Check the IIS logs, IIS logs are located in the
C:\inetpub\logs\LogFiles folder by default.
Check the event logs, event logs can be accessed through the
Event Viewer (eventvwr.msc).
Try accessing the web app using the server's IP address instead of
the registered domain name. This can help determine if the issue is
related to the domain name or the server itself.
Make sure that the application pool for the web app is running and
that the application pool identity has the necessary permissions to
access the web app's files and resources.
Check the network configuration and make sure that the server is
properly connected to the network and that there are no issues with
the network connection.
Check the web.config to make sure that it is properly
set up and that there are no issues with the web.config file.
Check the ZScaler configuration to make sure that it is not
blocking access to the web app. You may need to work with the
networking team to determine if there are any issues with the
ZScaler configuration.

The compiler failed with error code -1073741502 and the ApplicationPoolItentity is already set

Ι have Windows Server 2008 R2 system having IIS 7, as the live/production server. My application is using the ASP.MVC 3 framework. Currently, when I am navigating between the views of the application, some views don't work and the following error message appears:
The compiler failed with error code -1073741502
I have done some research on the web and I found that you have to set the application pool identity. The problem is that the application pool already has an legitimate identity. What I am currently do in order to fix the problem is to stop the site, recycle the application pool and start the site again. After that the previous views work correctly but there is always a change another view to crash.
Does anybody know what may cause this problem and what I have to do in order to fix it?
Thanks

Azure Website Error 502

I have an ASP.NET Webforms Application on Azure but i always get the following Error on some sites:
502 - Web server received an invalid response while acting as a gateway or proxy server.
I already read a lot of topics regarding the 502 error on Azure but i still don't understand what the problem in my particular situation is.
The error occurs just on some site of the application. I can always reproduce the following pattern:
Open SITENAME.azurewebsites.net -> Error occurs
Open SITENAME.azurewebsites.net/Site1.aspx -> Error not occuring
Open SITENAME.azurewebsites.net/Site2.aspx -> Error not occuring
Refresh SITENAME.azurewebsites.net/Site2.aspx -> Error occurs and won't go away until i call Site1.aspx again
The only thing i found in the log is, that the application loads System.Windows.Forms.dll and there is an AccessViolationException. I have no idea why this dll is loaded at all because there is no Reference in any Project in Visual Studio to it but thats another story :).
But what i don't understand is that the error 502 does not always occur on Site 502.
Maybe someone can give me a hint what might be the problem or how i could find it...
Thanks for your help!
EDIT:
What i forgot to mention: In some threads regarding this error i read, that it occurs after 3 minutes or something like that. In my case it is nearly alway about 25 seconds until the errormessage shows up.
That points to an application issue. The reason you are etting 502 is because the worker process is crashing and the front end is left with a request with no response and returning a 502 to say exactly that. Look for eventlog.xml under the LogFiles folder for your website. Alternatively you can try remote debugging from VS to your website.
System.Windows.Forms.dll contains a lot of UI code that will most probably not work Azure websites sandbox. The reason it's loaded is probably because you are using something from the assembly or using something that uses something from that assembly. It doesn't have to be listed in Visual Studio to be loaded since it's a part of the standard .NET Framework.
I would suggest looking into remote debugging and figuring out at what point this is getting loaded and why.
In my case, I got 502 errors because the site was restarted by the azure auto-heal system. It turns out I made tests with that auto-heal system a few days ago, but since in the end I disabled it, I didn't think it could cause my 502 errors.
This is where I discovered that the azure interface to change auto-heal settings (mywebsite.scm.azurewebsites.net/Support -> mitigate) only affects the production slot. But when you swap your deployment slots, the settings get swapped. There is apparently no way to directly change the staging slot settings, you have to swap, change settings, and swap again.
So, I ended up having my staging slot with auto-heal enabled, and my production slot with auto-heal disabled (and of course at that time I thought it was disabled on both slots). Then I was "randomly" hitting 502 errors either on staging or production depending on how many times I swapped them. What's weird is that though the application seems to restart (or at least fails to respond to a few requests), I don't get the corresponding events in my log file, like if it wasn't running Application_Start after an app pool recycle triggered by the auto-heal system.
Took me a whole day to find out what was happening, I hope this answer can help someone in the same situation.
I got the error for a while after fiddling with connection strings, went away and came back in an hour, and the issue had disappeared and the site worked normally again. A highly technical answer for you.

.Net Application logs out on certain pages

I have a .Net website and when I click the menu for certain pages I am automatically logged out. I tried debugging by opening code and hooking up to the environment database but I am able to open the pages locally. I am not sure why this is the case.
I would like some input about where to start troubleshooting.
I would first check if the server is faulting and losing the session somehow. Perhaps the worker process is crashing or the application pool is recycling for some reason. Without more information this is just a guess though.

IIS7 set error page to be displayed if timeout expire error

I am using ASP.NET 2.0 with C#. I have a web-site (NOT the web-application) hosted on IIS7.
Recently I got following error on my live site.
Timeout expired.
The timeout period elapsed prior to obtaining a connection from the pool.
This may have occurred because all pooled connections were in use and max pool size was reached.
I have seached about it and most of solutions I got are explaining to surely close the connection.
Right now I am studding this site and I don't have much idea about its architecture. So, instead of directly changing its data access layer, I want to make a temporary fix like showing Error Page if such an error occurs.
I don't have much knowledge about IIS so can anybody give me idea how can I set such a page?
You can set the custom error page in iis also. Following is the picturial explaination of the same.
http://www.orcsweb.com/blog/jamie-furr/how-to-create-custom-error-pages-in-iis-7-5-with-asp-net/

Categories