Video Screencast Help

Cannot store file using Content management EV API in C++ application

Created: 28 Nov 2011 • Updated: 06 Dec 2011 | 14 comments
This issue has been solved. See solution.

Hi ,

I'm trying to create an application (C++) for file archiving using Symantec Enterprise Vault Content Management API. For test purposes I use an EV server running on a separate box (virtual machine) which is visible/pingable/accessible via HTTP/  in the network. 

My application knows IP/DNS name, Vault Store Id, Archive ID. When I run this application on a client side and try to insert a new item (a file), the Insert() method returns an error CONTENTMANAGEMENTAPI_E_NOT_FOUND.

If I copy the same application and a new item (a file) on EV server and run it there, it works, i.e. item is stored successfully returning a new Item ID.

All client dlls installed properly on a client machine, Vault Store ID, Archive ID, retention category are correct - I see them in Enterprise Vault Administration Console, anonymous/guest user granted rights to store files.

In API description, it's clearly mentioned:

"In general, applications which use the APIs should be run from a client computer, and not on the Enterprise Vault server."

so, I believe, there should be a way to store an item using application on a client side.

My question is - what I'm doing wrong? Am I missing something?

This is what I do in my application:


CoCreateInstance(clsid, NULL, CLSCTX_ALL, __uuidof(IContentManagementAPI2), reinterpret_cast<LPVOID*>(&cmAPI2));

hr = cmAPI2->put_DirectoryDNSAlias(CComBSTR(L"192.x.x.x"));

IArchive* pArchive = NULL;
hr = cmAPI2->get_Archive(&pArchive);

hr = pArchive->put_Id(bstrArchiveID);

IItem* pItem = NULL;
hr = cmAPI2->get_Item(&pItem);
hr = pItem->put_ArchiveId(bstrArchiveID);

IArchiveMetaData* pArchiveMD = NULL;
hr = pItem->get_ArchiveMetaData(&pArchiveMD);

IContent* pContent = NULL;
hr = pItem->get_Content(&pContent);
hr = pContent->put_Title(CComBSTR(L"Test file 1"));

hr = pContent->put_FileExtension(CComBSTR(L"tst"));

vt1.vt = VT_BSTR;
vt1.bstrVal = CComBSTR ("File name and path");

hr = pContent->put_Data(vt1);

hr = pItem->Insert();


//release all



Comments 14 CommentsJump to latest comment

JesusWept3's picture

just as a matter of interest, is the SiteID pingable?
According to the documentation its the Vault Store Does Not Exist, so it sounds like maybe its an authentication issue with the Storage Service?

vvm101's picture

Currently I set an IP address as DirectoryDNSAlias property of IContentManagementAPI, and yes, it's pingable. But I did try to use SiteID for this property, and it didn't make any difference. BTW, if you tell me how to ping  SiteID, I'll try it.

According to the documentation, CONTENTMANAGEMENTAPI_E_NOT_FOUND error means:

"Archive, Vault Store or Retention Category does not exist" - but it works when it's located on EV server side.

I do agree it can be the authentication issue, which means I'm missing some settings on EV server side or some properties on a client side - I would really appretiate if you give me a hint.


JesusWept3's picture

OK so the site id will be at the end of all of your EV GUID's, such as my archive ID is 16E175A0FCE3FBC47A54235332BDBEE441110000evsite

So the Site Alias is always at the end of the guid, so you'd ping EVSite, and it would return from the EV Server the Site Alias is pointed to

Another example would be
Your Site Alias would be, and again would reply from which ever EV server the DNS points to.

Thats just a guess though as i've seen a lot of API stuff fail if the Site Alias is not contactable/pingable.

Another couple of things would be, on the EV Server in the System Logs do you see any Distributed COM errors where it shows a DCOM Package that failed to open? What does the GUI relate to?

And when running the utility, is this utility on a machine that is joined to the same domain the EV Server is on and are you running it as your local user or the EVAdmin account?

If you do a RunAs and then enter your EVAdmins details, does it work and then just fail for the other users?

Other things you could try is dtracing on the EVServer things like AuthServer, StorageArchive and DirectoryService and also on the local machine run a DTrace on all other executables and see if that offers any hints what so ever

vvm101's picture

Thanks for your responce.

