Do standard web services (asmx) work with MVC?

I just tried adding WebService (asmx based) from a WebForms project to a new MVC project. I can't seem to get into asmx webservice in IE?

In MVC, this should work the same way, I have a service in the Services folder, should it be in the view, or should it work asmx outside of the "MVC" routing?

Update:

I installed WebService, which initially drops into an .asmx file, on a test server recently configured with .Net 4.0 for the VS2010 MVC 2 project. (Windows Server 2003 IIS 6)

Is the same Web service on the development machine (VS 2010) available for viewing? Any ideas on the difference, maybe a setup problem?

+5
source share
5 answers

Answering my question ...

I can see WCF services when creating the base service (and I can not see asmx services)

Since WCF is considered a way to go anyway, I do it.

I did not try to get asmx work.

+1
source

According to Scott Hanselman, the default request is not processed by the ASP.NET MVC routing mechanism:

Why is ASP.NET MVC not capturing the request? Two reasons. Firstly, there is a RouteExistingFiles option in RouteCollection. The default value is false, which causes ASP.NET MVC to automatically skip routing when a file exists on disk. ( Source )

This indicates that there is a problem elsewhere.

+2
source

// , ASMX- MVC- - .

- , ASMX MVC. View SOAP- ( JSON , ).

+1

, , , webservice . , .

+1

It should work outside of MVC routing. Just creating a folder with asmx files should be enough. I have a webservices folder inside my project and it works great! There is no need to set routing to ignore the path; the file exists on the server.

0
source

All Articles