Wednesday, March 28, 2012

report viewer web.config settings for remote mode without session state

Hi
I am using the new report viewer control that comes with VS2005. My
application does not use session state as it is clustered and so I have been
following the Microsoft article for implementing the IReportViewerConnection
and then adding a key for the ReportServerConnection in the web.config file.
http://msdn2.microsoft.com/en-us/library/ms251661.aspx
My implementation of the interface is called ReportServerConnection and is
within a namespace called eNate.ESP.ESPWeb.
In my web.cofig file I have the following key
<add key="ReportViewerServerConnection"
value="eNate.ESP.ESPWeb.ReportServerConnection, ReportServerConnection" />
When I try to load the asp.net page which contains the report viewer control
I get the following error message
Microsoft.Reporting.WebForms.InvalidConfigFileTypeException: The type
eNate.ESP.ESPWeb.ReportServerConnection,
eNate.ESP.ESPWeb.ReportServerConnection does not implement
IReportServerConnection or could not be found.
I am definately implementing the interface but which ever way I try to
reference the class in the web.config key I always get this error.
The documentation about how to add this key file is not very clear and I
have not seen any other posts about this subject.
Could somebody please let me know how to reference this class correctly as I
think that is causing the error.
Thanks
Lewis Holmes
eNateHi Lewis,
Welcome to the MSDN newsgroup.
As for the custom IReportServerConnection class, we need to specify the
AssemblyQualified name which include the Class's full name, assembly name,
version, culture and publickeytoken info. For example:
<add key="ReportViewerServerConnection"
value="ControLibrary.SimpleReportServerConnection, ControLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
You can printout the class's assemblyQualified name through the below code:
Response.Write("<br/>" +
typeof(ControLibrary.SimpleReportServerConnection).AssemblyQualifiedName);
In addition, I agree that the document about the ReportViewer web.config
interfaces is not quite complete and sufficient. I suggest you also submit
this to the msdn product feedback center:
http://lab.msdn.microsoft.com/productfeedback/default.aspx
If there is anything else we can help, please feel free to post here.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Thanks so much Steven!
I have got it to work now.
Regards
Lewis Holmes
eNate
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:ZYha8E$RGHA.6904@.TK2MSFTNGXA03.phx.gbl...
> Hi Lewis,
> Welcome to the MSDN newsgroup.
> As for the custom IReportServerConnection class, we need to specify the
> AssemblyQualified name which include the Class's full name, assembly name,
> version, culture and publickeytoken info. For example:
> <add key="ReportViewerServerConnection"
> value="ControLibrary.SimpleReportServerConnection, ControLibrary,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
> You can printout the class's assemblyQualified name through the below
> code:
> Response.Write("<br/>" +
> typeof(ControLibrary.SimpleReportServerConnection).AssemblyQualifiedName);
> In addition, I agree that the document about the ReportViewer web.config
> interfaces is not quite complete and sufficient. I suggest you also submit
> this to the msdn product feedback center:
> http://lab.msdn.microsoft.com/productfeedback/default.aspx
> If there is anything else we can help, please feel free to post here.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>sql

No comments:

Post a Comment