6

Using IIS7.5, the website works fine in Visual Studio but when I try to deploy on IIS get the following error.

Module IIS Web Core
Notification ExecuteRequestHandler
Handler PageHandlerFactory-Integrated
Error Code 0x8007000d
Requested URL http://localhost:80/EFT/default.aspx
Physical Path C:\inetpub\wwwroot\EFT_Converter\default.aspx
Logon Method Anonymous
Logon User

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
StevieB
  • 6,263
  • 38
  • 108
  • 193
  • This looks like a duplicate of http://stackoverflow.com/questions/6846544/how-to-fix-handler-pagehandlerfactory-integrated-has-a-bad-module-managedpip on first glance; certainly other users might also find that post useful... – Owen Blacker Sep 07 '12 at 12:20

6 Answers6

20

The version of .Net you are using has not been registered with IIS correctly. If it is .Net version 4 on a 64-bit 2008 server use these two commands to fix it.

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
Owen Blacker
  • 4,117
  • 2
  • 33
  • 70
ozhug
  • 983
  • 11
  • 19
  • ..also worth checking that the application pool is set to the right framework and that iis application actually points to your folder – BornToCode Mar 02 '14 at 11:30
6

Open command prompt on window and run:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\ aspnet_regiis.exe -i 

This will resolve your issue.

cheesemacfly
  • 11,622
  • 11
  • 53
  • 72
harsh
  • 61
  • 1
  • 1
2

Where your handlers are defined in the web.config, add a <clear /> before the first item in the list, if there is not one there already. Also make sure that the application pool running the web site is running the version of .Net that you are targeting in your code.

Derreck Dean
  • 3,708
  • 1
  • 26
  • 45
  • I actually have no handlers specified in my web.config, and .net version is correct in web.config – StevieB Dec 28 '11 at 18:53
  • In IIS, is your application pool set to .Net 2.0 or 4.0? That should match what is in your web.config also. The version of .Net the application pool uses is set in IIS, and not in your web.config. – Derreck Dean Dec 29 '11 at 21:11
  • It is set to 4 in IIS which matches what it says in my web.config – StevieB Dec 30 '11 at 22:20
0

I had this problem and found that removing the following folder helped, even with the non-Express edition.Express:

C:\Users\<user>\Documents\IISExpress

Thomas Bratt
  • 48,038
  • 36
  • 121
  • 139
0

Try to set web config in this way:

<system.webServer>
      <validation validateIntegratedModeConfiguration="false" />
</system.webServer>

Ensure you have ASP.NET has been installed correctly. You should see default application pool named "ASP.NET 4" or something like this. If it's not looks like ASP.NET not installed correctly. Try aspnet_regiis -i in .NET 4 CMD.

Alex Dn
  • 5,465
  • 7
  • 41
  • 79
0

Please go through this post.

From the post:

  1. Click Start -> All Programs -> Accessories -> Run In the Open textbox paste in the following line (see list of all .NET Framework version install, repair and unistall command lines here):

For silent repair on 32 bit computer with .Net Framework version 4.0.30319 use:

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

For silent repair on 64 bit computer with .Net Framework version 4.0.30319 use:

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

2. Click OK to start the repair. 3. After, the repair ran for a few minutes, I restarted IIS 7.5, and things began to work correctly!

Amar Palsapure
  • 9,590
  • 1
  • 27
  • 46