Search code examples
web-servicesapp-code

Creating Web Services in VS 2005


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


Solution

  • 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.