Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

When you login, the .NET client API initializes a local security token based on the supplied credentials.  It does not actually make a call however, until the first request is executed.  At that time, the forms service will attempt to authorize the user based on the provided token.  In the above examples, the first call is for the user entry.

 


How do I get the list of all applications for the current user?

Code Block
    FormsService service = ...;
    ApplicationQuery query = service.CreateApplicationQuery(null);
    ApplicationFeed apps = service.Query(query);
    foreach (ApplicationEntry app in apps.Entries)
    {
            Console.WriteLine("App: " + app.Title.Text);
            // ...
    }

...

Code Block
ApplicationEntry app = ...; // find the right application 
 
app.Delete();

...


How do I upload an Application for a specific user?

First get a hold of the corresponding UserEntry for the desired user, and then use the users ApplicationFeed.

...

Code Block
FormsService formsService = ....;          
ApplicationEntry entry = ....;          
string fileName = ....;          
 
Stream contentStream = formsService.QueryContent(entry.Content);   
 
//if the Application needs to be written to a file:
using (FileStream fileStream = File.Create(fileName))
{
    contentStream.CopyTo(fileStream); 
} 

  

After I found a ApplicationEntry for the first time can I get the entry directly?

If you have an entry id you can retrieve the entry directly.

...

Note

...