Configure IIS 7.0 to Enable Web Services in Classic Mode

What are the configuration file settings for enabling web services in IIS 7.0 in classic mode? The site must be in the application pool in classic mode because the report viewer manages the crash when working in Integrated mode. However, in the application pool in classic mode, web services cause the following error message:

The requested content is presented to the script and the static file handler will not be served.

β€’ If you want to use this content as a static file, add an explicit MIME card

EDIT - Additional error information:

  • HTTP Error 404.17 - Not Found
  • Module: StaticFileModule
  • Notification: ExecuteRequestHandler
  • Handler: StaticFile
  • Error Code: 0x80070032

Note. This particular application instance will be launched in the client account on a shared hosting environment, so access to the IIS interface will not / will not be available. In particular, the search for configuration file settings.

+4
source share
3 answers

In IIS Manager (Start β†’ Run β†’ inetmgr), select the website or virtual directory that you want to set to classic mode.

In the right Actions pane, click Basic Settings.

Next to the application pool (DefaultAppPool is used by default), click Select and change it to Classic .Net AppPool.

Walkthrough here .

Update: Sorry, I misunderstood your question. There are a few things you can try:

First, you need to double-check the capabilities of installing IIS from the control panel (Programs and Features β†’ Turn Windows Features on and off β†’ Internet Information Services β†’ World Wide Web Services β†’ Application Development Features). I have everything that is included in CGI and Server-side).

Secondly, make sure your site is configured correctly as an application (select website β†’ Actions β†’ View applications). If it is not there, you need to add it.

Thirdly, to check, in particular, the handlers accessed through the IIS manager β†’ Select a website β†’ Handler mapping β†’ Open a function β†’ Make sure .asmx is there. I have it three times, WebServiceHandlerFactory-Integrated (System.Web.Handlers.WebAdminHandler handler), WebServiceHandlerFactory-ISAPI-2.0 (Isapi module) and WebServiceHandlerFactory-ISAPI-2.0-64 (Isapi module).

Finally, you will be sure to use the correct .NET version for this application.

Again, apologies for Duff's original answer.

+5
source

Thanks Junto for the message! I tried so many things that other people were offered, but could not get my site to work. I followed your instructions and, of course, my applications were listed in the Sites in IIS section, but were not shown in application pools. I uninstalled Applications and created them. After that, everything works as expected.

In case someone is interested in what I experienced. I switched from IIS6 to IIS7. All virtual directories and applications seem to be ported, but not all of them are in application pools. So, if you run into the same problem, β€œError 400.17. If you want to use this content as a static file, add an explicit MIME card”, check your application pool to make sure all of your applications are shown.

+1
source

It looks like your HandlerMappings are a bit shy. You can return to the known good basic level (provided that you did not redo the server handler mappings):

  • Open IIS Manager
  • Open this site
  • In the Features view for the site, open the Handler Mapping function
  • In the Actions panel (upper right), click Restore to Parent
0
source

Source: https://habr.com/ru/post/1300373/