ApplicationPoolIdentity cannot access network resources - iis-7.5

My Setup: W2K8-R2 IIS7.5 x64bit servers (app pool is running in 32bit, though)
We have a (.net 4.0) web application that runs under the "ApplicationPoolIdentity". It has "Windows Authentication" enabled. The web app calls a web service on different (older - W2K3 II6) web server (same domain). The web service requires Windows Authentication as well.
On some of our web servers, this works well and I can see that the Web App calls the web service and identifies itself as the machine name for the web server it is running on (as expected). However on other web servers the application will not identify itself when it calls the web service and thus gets a 403 error (this is confirmed by looking at the IIS logs for the web service).
I've compared the web servers that work versus those that don't and I can't find any significant differences. (I compared the ApplicationHost.Config files from both sites and with the exception of a few encryption keys they are identical).
Any thoughts on what could be causing the App Pool Identity on the bad machines to forgo identifying itself? Did we set something up on one web server and miss it on the other?
If not, can someone recommend tools that could be used to track down what's going on?
Thanks for any help.

For anyone else who find this question, it is answered is several places :
Granting write permissions to a networked UNC folder for ASP.NET under IIS 7.5 and Windows Server 2008 R2
IIS application using application pool identity loses primary token?
DirectoryServicesCOMException 80072020 From IIS 7.5 Site Running Under ApplicationPoolIdentity
ApplicationPoolIdentity cannot access network resources
https://serverfault.com/questions/217547/applicationpoolidentity-iis-7-5-to-sql-server-2008-r2-not-working
Summary: Install MS HotFix KB2545850 and learn the details about this bug in KB2672809 which also shows how to reproduce this issue.

An update in case anyone runs into this... We realized that the common thread between servers that worked was that they had been rebooted recently. After rebooting the problem servers, they too started working.
At this point I can't explain what the issue was, but it appears a reboot solved it. I will update if the problem reoccurs.

Related

IIS 10.0 AppPool crashing

After a company forced Windows 10 update today, the Application Pool required by a local web application keeps stopping/crashing displaying the message
Service Unavailable
HTTP Error 503. The service is unavailable.
I have checked the the below similar posts and followed the solutions provided with no luck.
#1 - https://stackoverflow.com/questions/47338226/iis-10-0-apppool-crashing-causing-503-error
For hosting .Net Core applications in IIS, .Net CLR Version of
application pool should be No Managed Code as shown in below
screenshot.
#2 - https://stackoverflow.com/questions/50244861/iis-10-app-pool-keeps-stopping-due-to-aspnetcore-dll-failed-to-load
Go to the drive your IIS is installed on, eg. C:\inetpub\temp\appPools\
Delete the directory (or virtual directory) with the same name as your app pool.
Recycle/Start your app pool again.
I have also followed the Microsoft instructions. Made sure to first follow the steps in "Turn Windows features on/off) and then installing the ASP.NET Core hosting bundle as instructed.
#3 - https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1&tabs=aspnetcore2x
I'm not having any luck.
Here's my setup App Pool
Here's my setup Site
I've done everything I know. Does anyone have this same experience and can share a solution?
As always, a big thank you to the experts out there!
UPDATE:
I created a new AppPool with Identity "ApplicationPoolIdentity" setting. The page will run however I need to connect to a SQL Server instance with my own credentials because we use Windows authentication on most of the pages. When I create a new AppPool with my credentials it will not stay running.

Hardware reader utility works under IIS Express but not IIS

I'm developing an ASP.NET Web API (2.2) Intranet service at work that encapsulates access to a smart card reader for generating public key signatures. The smart card reader relies on an open-source command line utility (pkcs15-crypt) to perform hardware access and I have no problem getting the service to work while debugging in VS2013 and IIS Express. When I run it on regular IIS, though, the command line utility reports that it cannot find any smart card readers.
I've tried a few different identities for my app pool (including my own domain login) but so far no success. It behaves the same way on both IIS 7.5 on a Windows 7 box and IIS 8 on a Windows 8 machine (64-bit in both cases).
What else might I be missing here? What might be different about IIS Express that lets the utility see the hardware, whereas it isn't working in the context of full-blown IIS?
I experimented with various identities for my IIS app pool, and the ones that worked were
LocalService
LocalSystem
Identities that didn't work were:
NetworkService
ApplicationPoolIdentity
My own domain account

Web Deploy from Visual Studio 2012 to a remote IIS 8 server

