views:

75

answers:

2

Why is that Web Service files (.asmx) have their code-behind placed in app_code folder by default unlike the regular .aspx files?

A: 

When you work with Web site projects, this is the style Visual Studio uses. It's not the case with Web application projects.

Mehrdad Afshari
A: 

Generally asmx files are more like proxies for business objects and business objects don't belong to Web Site projects. Web service classes should be placed in a different project dedicated in business logic and not in presentation. aspx and aspx.cs on the other hand are complementary files correctly placed inside a web site project as their job is to present the data.

Diadistis