This is a migrated thread and some comments may be shown as answers.

Trial on IIS

4 Answers 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
brigus
Top achievements
Rank 2
brigus asked on 11 May 2010, 03:04 PM
I am trialing the silverlight and reporting tools.  I am using the same technique to put the reports in a combobox as the sample.  When I put up my web application on the server the reports are only visible for a short period of time in the combobox.  Is this because I am using the trial dlls or because there is an issue with my project?

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 14 May 2010, 11:29 AM
Hello brigus,

The trial version of Telerik Reporting is fully functional and the only difference compared to the dev version is that it displays a trial message in the reports, so this is not the problem. Moreover we notice that you have access to Telerik Reporting dev version, so you could easily test to verify this.
According to your description, it would seem that the report assembly is not loaded into your AppDomain. The IReportService.ListAvailableReports() method uses reflection to find all available reports - that is, all loaded into the current AppDomain types that implement the Telerik.Reporting.IReportDocument interface.
So you must have the assemblies that contain your reports loaded into the current AppDomain. This means that not only your report libraries should be referenced, but you have to use them.

A similar behavior may be observed when a web application is supposed only to host the report service and serve a Silverlight application (XAP). In this case there is no reason for the ASP.NET runtime to load the report library and any call to the ListAvailableReports() operation will return 0 reports.

The solution is as simple as referencing a single type from the report library like this:

Copy Code
public class Global : System.Web.HttpApplication
{
    ....
     
    protected void Application_Start(object sender, EventArgs e)
    {
        var t = typeof(MyReportLibrary.Report1);
    }
 
    ....
}

The code snippet above relies on the Application_Start method in Global.asax and its only purpose is to force the .NET runtime to load the assembly where MyReportLibrary.Report1 type resides. Performing this operation as earlier as possible and for all report libraries (assemblies that contain your reports) will ensure that any call to ListAvailableReports() service operation will return proper result.

Regards,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
brigus
Top achievements
Rank 2
answered on 14 May 2010, 04:50 PM
I am not sure where to put the code that you included.  I don't have a global.aspx.  I attached an image of my solution, hopefully that will let you know what my solutionoutline looks like.  I tried putting it in the App.xaml but that did not solve the issue.  I am guessing I need to put it somewhere in the .Web project but I am not sure in what file.

Thanks.
0
Steve
Telerik team
answered on 19 May 2010, 05:05 PM
Hi brigus,

Actually I was referring to the Global.asax file - see screenshot. More information about it is available in the following MSDN article.

Kind regards,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
brigus
Top achievements
Rank 2
answered on 19 May 2010, 09:27 PM
I added the code to an asax file adn i am still having the same issue.

namespace TriStateGISReportViewer.Web
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            var a = typeof(GISReportLibrary.GenerationMeters);
        }
}


 

Tags
General Discussions
Asked by
brigus
Top achievements
Rank 2
Answers by
Steve
Telerik team
brigus
Top achievements
Rank 2
Share this question
or