I have a remote Windows 2012 server running IIS 8 from which I am hosting a web application. My local development box is running Visual Studio 2012. Currently I am publishing my app as a web deployment package (.zip), RDP'ing to the production server, copy + pasting to a folder and deploying the application from within IIS. My question is, what changes do I need to make to deploy directly to IIS from Visual Studio 2012 using the web deploy option?
I have tried to follow this guide but it refers to a service URL which I must obtain from my hosting company. I don't have a hosting company, my server is co-located.
I am presented with the following options:
Is the username and password the one I use for the RDP account? I already have Web Deploy 3.0 installed on IIS do I need to enable further settings?
OK I found the solution but it took me a whole day to get it working! Basically the steps are as follows. This is very sketchy but see the detailed guides below which helped me.
Enable the IIS Web Management role feature.
Install Web Deploy 3.0 (or higher). Make sure to customise the install to include the handlers (See notes below). If you're not presented with this option go to add/remove programs, find webdeploy, right click and select "change" option.
In IIS click on the server node and find the "Management Service" icon. Enable remote access and configure a dedicated IIS User for remote deployment (These will be the credentials that will go in the user name and password boxes).
At the site level in IIS assign this user to manage the website.
Make sure port 8172 is open on the web server (you can check this port here).
Try reconnecting from Visual Studio. There was some trial and error here for me but the error messages do link to a MS guide for decoding :)
Even after connecting successfully I had to wrangle with permissions, so my IIS user had sufficient privileges to create the app pool, directories and general file management jobs.
The following links really helped!
Configuring the handler on the web server:
http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler
Connecting via Visual Studio:
http://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx
NOTES:
To ensure the handler is running, login into your IIS server and point your browser to the following URL.
https://<servername>:8172/MsDeploy.axd
F12 to open up the dev tools to see the HTTP response. Also MsDeploy also creates IIS logs in inetpub/logs which should give you some clue if you're having connectivity problems.
I had the same problem and this post was very useful to help me solve the issue. I had anyhow serious troubles while trying to install Web Deploy on my Windows Server 2012. The installation of Web Deploy 3.0 was giving me several errors and it couldn't be completed.
I tried to solve the problem installing "Microsoft Web Platform Installer 5.0" from http://www.microsoft.com/web/downloads/platform.aspx but it didn't solve it.
I thought it was due to Firewall Settings, Authorizations issues, Users without permissions or something like that. Finally I found out it wasn't due to any of the mentioned reasons.
I found the most simple solution and I hope it will help other users too: it was enough to download Web Deploy 3.5 installation directly from Microsoft Website:
http://www.microsoft.com/en-us/download/details.aspx?id=39277
This may sound banal but it solved it. I was able to install "Web Management Service" but not the second needed IIS service "Web Deployment Agent Service".

What is the exact difference between Windows Azure and Windows IIS?

I have finished developing a webapplication on Visual Studio 2012 along with Microsoft SQL 2008. I'm trying to make it a "live" webapp which can be accessed through the phone rather than a localhost.
I researched and found 2 solutions which are
IIS
Azure
I have been looking all over the net for various clear explaination of the main difference between IIS and Azure. From my understanding, IIS is a web server application that comes with Windows Server and is used to serve up web sites while Azure is a Windows hosting solution that utilizes IIS. In that case why do people still uses IIS while Azure provide both a cloud platform and IIS?
Which is also better to host any typical web-application that used to run on the localhost?
I can't seems to find any thread in SO or ASP.Net forum which can clearly explain the main difference between the two along with the advantage and disadvantage.
Here are some of the link1, link2 i have found that provide brief information about the two.
What you are looking for is actually a place to run your web application, Teo.
As you've found, you can do that in IIS if you have a server that is connected to the Internet. A way to get such a server is to either got to a hosting company or just use the Windows Azure cloud as you've found as well.
One of the simplest ways for you to do this right now and for free is to sign up for a Windows Azure trial account. As part of that account you get a basic, shared Windows Azure Website for free.
Here are the links you need:
(1) http://www.windowsazure.com/en-us/develop/net/tutorials/get-started/
(2) http://www.windowsazure.com/en-us/pricing/free-trial/
I would strongly recommend that you go through the entire tutorial (1) step-by-step before trying to do this with your own application. Before you start, sign up for a trial account (2). You will not be charged in the first month and you will not be charged if you stick with the free website.
Enjoy.
Comparing IIS to Azure is irrelevant. Those are two different concepts, which are vaguely related to each other. You lack some very basic understanding of what each one means, and I recommend you to go and read about each them from scratch.
IIS is indeed a web server application. That means, for example, that it can rout HTTP request and responds to and from the web site application that you have created.
To keep it simple, let's say that IIS can run on any Windows machine, which makes the machine a Web Server.
If you want to have your web site up and running, you need either have your own machine that acts as a web server, or either upload your web site application to some other machine.
Azure is a group of cloud services. One of the services is a Web Site Host, that allows you to use cloud computers to run the IIS that hosts your web site.
As part of the service, Azure will take care of installing and using the IIS server for you.
Bottom line, if you are going the Windows path, you will probably end up using Both Azure and IIS (unless you will want to self host your web site...)

Best options to host my asmx web service on machine not having IIS

We have a requirement where we need to have some web services running on a server machine but it does not have IIS available. I came across this article on running asmx without IIS and many other sites/blogs have mentioned this article as well.
http://msdn.microsoft.com/en-us/magazine/cc163879.aspx
Could somebody offer alternatives to above to run asmx web services without IIS installed?
Other option i could find was Cassini - http://ultidev.com/products/cassini/
Windows Azure! That is precisely what it was designed for... it’s cheap and reliable!

Resources