It depends on what you need to do. If you need to execute CRM related JavaScript using the Xrm.Page object, then I recommend that you use an HTML Web Resource with your custom ASP.NET application embedded within an iFrame. This will allow you to write JavaScript
on the HTML page which can access the Xrm.Page object which you can then use to pass parameters to your custom application.
I hope this helps.