I am trying to use Business Connectivity Services in SharePoint 2010 to interface with an Oracle database. I have created a .NET assembly connector in combination with some custom application pages to display the content, and it seems to work fine. I am using a Secure Store Target Application to store individual users' Oracle credentials, but I am not sure how to best allow individual users to actually supply those Oracle credentials when I discover in my code that they are not already present in the store. I see that the Target Application Settings page in Central Admin references a default Target Application Page URL. How can I programmatically get the URL for that default page? Is there a better way to allow users to supply their credentials when I find that they're not already in the store?
I ran into the same problem you had if I understand you correctly. I solved it by using the CredentialManagementUrl property of the SecureStoreCredentialsNotFoundException that is thrown. The URL points to an input page where the user can enter their credentials. Like so:
Where ErrorMessage is shown on the page.