Page 1 of 1

StiConfig.applicationDirectory in a web application

Posted: Wed Mar 17, 2010 11:01 am
by Patrick8639
Hello,
when we use InitWeb in StimulReport, it sets the StiConfig.applicationDirectory to HttpContext.Current.Server.MapPath(String.&Empty).
The problem is that if the current page that is calling InitWeb is not on a physical folder but on a virtual one, applicationDirectory is set to an non-existent folder and, during the compiling of the report, StimulReport makes this directory the default one and crashes.
It would be better to use the directory where the StimulReport dll is located, or use HttpRuntime.AppDomainAppPath.
Patrick

StiConfig.applicationDirectory in a web application

Posted: Thu Mar 18, 2010 3:43 am
by Andrew
Hello,

Unforunately, we cannot change the code. because this may cause problems for other users. The StiConfig.ApplicationDirectory property supports get/set methods. Assign the required value to it.

Thank you.

StiConfig.applicationDirectory in a web application

Posted: Thu Mar 18, 2010 4:37 am
by Patrick8639
Andrew,
perhaps this can cause problems for other users, but you can perhaps avoid the crash in StimulReport, or change the directory when there is an exception in this line of code.
Or, at least, catch the exception and replace the message with something more useful for the user.
Patrick

StiConfig.applicationDirectory in a web application

Posted: Fri Mar 19, 2010 12:56 am
by Jan
Hello Patrick,

It have sense. We have updated our source code.

Thank you.