The mobile Internet is enabling a broad range of new applications that dynamically obtain information that is relevant to their current location. This type of application would greatly benefit from generic mechanisms for supporting the association between network resources and physical space, but existing systems are typically, based on vertical approaches valid only for narrow application scenarios. This paper argues that a comprehensive solution to this issue should address the important challenges of heterogeneity and openness, and proposes an approach based on the concept of location-based service, i.e. a service whose usage is associated with physical space, as a generic abstraction to support the development of location-dependent systems. The paper describes a model for associating location scopes with services, an architecture to support the discovery of location-based services on the Internet, and a prototype infrastructure in which several services and applications have been developed for validating the architecture.