on 07-23-2014 3:15 PM
I've run into an issue where saving a new CrystalEnterprise.Program instance is throwing an ambiguous exception with no other information than a generic HRESULT code and the even less useful error message "File Repository Server error". I've debugged the code using the COMException managed debugging assistant and Reflector to get to the callsite of the COM object, but there is nothing there to indicate what the actual File Repository error is attributed to. Logging for the InputFileRepository service in the CMS was been set to HIGH, but nothing shows there as a result of my code executing.
The call to myInfoStore.Commit(...) is where the COMException is thrown.
protected void CreateProgramObject(InfoStore infoStore)
{
using(PluginManager pluginManager = infoStore.PluginManager)
{
using(InfoObjects newCollection = infoStore.NewInfoObjectCollection())
{
using(PluginInfo programPlugin = pluginManager.GetPluginInfo("CrystalEnterprise.Program"))
{
using(Program tempProg = (Program)newCollection.Add(programPlugin))
{
const string USER_FOLDER_QUERY =
"Select SI_ID From CI_INFOOBJECTS Where SI_NAME = 'sample.user@client.com'";
using(InfoObjects folders = infoStore.Query(USER_FOLDER_QUERY))
{
if(folders.Count < 1)
{
Response.Write("No user folder was found!");
return;
}
using(InfoObject userReportFolder = folders[1])
{
tempProg.Title = "Scheduled File";
tempProg.Description = "My new program";
tempProg.ParentID = userReportFolder.ID;
tempProg.ProgramType = CeProgramType.ceScript;
tempProg.Files.Add(@"E:\sample.bat");
try
{
infoStore.Commit(newCollection);
}
catch(SystemException snx)
{
Trace.Write(snx.ToString());
}
}
}
}
}
}
}
}
Has anyone run into this issue and found a resolution?
I would try using a UNC path to the file instead of a drive letter. The actual process of adding the file will occur on the BO server and it probably doesn't know what the "E" drive is.
I don't guarantee this will resolve the issue, but, based on how the CMS works, I think it will make a difference.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the reply. I changed the file path on the BOE Server to match the path I'm using in the Files.Add(...) call. At least now I get a different error message, but it's still not enough to resolve the issue. The message is "File Repository Server error : File system operation for D:\Scripts\test.bat on File Repository Server failed. If the problem persists, please contact your system administrator for event log information." I verified the service account the SIA service runs under can access that path, but still no luck.
Using a UNC path resulted in the original "File Repository Server error" message in the Exception.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.