1) In my case, Site ID (which I took from corresponding registry key in EV Server) ends with "EVSite", I tried to ping it on a Server side and it returned only "external" IP  - something like 10.xx.xx.xx. Actually, I run EV Server in Virtual Machine, and this IP corresponds to "HostOnly" network adapter, but Virtual Machine also has another network adapter in "Bridged" mode, which has 192.x.x.x. address. 

So, ping for "EVSite" on the server side gives me only 10.xx.xx.xx, which is not visible/pingable from the client side - I don't know if it's the reason for the problem I'm facing. IP 192.... visible/pingable on both client/server sides.

2) In the Event Viewer, I see something like

"The EnterpriseVault.DirectoryConnection object reported an error.
An outgoing call cannot be made since the application is dispatching an input-synchronous call."

"The I tried to run the programm again, and new record appears:

The FSA Reporting Web service is not running at 'http://evserver2/FSAReporting/FSAReporting.asmx'.
To troubleshoot the Web service configuration, see the Enterprise Vault Technical Note 'Troubleshooting FSA Reporting'."

Is it related with the problem?

3) I run this utility from the host machine, from which I can ping/see EV server using "internal" IP 192.x.x.x. But EV server preconfigured so that it belongs to another domain - if it's the case, what can I try to resolve it.

4) I can't run this utility using Run As since I cant add the user from EV Server


JesusWept3's picture

Any change you can create a VMware client OS with win7 or winxp and join it to the same domain as the EV server and try again? I suspect it's one part routing through VMware and one part authenticating via a non-trusted user

The directory connection error could be something if it's Failing on authentication via impersonation, you would see an audit failure in the security logs of your SQL server

As for the FSA reporting, that's not related, it just means its trying to communicating to a virtual directory in Kia that doesn't exist unless you run the fsareportingconfig utility (it's a command line)

vvm101's picture


I had a discussion with our network admins and they told that unfortunately I can't try another VM as a part of EV server domain 'cause for that purpose this EV VM must be a domain controller, which is impossible.

Do you know where I can check if authenticating via a non-trusted user happend?

regarding FSAReportingConfigUtility - I'm going to try.

Do you know if EV Content Management API allows to pass somehow user/password credentials?


vvm101's picture


I have some updates.

1)  I set routing for "internal" preconfigured IP 10.x.x.x, so this IP now "visible" in the network. Then I tried to use it as DirectoryDNSAlias property, didn't help.

2) I got an extended error information via IExtendedErrorInfo interface, this what it shows:


InnerError: -1073473324 (0xc00418d4)

Description:Archive, Archive Folder, Vault Store or Retention Category does not

Inner Error Description:There was no such Storage Service Entry %1 in the Vault
Directory   [0xc00418d4]

3) I was not able to map InnerError code 0xc00418d4, but searching for this code brought me to another discussion on this forum:

According to this, my situation is pretty much the same, and in their case the reason was:

"There was some DNS-problems in my domain, so the EV-server could not be resolved correctly from the remote computer. Running code from the remote computer towards the EV-server now works fine."

Unfortunately, they did not provide any details about what was the DNS-related problem and solution.

May be you have any ideas what can I try or check?

Thanks.'s picture


I sent you an email and a message via Symantec Connect.  Please check your email and reply back to me.

vvm101's picture


Thanks for your response.

To provide all necessary information I have to talk to my management. Unfortunately, the are not available until Monday.

Thanks again and hope to talk to you soon.

vvm101's picture

OK, I solved the problem.

Thanks for all who took part in the discussion.

AndrewB's picture

what did you do to solve it?

Andy Becker | Authorized Symantec Consultant | Trace3 | Symantec National Partner |

vvm101's picture

Actually, it was a set of problems.

Resolution included mapping in "hosts" on a client side for EV server name and Site Id name. Then, DirectoryService was not started on a server.

Also in my case I had to make "internal" IP 10.x.x.x. visible for a client using routing.

Dtarce utility was helpful.

I can provide more details if you describe your situation.

AndrewB's picture

i was just asking because the first thing JW told you to do was to check the name resolution.

Andy Becker | Authorized Symantec Consultant | Trace3 | Symantec National Partner |

vvm101's picture

Well, tere is some ambiguosity with names.

At first,  DNSAlias property of  CM API object doesn't affect anything - which confused me.  Then after EVSite name mapping, it required also EV server name to be mapped (server name was mapped in the very beginning).