FR.NET in ASP.NET application Exception

pinbotpinbot Texas
edited 9:59AM in FastReport .NET
I've deployed my FR.NET web report to my Windows Server 2003.

It works on my development server but throws this exception in the Event Viewer/Application. I generate the report in a background thread.

Looks like it's trying to create a directory....




An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/1616419540/Root/VETest

Process ID: 2472

Exception: System.TypeInitializationException

Message: The type initializer for 'FastReport.Report' threw an exception.

StackTrace: at FastReport.Report..ctor()
at ALNUsers_LastUpdate.StartLongProcess() in d:\Web\xxxx.com\VETest\Search\SalesWorksheet2.aspx.cs:line 38
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

InnerException: System.UnauthorizedAccessException

Message: Access to the path 'C:\Documents and Settings\Default User\Local Settings\Application Data\FastReport\' is denied.

StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity)
at System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity)
at FastReport.Utils.Config.lfmB8hnee()
at FastReport.Utils.Config.0lwIDgyOn()
at FastReport.Report..cctor()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Comments

  • edited 9:59AM
    Hello,

    Set the FastReport.Utils.Config.WebMode property to true somewhere in the application startup code. This will disable loading/saving a config file.
  • pinbotpinbot Texas
    edited 9:59AM

    That fixed it.

    I didn't see that in the programmer's manual under the asp.net section.

    You might want to add that useful tip.

    Bryan

  • edited 9:59AM
    Dear AlexTZ

    I did it.(I have changed webmode to true). but after that i got this error :

    Login failed for user 'SERVER217\IWPD_102(sepidbal)'.

    please help me as soon as possible.

    Best Regards
    smaj
    >
  • edited 9:59AM
    Sorry, but looks like it's not a FR-related problem.
  • edited 9:59AM
    Hi again,

    thanks for last post.but I have an important question ?

    can fastreport.net print directly in a webapplication on host ?

    my portal is dotnetnuke.I designed a very simple sample and I uploaded it to host.but when i visit the site from a client I only have export options
    and I haven't any print option.please help.

    thanks in advance
    smaj

  • edited 9:59AM
    Hello,

    Do you use FR on shared hosting, in medium-trust environment?
  • edited 9:59AM
    Under medium trust, FR cannot export to PDF and print (using PDF), because this process involves many winAPI calls which is not allowed in restricted environment. We plan to add another print option - print a html using webbrowser.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.