cancel
Showing results for 
Search instead for 
Did you mean: 

How to download a vaulted email

spiker
Level 4

Hello,

I am create a custom webpage in ASP .NET

This webpage contains a grid view that loads vaulted emails for that particular user
for each email I have the server name, the vaultid and the savesetid.

Is it easy to make a webcall to download the actual msg file?
If so, some sample code would be helpful

thanks

4 REPLIES 4

TheEmptyMind
Level 4

Is it easy to make a webcall to download the actual msg file?

As an example, accessing an URL something like below will download an archived item from the vault -- http://<vaultserver>/EnterpriseVault/Download.asp?VaultID=<VaultID>&SavesetID=<SaveSetID>.

Sorry, I don't have sample code for you in ASP.

Hope the above helps!

spiker
Level 4

that works well for the download. However I am having a problem for the restore.

I am calling via .net c# code

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://<vaultserver>/EnterpriseVault/restoreo2k.asp?VaultID=<VaultID>&SavesetID=<SaveSetID>&&mbx=xxx&server=xxx");
            request.Credentials = CredentialCache.DefaultNetworkCredentials;
            WebResponse response = request.GetResponse();
            Stream responseStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(responseStream);
            string responseFromServer = reader.ReadToEnd();
 
via debugging in visual studio this works, but when I copy the application to IIS 7 I am getting the error.
The remote server returned an error: (560) ERR Restoration of the basket by the Shopping Service failed..
 
 
Any idea why this wouldnt be working from IIS7 but the exact same code works from debugging within visual studio?. (IIS 7 is correctly set for windows authentication)

 

TheEmptyMind
Level 4

A couple of thoughts:

- Set IIS7 to use anonymous authentication, just to make sure the issue isn't related to authentication

- Are you running the archiving task?  If I understand right, Archiving task is responsible for RetrievalTask.exe that gets spawned when you try to retrieve the item.

John_Santana
Level 6

Wow, I didn't knew that this is possible :)