Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASMX service works on development server, returns 404 when deployed to IIS 7.5

I have a web application in ASP.NET 4.0. I've added an asmx service, primarily as a source for the autocomplete extender's lookup values.

When I debug on my machine locally, everything works fine. However, when I deploy the web application to IIS 7.5, I get a HTTP 404 response when trying to send data to the service.

I am able to browse to the service definition, see the available operations. Tellingly, however, when I use the test pages to test the service using POST, I receive an HTTP 404 again.

I'm not sure what is going on. I did create the asmx file within my web application and it is deployed in the virtual directory of my otherwise working production application.

Is there an issue with the .asmx file being deployed in the same virtual directory, perhaps?

like image 240
rsteckly Avatar asked Mar 24 '11 07:03

rsteckly


People also ask

How to expose my ASMX webservice on IIS?

how to expose my asmx webservice on iis...advance thanks.. Please Sign up or sign in to vote. 1. Publish your werbservice as a file 3. Map appropriate version of ASP.net framework 1.1 or 2.0 4. Make sure the iis and application pool is running. 5. Click on the Default web site hit the Run button |> it will start the web sites

Why did I get a 404 error when connecting to WebMatrix?

After installing and setting up a publishing profile in WebMatrix, a quick test showed a 404 returned by IIS error when attempting to connect with Web Deploy. I confirmed that the IIS Web Management Service (WMSvc) was started and configured properly. I also confirm proper IIS Manager permissions for the user I was using to connect with Web Deploy.

Does Web Deploy 3 on IIS 8 support WebMatrix?

I recently used Web Platform Installer to install Web Deploy 3 on IIS 8 so I could remotely develop a PHP site in WebMatrix. After installing and setting up a publishing profile in WebMatrix, a quick test showed a 404 returned by IIS error when attempting to connect with Web Deploy.


2 Answers

I've just encountered the same error, after stumbling over this SO entry:

Handlers returns 404 error on IIS7.5 integrated pipeline and

ASMX operation 404s, but ASMX service description doesn't, url routing issue?

and tried the solution of adding the asmx handler to the web.configs webServer section all was well:


  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
    <handlers>
      <add verb="*" path="*.asmx" name="asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>
  </system.webServer>


like image 63
Frank Avatar answered Sep 28 '22 06:09

Frank


You should check the application pool for the web service:

  • Is it configured to use the correct .NET version
  • Check the identity
  • Check the managed pipeline mode; some applications require Classic to be used
like image 21
Nils Magne Lunde Avatar answered Sep 28 '22 05:09

Nils Magne Lunde