0

I cant get my Webservice published, it should be simple:

  1. I create the app in the IIS,
  2. place it as a 4.0 Classic .Net
  3. I publish it from .Net Solution within VS2012 Right click and publish on the Webservice project.

The files are placed and it should show by itself on the browser on the URL of the server specified.

But I stumbled upon the following problems:

HTTP Error 404.17 - Not Found 
The requested content appears to be script and will not be served by the static file handler.

So I've looked for It and found this two options:

Option 1:

http://www.banmanpro.com/support2/Requested_Content_Appears_to_be_Script.asp

This one says I should go to Integrated, instead of Classic App Pool. but it's like if I changed a problem for another because now it says:

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

When I go to the web config see what is this error talking about I see no handler tag!

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <appSettings />
  <connectionStrings />
  <system.web>
    <compilation targetFramework="4.0" />
    <!--
      The <authentication> section enables configuration 
      of the security authentication mode used by 
      ASP.NET to identify an incoming user. 
    -->
    <authentication mode="Windows" />
    <!--
       The <customErrors> section enables configuration 
       of what to do if/when an unhandled error occurs 
       during the execution of a request. Specifically, 
       it enables developers to configure html error pages 
       to be displayed in place of a error stack trace.

       <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
         <error statusCode="403" redirect="NoAccess.htm"/>
         <error statusCode="404" redirect="FileNotFound.htm"/>
       </customErrors>
    -->
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
  </system.web>
    <system.webServer>
        <directoryBrowse enabled="true" />
    </system.webServer>
  <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
</configuration>

Should I add one? If so, how?

Option 2:

Script not served by static file handler on IIS7.5

Basically it says I shoud do a aspnet_regiis -i, but when I try

going to %windir%\Microsoft.NET\Framework\v4.0.30319

Even when the folder exists, There is no aspnet_regiis!!

I've only found the aspnet_regiis on the 2.0 Fwk =(

Is that normal?

Community
  • 1
  • 1
apacay
  • 1,702
  • 5
  • 19
  • 41

1 Answers1

1

The handler tag wasn't the answer, however, both options drove me to look for the missing aspnet_regiis of fwk 4.

There was no aspnet_regiis because the full fwk 4.0 wasn't actually installed on a first place.

I had installed on the server the Framework 4 Client Profile and the debugger, which isn't the full version. From now on, whenever I think I have fwk 4 installed, I'll check twice.

After installing it, on Framework 4.0 Classic Pipeline Mode (instead of Integrated) made it work just fine.

But Attention!

After installing the framework, IIS will change the default pipeline to 4.0, that means, if you had ongoing a web(site/service) on 2.0 it will automatically stop working. (It happened to me)

apacay
  • 1,702
  • 5
  • 19
  • 41