Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

applicationhost.config error

1,409 views
Skip to first unread message

jrl

unread,
Apr 27, 2008, 3:02:25 PM4/27/08
to
I seem to have a problem in applicationhost.config but I don't know what it
is or how to correct.
I am running IIS7 under Vista. It was working normally, until I tried to add
a patch that would allow frontpage server extensions, and the administration
pack. Then IIS wouldn't start and I would get the error "Cannot start
service W3SVC on computer '.'."

In the system event log, I see two related errors:

The Application Host Helper Service encountered an error while reading the
data for SID mapping. Please ensure that the application pool name data is
correct in the configuration file. To resolve this issue, please recommit
the changes or restart this service. The data field contains the error
number.

and

The Application Host Helper Service encountered an error trying to process
the configuration data for config history. The feature will be disabled.
To resolve this issue, please confirm that the configuration file is
correct, has correct attribute values for config history and recommit the
changes. The feature will be enabled again if the configuration is correct.
The data field contains the error number. (02000780)

When I ran "C:\windows\system32\inetsrv\appcmd.exe list apppools

I got error < message:configuration error

Filename: \\?\C:\windows\system32\inetsrv\config\applicationhost.config

Line Number: 784

Description: Configuration file is not well-formed XML

Then when I check applicationhost.config I found that line 784 is the last
line of the file! Actually the last line is 783, which is </configuration>.
So I tried removing the last empty line 784, but then appcmd says the error
is on line 783. I'm no further ahead.

Do these error characteristics suggest some problem I could correct?
Although it is complaining about applicationhost.config it's hard to see
where the problem might be.


jrl

unread,
Apr 27, 2008, 3:54:39 PM4/27/08
to
Further, when I tried to restore an earlier version of the
applicationhost.config file, with this command:
appcmd restore backup "cfghistory_0000000018"
I get the error <hresult:80070426, message: Command execution failed.
The service has not been started.

This happens on earlier backups as well.

Ken Schaefer

unread,
Apr 27, 2008, 11:19:54 PM4/27/08
to
Any chance you can open the applicationHost.config file using some kind of
XML editor? It seems taht you may have an opening XML tag somewhere that
isn't closed, hence the error at the end of the file (which the last chance
for the closing tag to be). An XML editor might be able to show you unclosed
tag pairs...

Cheers
Ken

--
My IIS blog: http://adopenstatic.com/blog

"jrl" <j...@newsgroup.nospam> wrote in message
news:C60C3B40-684F-4B08...@microsoft.com...

WenJun Zhang[msft]

unread,
Apr 28, 2008, 4:40:14 AM4/28/08
to
Hi,

If you have ever used AppCmd Add Backup command to create configuration
backup, please check the Backup folder in \Windows\System32\inetsrv . There
should be a copy of previous applicationHost.config file. You can create a
copy of the current applicationHost.config first and then use the backup
file to overwrite the current one.

If any problem still persists, please update here. I will assist you on
further troubleshooting.

Thanks.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

jrl

unread,
May 1, 2008, 2:20:19 AM5/1/08
to
I have never run the add backup command, but I understand that with Vista
Service pack 1, IIS automatically creates these backups.
I did try to restore a configuration file (as mentioned in the second post),
but it didn't succeed. Can you please provide directions as you mentioned.
Thanks,

""WenJun Zhang[msft]"" <wjz...@online.microsoft.com> wrote in message
news:g1$6$tQqIH...@TK2MSFTNGHUB02.phx.gbl...

jrl

unread,
May 1, 2008, 2:32:33 AM5/1/08
to
Do you happen to know if the editor in Visual Studio 2008 can do this (find
unclosed tags)? My help searches are not finding this yet.

"Ken Schaefer" <kenR...@THISadOpenStatic.com> wrote in message
news:%23f6286N...@TK2MSFTNGP03.phx.gbl...

David Wang

unread,
May 1, 2008, 3:46:03 AM5/1/08
to
Yes. If you rename a copy to have .xml extension and open in Visual
Studio, it will identify errors with a red-squiggly line.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

On Apr 30, 11:32 pm, "jrl" <j...@newsgroup.nospam> wrote:
> Do you happen to know if the editor in Visual Studio 2008 can do this (find
> unclosed tags)? My help searches are not finding this yet.
>

> "Ken Schaefer" <kenREM...@THISadOpenStatic.com> wrote in message


>
> news:%23f6286N...@TK2MSFTNGP03.phx.gbl...
>
>
>
> > Any chance you can open the applicationHost.config file using some kind of
> > XML editor? It seems taht you may have an opening XML tag somewhere that
> > isn't closed, hence the error at the end of the file (which the last
> > chance for the closing tag to be). An XML editor might be able to show you
> > unclosed tag pairs...
>
> > Cheers
> > Ken
>
> > --
> > My IIS blog:http://adopenstatic.com/blog
>
> > "jrl" <j...@newsgroup.nospam> wrote in message
> >news:C60C3B40-684F-4B08...@microsoft.com...
> >> Further, when I tried to restore an earlier version of the
> >> applicationhost.config file, with this command:
> >> appcmd restore backup "cfghistory_0000000018"
> >> I get the error <hresult:80070426, message: Command execution failed.
> >> The service has not been started.
>

