IIS Aplication Pool not When The Server is Turn On? - iis

Hi i have a problem with one server, and the problem is that the server iis does not start automatically one of the app pools that we have for one of our applications, but if you go to the iis and make right click on the app pool and click start the app pools starts fine.
Any Idea
Jean

See if the App Pool is set to autostart:
adsutil.vbs get w3svc/AppPools/DefaultAppPool/AppPoolAutostart
Chnage DefaultAppPool to your app pool name.
To set it to auto start, use
adsutil.vbs set w3svc/AppPools/DefaultAppPool/AppPoolAutostart true

Does you application in the AppPool depend on other services (eg SQL) that might still be starting?
I recall Skype used to hijack my port 80 as IIS took too long to start.

Related

what should be the value of connection timeout in iis server for a ticketing application

I am working on an Application which is a ticketing tool,user log ticket corresponding to each task assign to them,there is Slow http post vulnerability in that which can be remove by manipulating connection timeout on iis server.
what should be the idea value of connection timeout for which i can solve that vulnerability?
please do help.
The security vulnerability can be fixed by updating the Limits settings for the web site.
1)Open IIS Manager
2)Select your site
3)On the Actions panel, click "Limits"
4)Set Connection time-out to 30
5)Check "Limit number of connections" and set the value to 1024.
6)Click OK
restart iis.

IIS Zero Downtime Update ARR / Reverse Proxy

I have a C# console application / Windows sevice that uses the HttpListener stuff to handle requests, IIS is setup to reverse proxy to this via ARR.
My problem is that when I update this application there is a short downtime between the old instance being shut down and the new one being ready.
The approach I'm thinking about would be to add 2 servers to the server farm via local hostnames with 2 ports and on update I'd start the new instance which would listen on the unused port, stop listening for new requests on the old instance and gracefully shut it down (ie process the current requests). Those last 2 steps would be started by the new instance to ensure that it is ready to handle the requests.
Is IIS ARR load balancing smart enough to try the other instance and mark the now shut down one as unavailable without losing any requests until the new one is updated or do I have to add health checks etc (would that again lead to a short downtime period?)
One idea that I believe could work (especially if your IIS is only being used for this purpose) is to leverage the IIS overlapped recycling capabilities that are built-in when you make a configuration change. In this case what you could do is:
start a new instance of your app running listening in a different
port,
edit the configuration in ARR to point to the new port.
IIS should allow any existing requests running in the application pool within the recycling timeout to drain successfully while new requests will be sent to the new application pool.
Maybe if you share a bit more on the configuration you are using in ARR (like a snippet of %windir%\system32\inetsrv\config\applicationHost.config and the webFarms section)

Getting HTTP Status 503 on glassfish after deployment

Here's the scanario... i have a glassfish server runnung my app on EC2, i configured a virtual server on glassfish for one of my domains (lets say mydomain.com) and this same virtual server has a default web module (lets say "myapp").
it works like a charm, when i access www.mydomain.com i get the login screen for my app, as it should be... no need to access www.mydomain.com/myapp (/myapp is the default context path for myapp).
But here's the thing; after i do a new deployment of my WAR file i can't access my app. if i type www.mydomain.com on the browser and press ENTER, the server gives me an "HTTP Status 503" however, if a access www.mydomain.com/myapp y can see my login page.
this problem goes away after i do a "sudo service glassfish restart" but as you might think, restarting the app server after every deployment is a pain, and btw, this is not the only app i'm running here, so... restarting glassfish just shuts down all apps and pisses off all users.
I'm deploying from Netbeans but i get the same result deploying from command line (asadmin).
i tried google but the notes i found didn't help.
is this a glassfish config problem?
am i missing a step after deployment?
for reference, i'm using: jsf 2.1, primefaces 3.2, jasper reports 4.6 (with required dependencies), mysql connector, glassfish server ose 3.1.2.2
i'll appreciate any help.
thanks.
Looks like Im shooting in the dark but here it goes.
In most cases, HTTP Error 503: Service Unavailable indicates that the App Server / Tomcat Server was not communicating well with the Web server, normally Apache.
Whats interesting is that when you sudo restart, it works, ITs a good indication of permissions of the filesystems. If you have deployed as a normal user but you have set up the server as root, this might just be the problem.
Yes, its a config problem & more. Try checking the file permissions & assign users to each process & make them play well.
Let me know if you could share some errors / logs, it would be helpful.

