Adsense

Showing posts with label IIS7. Show all posts
Showing posts with label IIS7. Show all posts

Friday, October 16, 2009

The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020) – IIS 7 – Internet Information Se

In IIS7 I was trying to start my Default Web Site and was getting the following error screen.
IIS - Skype - Error
The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
A quick Google search turned up the following Microsoft Support Topic. Ok. Lets take a look at netstat and see what might be causing problems. Open a command prompt ([Windows Key + R] and enter cmd) and enter the command. After running netstat -ano, I noticed that there was indeed another process (with a process id of 796) accessing port 80. (You can enter netstat /? to see what the –ano flags are doing.)
netstat
The offending process that is using port 80 has a process id of 796. Now, how to find out what that process 796 is?
Using the tasklist command will show a list of all processes running in windows. You can use the /fi flags to filter the results. In this case I’m using a filter that will only show processes with a PID that equals 796. tasklist /fi “PID eq 796”
Tasklist Filter Command
The process with process id is Skype. Makes sense that it would be using port 80. I promptly closed down Skype and was then able to start my Default Web Site in IIS Manager. Hope this helps someone.

Tuesday, August 25, 2009

'HTTP Error 503. The service is unavailable' message in IIS7 – Application Pools

One of my IIS7 virtual directories wigged out today and started to give me the following error screen.
Error Screen
Service Unavailable – HTTP Error 503. The service is unavailable.
I found a post from Rich Strahl that pointed me in the right direction. When I brought up my Internet Information Services Manager and clicked on Application Pools, my DefaultAppPool was stopped.
app pools
Unfortunately, my application pools were already set to auto-start and restarting the application pool didn’t solve my problem. As soon as I tried to bring up my website, the application pool would immediately stop again and give me the same error screen. After spending the next 10 minutes or so restarting Windows 7 and starting and re-staring my application pools to no avail, I decided to re-install my IIS7 and Windows Process Activation Service features.
After re-installing these windows features, everything was back in order. Unfortunately, I did have to add ALL of my virtual directories again, but I expected as much. You can re-install these features from the Programs and Features screen by clicking on Turn Windows features on or off.
Programs and Features
On the Windows Features screen, you can uninstall any feature by removing the check next to it and then clicking OK. You can then return to this screen after restarting windows to reinstall them.
Windows Features Windows Features 2
Hope this helps someone. If anyone knows how to correct this without reinstalling the features, please comment!

Wednesday, May 27, 2009

‘The configuration section 'connectionStrings' cannot be read because it is missing a section declaration’ message in IIS7

I spent the better part of this morning trying to figure out what was wrong with a 3rd party blogging utility that we recently started using. I was getting and error message stating that “The configuration section 'connectionStrings' cannot be read because it is missing a section declaration” when setting up my development environment.
The ONLY reference to this error that I could find was from MSDN HERE. No sections of the web.config were encrypted so, none of the recommended causes and resolutions helped.The web.config file for the 3rd party project was pretty large and I thought it might have been due to mal-formed xml somewhere. I validated the xml and scanned for anything obvious, but it all looked like everything was fine.
I eventually tracked down the problem with the web.config file. The problem was in the <configSections> section of the web.config. The 1st line within this section was <clear/>. The <clear/> tag can be used to removes all sections and section groups that were already defined (either earlier in the given configuration file or higher in the configuration hierarchy.) This is helpful in other sections when you want to clear a default provider before registering a new one, etc…
It looks like <clear/> is a valid tag for this section, so I’m not sure why it would be causing the error. Either way it solved my problem for my development environment. Hope this helps someone else in the future.
~ Paul