> >> This happens on earlier backups as well.- Hide quoted text -
>
> - Show quoted text -

jrl

unread,
May 1, 2008, 3:44:26 PM5/1/08
to
Thanks to David Wang's response in this thread, I can report that the
applicationhost.config.xml file does not show any errors (ie red squigly
underlines).

Still, iis reports that it is not well formed. I think this error reporting
method is also not well formed.

This is the second time (recently) that this file is being broken by
automated processes, giving me no means of correcting the unknown errors. It
seems very fragile.

I look forward to hearing from WenJun as to how I can recover from an
earlier version.

JRL

"Ken Schaefer" <kenR...@THISadOpenStatic.com> wrote in message
news:%23f6286N...@TK2MSFTNGP03.phx.gbl...

jrl

unread,
May 2, 2008, 4:55:09 AM5/2/08
to
I looked for the \Windows\System32\inetsrv\backup directory, but it doesn't
exist. I see Windows\System32\inetsrv\history but it contains sequential
files that begin with MBSchema or Metabase.

Since I never used the AppCmd Add Backup command, are there any other places
I could find this file? If not, could you look at the file I'm attaching to
see if you can identify (and possibly correct) the errror. Would there be an
alternate way to learn what the problem is that IIS is unable to deal with?


""WenJun Zhang[msft]"" <wjz...@online.microsoft.com> wrote in message
news:g1$6$tQqIH...@TK2MSFTNGHUB02.phx.gbl...

applicationHost.config

WenJun Zhang[msft]

unread,
May 7, 2008, 4:53:28 AM5/7/08
to
Hi Jeff,

I just wonder if you received my previous email? I'm still waiting for the
response from you.

David Wang

unread,
May 7, 2008, 6:32:17 AM5/7/08
to
On May 2, 1:55 am, "jrl" <j...@newsgroup.nospam> wrote:
> I looked for the \Windows\System32\inetsrv\backup directory, but it doesn't
> exist. I see Windows\System32\inetsrv\history but it contains sequential
> files that begin with MBSchema or Metabase.
>
> Since I never used the AppCmd Add Backup command, are there any other places
> I could find this file? If not, could you look at the file I'm attaching to
> see if you can identify (and possibly correct) the errror. Would there be an
> alternate way to learn what the problem is that IIS is unable to deal with?
>
> ""WenJun Zhang[msft]"" <wjzh...@online.microsoft.com> wrote in message

>
> news:g1$6$tQqIH...@TK2MSFTNGHUB02.phx.gbl...
>
>
>
> > Hi,
>
> > If you have ever used AppCmd Add Backup command to create configuration
> > backup, please check the Backup folder in \Windows\System32\inetsrv .
> > There
> > should be a copy of previous applicationHost.config file. You can create a
> > copy of the current applicationHost.config first and then use the backup
> > file to overwrite the current one.
>
> > If any problem still persists, please update here. I will assist you on
> > further troubleshooting.
>
> > Thanks.
>
> > Sincerely,
>
> > WenJun Zhang
>
> > Microsoft Online Community Support
>
> > Delighting our customers is our #1 priority. We welcome your comments and
> > suggestions about how we can improve the support we provide to you. Please
> > feel free to let my manager know what you think of the level of service
> > provided. You can send feedback directly to my manager at:
> > msd...@microsoft.com.
>
> > ==================================================
> > Get notification to my posts through email? Please refer to
> >http://msdn.microsoft.com/subscriptions/managednewsgroups/default.asp...

> > ications.
>
> > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> > where an initial response from the community or a Microsoft Support
> > Engineer within 1 business day is acceptable. Please note that each follow
> > up response may take approximately 2 business days as the support
> > professional working with you may need further investigation to reach the
> > most efficient resolution. The offering is not appropriate for situations
> > that require urgent, real-time or phone-based interactions or complex
> > project analysis and dump analysis issues. Issues of this nature are best
> > handled working with a dedicated Microsoft Support Engineer by contacting
> > Microsoft Customer Support Services (CSS) at
> >http://msdn.microsoft.com/subscriptions/support/default.aspx.
> > ==================================================
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
>
>
>
>  applicationHost.config
> 60KDownload- Hide quoted text -

>
> - Show quoted text -


Your applicationHost.config file has been edited by something that
trashed the XML file with lots of NULL bytes at the end of the file.
It also had its standard CRLF carriage-return line-feed sequence
replaced with the Unix pattern of line-feed.

If you just remove all of the NULL bytes at the end of the file, after
the </configuration>, you should be fine.

j...@newsgroup.nospam

unread,
May 9, 2008, 12:18:24 AM5/9/08
to
Thanks very much David, after following your suggestion, everything is fine
again.


"David Wang" <w3....@gmail.com> wrote in message
news:96e69f9b-0090-4707...@l17g2000pri.googlegroups.com...

0 new messages