IIS7Register failed with HRESULT 800700b7: 'Cannot create a file when that file already exists.'

Posted by Optimax on Server Fault See other posts from Server Fault or by Optimax
Published on 2011-11-02T16:11:56Z Indexed on 2012/04/12 11:32 UTC
Read the original article Hit count: 1687

Filed under:
|
|
|

I am trying to re-install ASP.NET on IIS7 running in Win7/64, which magically stopped working all of as sudden.

When I run aspnet_regiis -i, I get an error message that says

Finished installing ASP.NET (4.0.30319). Setup has detected some errors during the operation. For details, please read the setup log file C:\Users\username\AppData\Local\Temp\ASPNETSetup_00031.log

Looking at the log, it reports

Failure Changing IIS ApplicationHost.config: IIS7Register failed with HRESULT 800700b7: 'Cannot create a file when that file already exists. '

The real problem surfaces when trying to access an ASP.NET web page from that server:

HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

and

Most likely causes: Managed handler is used; however, ASP.NET is not installed or is not installed completely. There is a typographical error in the configuration for the handler module list.

So it seems ASP.NET has NOT been properly re-installed. Now, I am aware of the alleged one-and-only remedy for this, repeated all over the Web, and referenced for example here:

http://blogs.msdn.com/b/dougste/archive/2010/09/06/errors-installing-asp-net-4-0.aspx

Except that the proposed solution does not work for me. I have expanded the %windir% macros within isapiCgiRestriction section for .NET 4.0 - and aspnet_regiis still fails for me.

Any other ideas?

© Server Fault or respective owner

Related posts about windows-7

Related posts about ASP.NET