IIS, application pool stop Automatically - wcf

I am running WCF services on IIS 7.5 with .NET framework version 4.5 and it is in integrated mode. Whenever I deploy new code on IIS, it causes application pool to crash resulting in 503 error. I tried to dig into code but I am not able to figure out the root cause of the problem because of the large code base. I have ensured that it is not because of any server or IIS setting (as reverting the build makes IIS normal). I have also looked into event logs but not able to find anything, I am already logging application error but nothing is helping. Is there anyway I can trap the event or error just before crashing pool as I am running it integrated mode? Any help will be appreciated.

Related

Restarting an asp.net core app with IIS doesnt actually restart the app properly as program.cs doesnt execute

I have deployed an asp.net core web app to an AWS Server running windows and IIS from azure devops. All the app code has updated, the dlls etc had updated but the new code that kickstarts serilog doesnt run.
This is because program.cs/startup.cs have not executed, it's as if the app updated but kept running withoout restarting.
Restarting the app in IIS or doing a full IIS reset, or restarting the IIS app pool does nothing. The app is running on port 80.
If I open powershell and type "dotnet myapp.dll" then the logs appear! because program.cs executed but that starts another instance on a different port and is nothing to do with IIS.
How do you properly restart a .net core app with IIS that actually makes it start up again?
Thanks
This is all because IIS didnt have permissions to write to the log folder.. lol. All ok now.

.NET Core Web App Restarting

I have a .NET core web app (console) hosted in IIS on a Windows machine. In the ConfigureServices method in Startup.cs I have a line of code which sends me an email so that I know when the service is restarted. When a new release is being deployed, I get that email, understandably. But I also receive that email at random times when there was no apparent restart of the machine, the app, or of any IIS component. Would there be any other thing which would cause it to restart? I'm not sure why this is happening.
Thanks,
IIS has a lot of settings for AppPool reset, like e.g. at given time, etc. You can check the advanced settings of your application pool that is set up to run your program and see if there is anything suspicious. It might be some inactivity timeout e.g.

Unable to Create the Web site 'http://localhost/WindowsService'. The Web server 'http://localhost' could not be found

I am working on a Windows Service and whenever I try to publish it, the error is thrown. I have already installed the service through installutil. I would like to test the module I've added before I commit.
It appears IIS was turned off in Windows features so I just turned it on (opted in IIS).

SignalR: Connection.Start().Wait() hangs the browser indefinitely

I am using ver 0.5.3 of SignalR assembly in my silverlight application. I use connection.Start().wait() to start the connection:
Some of my observations are, which are really strange:
I run the application (In-Browser) mode via Visual Studio and I am able to establish the connection with the SignalR hub
If I deploy the app in IIS and then try accessing the application using the IP address of the machine, the call to connection.start().wait() never returns. I checked the Fiddler and figured out that the call never goes to the SignalR hub
If I use the application in OOB mode (Out of Browser mode), application works without any issue.
My requirement is that it should work in in-Browser mode.
Can somebody throw some light, what could be the issue?
Thanks,
Alpee
It appears to me that you are running into Silverlight's cross-domain request restrictions when run in-browser. You can either host the silverlight application on the same domain that is running SignalR, or you could add a clientaccesspolicy.xml or crossdomain.xml file to the root of the domain running SignalR as suggested in the above link.

Showing error message from Project server 2010 wcf service

I implemented a web application that connects to a ProjectServer.svc web service. The application works on a project environment server, but returns an error in the production server. Unluckly, due to security settings the text and code of the exception taking place on the server is not shown, instead I get this message:
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs
I modified the wcf settings in the web config of project server to make the web service return the error...but nothing happened, because probably Project server overrides the web config wcf settings.
How can I get the error message, so I can understand what is wrong with the server configuration?
Sometimes ULS log may help - when Project server process accepted your call and error somewhere inside of the process.
I touched the configs only once to create Proxy assembly and that time it worked... maybe the same approach will help you to find proper config. Here is a link http://msdn.microsoft.com/en-us/library/office/ff621594(v=office.14).aspx
Don't forget iisreset after you change the config