1

New Windows server 2012 R2 installation, added ASP.Net and .Net 3.5 Getting following error when trying to browse web service file svc:

Could not load type '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'.

Any thoughts?

Whistler
  • 1,897
  • 4
  • 29
  • 50

2 Answers2

0

Open command prompt as administrator

Navigate to C:\Windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation and execute the command:

ServiceModelReg.exe /i

Navigate to c:\windows\Microsoft.NET\Framework\v4.0.30319 and execute the command:

aspnet_regiis -iru

Some roles and features are required on the server

  • enable server role "Internet Information Services", all underlaying services will be included

  • enable feature "HTTP Activation", this both under .NET framework 3.5 and .NET framework 4.5

In IIS make sure there is a "handler mappings" configured for the "*.svc" files

Laura Landuyt
  • 116
  • 1
  • 8
  • aspnet_regiis doesn't work on newer versions of Windows (8, 10, Server 2012R2). Instead see this answer for information on which Windows Features should be enabled: https://stackoverflow.com/questions/15198981/could-not-load-type-system-servicemodel-activation-httpmodule – MDMower Oct 02 '18 at 21:35
0

That error message turned out to be a bit of a red herring when I encountered it. I simply didn't have a HEAD route setup in WebApiConfig and was getting hundreds of HEAD requests per day. So, if you've verified that you have all the necessary Windows Features installed, then next check that you have default routes setup for each HTTP request method.

MDMower
  • 808
  • 8
  • 27