internal io method for StiConfig.Load

Stimulsoft Reports.NET discussion
Post Reply
dj_uvdata
Posts: 17
Joined: Fri Jan 04, 2008 6:36 am
Location: denmark

internal io method for StiConfig.Load

Post by dj_uvdata »

Hello

I have my application on a windows server where our users gain access to teh application through a termina window.

If they have read permission only for the folder containing the configuration file they cannot open the file. But if I add the write persmission they can open it fine.

The StiConfig.Load() method. Does it open the configuration file with the mode FileMode.OpenOrCreate?

Thanks
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

internal io method for StiConfig.Load

Post by Edward »

Of course for correct work of the Stimulsoft Reports.Net write permission is necessary for the following folder:

Code: Select all

Documents and Settings\User Account Name\Local Settings\Application Data\Stimulsoft\
In that folder settings of the designer is written automatically.

Alternative Directory for saving of the configuration is controlled with the following static property:

Code: Select all

StiOptions.Configuration.DefaultReportConfigPath;
StiConfig saves its settings in the

Code: Select all

Stimulsoft\Stimulsoft.Report.config
file by default.

StiSettings class holds the configuration which is dynamically changed. So the write permission is vital for this folder.

Here is the alternative path for storing of the settings could be set:

Code: Select all

StiOptions.Configuration.DefaultReportSettingsPath;
The StiConfig.Load() method. Does it open the configuration file with the mode FileMode.OpenOrCreate?
Please see this method:

Code: Select all

public static void Load()
{
    if (!isAlreadyLoaded)
    {
        isAlreadyLoaded = true;
        Environment.CurrentDirectory = ApplicationDirectory;
        string path = StiPath.GetPath(GetDefaultReportConfigPath());
        if (File.Exists(path))
        {
            FileStream stream = new FileStream(path, FileMode.Open);
            Load(stream);
            stream.Close();
        }
    }
}

As for your question, I think that setting of the two static properties which were mentioned above, to the folder with write permission will resolve the issue with running of Stimulsoft Reports.Net in the terminal environment with limited or concurrent access to the account folders.

Thank you.
Post Reply