Q:

when to use wcf and asp.net? 

I want to do an application that use a database and can show the information in datagrids, execute commands with buttons and so on.  I want to do it inside the lan and outside the lan. 
I think that i have two options.  Create a desktop application that use wcf to connect with the service to access to the database.  The second option is create an aso application, so I can access to the database with any browser through internet. 
Are the two options a good solution?  What are the pros and cons of wcf and pros and cons of asp.net? 
When to use asp.net and when wcf? 

A:

When you only have one client and your only need is to access it via LAN and internet then developing an ASP.NET application is less overhead.  This because you don’t need to setup an extra service that you need to configure and secure.  On the other hand creating a good UI for an ASP.NET application can be much harder than just a WinForm of WPF application (depending on your UI-needs). 
But….  What if you’re planning new clients in the future?  Maybe a (native) mobile app or another (windows/web) client for a different group of users with different needs?  Then a web service give you some advantages…
For example you want to make a new Windows Phone application (in addiction to your web application) for some CRUD operations.  
When you write all the database logic and business rules in you web application you can’t use it directly in you Windows Phone.  Okay you can maybe you can use the assembly if it is compatible with that .NET framework profile.  But what if you want to create an Android application without using Xamarin or something similar.  Than you can’t use the assembly’s from you web application and you need to rewrite your logic again… When you had a web service (for example a REST web service) you can call the service for all the database and (shared) business logic.  And you don’t need to care about if its working the correct way.  As you probably can see maintainability can also be an advantage of a web service because all the logic is centralized in the service.