MVC4 Website/Web Application Recommended IIS Directory Structure

I have an MVC4 web application
In setting it up on IIS7.5 I added the application to the "Default Website" and set up a virtual directory under http://localhost/myApplication
However, this forced me to change many of my controller calls (specifically js ajax calls) which I previously called in Cassini like "/Home/Index", I now had to change them to "/myApplication/Home/Index" for them to work on my local IIS.
NOW, when I publish it to a remote hosting server I have to change it BACK to "/Home/Index" for it to work.
This cannot be the most productive way to traverse the development -> testing -> production cycle.. What step am I missing?
I tried to create the applications virtual directory on on just http://localhost/ without appending the application name so that I can call "/Home/Index" at all three stages but it complains that http://localhost/ is already mapped to inetpub/wwwroot.
Thanks for your time.
The steps are like this:
Publish your website to a new folder in inetpub/wwwroot (or the place where your applications are kept) like "inetpub/wwwroot/myapp"
Go to IIS management, create a new web-site, assign it any free port (like 11001 or something, > 1024 at least) and point it to a folder from the step 1. Bind it to all IP addresses available or to 127.0.0.1
Start the web-site.
Access it using http://localhost:11001/ (or any other port you've set)
Problem is that by default any browser uses port 80 to request a web page, and that port is taken by the default web-site. You have to manually override it or create a site on another port. IIS usually warns you about port collisions.
If you don't want to have port number in the address, alternatively you can work with host header on port 80. You may have to make local host entry for the host header given to the site.

IIS Took Over My Port 80 and I Can't Get it Back! [Windows Server 2008; Trying to run TeamCity]

Prologue: I am running windows Server 2008 R2 on a Virtual Machine. This virtual machine image has been happily hosting TeamCity on port 80 for several weeks. This TeamCity server is accessed by others on the network by visiting a url (pcname.domain.com).
The Issue: It seems corporate decided to push some updates to my machine over the weekend. It seems this round of updates decided to install/update IIS. Low and behold, visiting the URL mapped to the TeamCity server actually takes me to the stock IIS7 page. Visiting url/login.html brings me to the TeamCity log-in page.
Attempts: First off, I changed the TeamCity port to 8080 and was able to access it at url:8080 (or localhost:8080). However, it is imperative to me that people can access the server without providing a port... so I change TeamCity server port back to 80 and set off to try and fix this IIS problem.
Since then I have uninstalled IIS7 by removing the role and services from Windows - I am now hosting "0 roles". I have removed every trace of IIS from my PC, but visiting localhost still gives me 404 not found (instead of server not found or just my TeamCity page).
My Question: How do I prevent Windows Server 2008 from trying to host some default crap on port 80 so that my TeamCity server can be seen again?
EDIT: After performing netstat -ano, the only PIDs associated with port 80 are '0' and '4' (system and svchost!)
In windows the usual suspects using port 80 are IIS itself, and maybe the Web Deploy Agent Service if installed (but it could have any other app bound to that port). The PIDs 0 and 4 just tell you that the applciation using that port is running as a service. If you do not need any of this (IIS, web deploy, etc), go to Services and disable them, the port should be free to bind after that.
You can use net sh http show servicestate | findstr HTTP to reach the address and port binding information.
A simple solution (one that I am also using in a production server with multiple apps) is to set up a proxy based on either the domain or the URL path itself (see here how to with nginx).
Hit command, netstat -ano in an elevated command prompt to see what applications are listening on which ports. This command will show you the PID of the process that is listening on port 80. Now, open the Task Manager -> Processes tab. From the View -> Select Columns menu, enable the PID column, and you will see the name of all the processes those are listening on port 80. You can kill the listed tasks. Mostly applications like, World Wide Web Publishing service, IIS Admin Service, Web Deployment Agent Service may use the port 80 in Windows Operating System.

Resources