cancel
Showing results for 
Search instead for 
Did you mean: 

"File Repository Server error" when trying to commit a new CrystalEnterprise.Program instance to the InfoStore

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.