FR.NET in ASP.NET application Exception
pinbot
Texas
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.
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
Set the FastReport.Utils.Config.WebMode property to true somewhere in the application startup code. This will disable loading/saving a config file.
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
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
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
Do you use FR on shared hosting, in medium-trust environment?