Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

LightSwitch Report Viewer- error while trying to serialize parameter

$
0
0

Hey smart folks I need your help again.

I have a LightSwitch Application (in browser Silverlight app) that has a Telerik Silverlight report viewer implemented.

I also have a second solution that implements the Reports and WCF Service.  I have successfully deployed both the LightSwitch application and the WCF service to two separate websites on Azure.

The application works fine but when I attempt to display the reports in the report viewer I get the following error.

The error occurs after I have set all of the report parameters on the LightSwitch side in the report’s renderbegin event handler.

Exception message
System.ServiceModel.CommunicationException :

There was an error while trying to serialize parameter Telerik.ReportService:parameters.

The InnerException message was 'Type 'System.Int32[]' with data contract name
'ArrayOfint:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected.


Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding
them to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.

   at System.ServiceModel.Channels.Remoting.RealProxy.Invoke(Object[] args)
   at proxy_3.BeginRenderAndCache(String , String , NameValueDictionary , NameValueDictionary , AsyncCallback , Object )
   at Telerik.Reporting.Service.SilverlightClient.ReportServiceClient.OnBeginRenderAndCache(Object[] invalues, AsyncCallback asyncCallback, Object state)
   at System.ServiceModel.ClientBase`1.InvokeAsync(BeginOperationDelegate beginOperationDelegate, Object[] inValues, EndOperationDelegate endOperationDelegate, SendOrPostCallback operationCompletedCallback, Object
userState)

 
The report needs the following parameters which are set in the LightSwitch application
     StudioId         Int32
     StudentIds     Int32[] //* Note this is an Int array*
     SortCriteria1  string
     SortCriteria2  string
     SortCriteria3  string
     DisplayName string

What is this telling me and what do I need to do to correct the problem.

Thanks again
Cliff
Code Follows

 The WCF service is basically an empty shell
IReportService like this
namespace WcfReportingService1
{
    [ServiceContract]
    public interface IReportService
    { 
    }
}

ReportService.svc like this
namespace WcfReportingService1
{
    public class ReportService :  IReportService
    { 
    }
}

WebConfig like this
<?xml version="1.0"?>
 
<configuration>
 
  <connectionStrings>
    <!--Connection String for Production - Azure-->
    <add name="Studio_Manager_ConnectionString"
        connectionString="Data Source=xxxxxxx.database.windows.net; Initial Catalog=xxxxxxxxxxx; User Id=xxxxxx;Password=xxxxxxxxx "
        providerName="System.Data.SqlClient" />
  </connectionStrings>
 
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
    <customErrors mode="Off"/>
  </system.web>
 
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <services>
      <service
              name="Telerik.Reporting.Service.ReportService"
              behaviorConfiguration="ReportServiceBehavior">
        <endpoint
               address=""
               binding="basicHttpBinding"
               contract="Telerik.Reporting.Service.IReportService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint
                address="resources"
                binding="webHttpBinding"
                behaviorConfiguration="WebBehavior"
                contract="Telerik.Reporting.Service.IResourceService"/>
        <endpoint
                address="mex"
                binding="mexHttpBinding"
                contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ReportServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="WebBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>
 
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
 
</configuration>// Any help at all will be greatly appreciated.

// Any help at all will be greatly appreciated.

 


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>