I've been looking at the 'Application Initialization' module for IIS 7.5 (which is baked in to IIS 8) and serviceAutoStartProviders which can be set to initialize services when an app loads up.
I'm wondering what happens to serviceAutoStartProviders when an app has AppOffline.aspx, to bring down the app for whatever reason. Do the providers still run, or no? In my case, I have a provider that I would not want to run while the app is being updated - and I use AppOffline.aspx while I'm updating the app.
A quick test, it appears that serviceAutoStartProviders do run even if App_Offline.htm is found in the application directory.
Related
I have a brand new laptop with Windows 10 Professional. I have installed VS2019. I have also installed IIS. I have the default IIS setup, so just Default Web Site which when browsed goes to the default IIS page. I enable 32-bit mode on my DefaultAppPool. I then try to browse to the website again and I get a 503 error. The app pool has stopped.
I have seen numerous posts on the internet about attaching debuggers, writing log files, looking at the event viewer logs as well - but none of them are helping me. I have noticed that I can enable 32-bit and not assign any web application to it... then the app pool stays running. The second I assign a web application to the app pool it crashes (I set the Start Mode in the app pool advanced settings to Always Running in this instance)
I have created a new App Pool and tried the config again. If I look at event viewer logs, I get this:
I have also tried uninstalling IIS, deleting the inetsrv folder in system32, deleting inetpub and then reinstalling IIS.
I have also tried looking at the applicationHost.config file to try to pick up anything weird in there and everything looks good.
Any assistance would be greatly appreciated!
EDIT:
These are the Friendly views:
Error:
Warning:
I have downloaded the Microsoft Error Lookup tool (https://www.microsoft.com/en-us/download/details.aspx?id=100432)
According to this article I should take the value after the colon (:) and use it as a parameter on the Microsoft Error Tool (http://intelligentsystemsmonitoring.com/knowledgebase/internet-information-services/event-id-iis-worker-process-availability-21961/). I have done this for both values (70050780 and 80070570). Here are the outputs:
Is this anything to go on? If so what can I do to fix these errors? I don't know what file it's trying to access or which directory is corrupt. I have given Everyone and App Pool users access to inetpub to test it out but it doesn't work.
We have set up Application Insights for our Dev & Prod environments, not with the SDK but through the Portal. We're now in the process of installing the SDK so we can have more control over customizing logging, what to measure in performance, etc.
I have found how to separate the environments in code (separate Instrumentation Key in different config files etc), but I have found nothing when it comes to my local environment. Which instrumentation key should I use there, the dev one? Wouldn't then this skew our dev metrics everytime one of the developers runs the app locally?
And also, doesn't it make sense to have a separate App Service slot just for the local environment, so I can test everything and see the logs I'm trying out locally, and not have to deploy to dev everytime I want to see what I'm doing?
I've tried creating a separate slot for local, but it generates a weird url based on the name I give, which I can't change later.
I've googled for a couple of days already and couldn't find any (or very little) helpful advice when it comes to this.
I realise there is a "Just add the SDK to try local only mode" option in Visual Studio, but then I would have to use it exclusively locally. What I want is to use all three - my local, dev & prod.
We're using .net core 2.2 for our backend and Angular 7 for front end.
I'm an idiot.
The url set up automatically basically means nothing. I solved the problem by just adding another App Service slot (created from our App Service production one, just like dev), and added this key to the local settings in our project.
Now we can use this key to get real time results as we debug, and use the other two for dev & production.
When I publish to Azure my tiny, tiny test project, configured in the latest vNext RC2, I get the following error upon first load after an extremely long wait:
The specified CGI application encountered an error and the server terminated the process.
Subsequently if the app is anything more than the very simple "Hello World" project below, i.e. it uses some MVC etc. then the app is extremely unresponsive, failing to load some images, taking minutes to load each page. Although sometimes it's suddenly fast for a little while, then slow again.
In RC2 there were some changes to the hosting setup, but all these have been implemented in my tiny test project.
I have also seen this question and ensured I am publishing the exact correct version of the CLR, in fact for information the same result happens if I use full or core CLR.
Here is the example project (publishing profiles removed):
https://www.dropbox.com/s/hpkrj6c74eaytjz/TinyProject.zip?dl=1
If I create a new RC1 project, the problem doesn't surface, but as soon as I update it to RC2 the problem persists.
In the end I solved this by creating an App Service Plan that was anything other than the free or shared option, in my case B1 (screenshot from Visual Studio Azure SDK):
Has your Azure Web app instance had a RC1 instance uploaded to it prior to your RC2? Your project looks ok to me, I can't see anything wrong at first glimpse with your project.json, Startup.cs or hosting.json files. I had an instance of RC1 on a Web App, and when trying to upload RC2, nothing would work, just a long long wait until eventually it would time out with a 503 error. I deleted the Web App, and just published the RC2 (using same DNX build as yourself) and everything works fine (so far!).
Also, if you turn on Diagnostic logging in your Web App, does that provide any more info?
OK, I've created an Azure Mobile Services project in Visual Studio 2013.
I run it up as-is, then in the browser I test it by adding a todo item via the simple browser app that seems to get baked into these service projects. It gives me a '201 success' message - brilliant.
I then convert the project from IIS Express to Local IIS as the web host, recompile and try again, and although I get the same smiley face app telling me that everything is OK, when I try and add a todo item I get a 404 error. This is contrary to the Microsoft article that gives these instructions, which clearly says I am able to choose either IIS Express or Local IIS when setting up the project.
My guess is that web.config is missing something when this project runs on the local IIS server.
I'm hoping someone already has a solution before I spend hours trying to work out how to configure IIS for this type of project.
I've already wasted a load of time working through loads of bugs and gotchas with Azure Mobile, and I'm starting to run out of steam - so I'm hoping someone can help me before I go and grab an account at Parse.com
Many thanks in anticipation.
Dean
The easiest approach for your situation might be to just deploy to the cloud, and use that service for your testing. Visual Studio 2013 Update 2 makes it easy to deploy your app and connect to it for remote debugging. It is a little slower than using a local instance, but you are also assured that there will be no surprises when you eventually go live (since you are live the whole time).
That said, we will investigate the issue you are seeing with using IIS directly. Some things you might want to try on your own:
Verify that you can view the web side from your Mac's browser, to make sure that the firewall is letting the requests through.
Try using the "Getting Starting" link from the smiley-face page, to see if the REST endpoints are behaving correctly.
The platform is IIS on Win8.1
The project is created from the Durandal project template. No changes are made, and the project is run: the Durandal start kit appears in a web browser.
The project is deployed to a folder D:\Client
IIS manager is used to map a virtual application off the default web to D:\Client. The app pool for this is specified as DefaultAppPool which on my machine is set to FX4.0 and runs with my user credentials. Deliberately setting it to FX2.0 produces a 502 as expected. This implies that the FX version is not the problem.
http://localhost/Client produces the splash screen but the app hangs there. Using the browser's own debugger reveals that main has NOT been executed.
Loaded:
bootstrap.js
jquery-1.9.1.js
knockout 2.3.0.debug.js
require.js
Has anyone experienced this and what did you do to resolve it?
Virtual Directories are created to serve static content as far as I understand. ( Just a subfolder of another application ). As the StarterKit runs using MVC4/5 you need also ASP.NET support thus creating a normal application ( parallel to defaultapp ) should do the trick.
If you did that already that way maybe you're missing some files. Had a situation where some files weren't deployed ( eg. the views folder ). Double check if those are present.