When i click the button for export to pdf in my radscheduler it's going to exception.
This problem has occured when i updated of the telerik version (2011.3.1202.40)
I attach the printscreen error
Best Regards
16 Answers, 1 is accepted
I had already used the method of the demo, and it worked before update at the version of telerik for FW .NET 4.0.
Do you reference the Telerik.Web.UI.dll trough the GAC?
This problem appears on export when the Telerik.Web.UI .dll is referenced trough the GAC and the assembly version is different from the WebResource.axd version registered in the web.config file. Please check you web.config for proper handler registration in the following section:
<
system.webServer
>
<
handlers
>
<
add
name
=
"Telerik.Web.UI.WebResource"
path
=
"Telerik.Web.UI.WebResource.axd"
verb
=
"*"
type
=
"Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=[ASSEMBLY_VERSION], Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/>
</
handlers
>
</
system.webServer
>
Where [ASSEMBLY_VERSION] is the exact version of your Telerik.Web.UI.dll.
Greetings,
Helen
the Telerik team
I've tried your solution, changing [ASSEMBLY_VERSION] in 2011.3.1202.40 ( my current version)
but the problem persist.
Have you another idea?
Thanks for your support
Do you have the Telerik.Web.UI.dll version 2011.3.1202.40 in the GAC(C:\Windows\assembly)?
Could you please send us your web.config file to examine it locally?
Regards,
Helen
the Telerik team
i've added the telerik.web.ui version in the gac, through the Visual studio 2010 command prompt using gacutil /i "C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 2011\Bin40\Telerik.Web.UI.dll" for the insert of the dll.
i've seen that in assembly folder i've the telerik.web.design for the framework 3.5, but i haven't the one for the framework 4.0
below i show you the web.config
<?
xml
version
=
"1.0"
?>
<
configuration
>
<
appSettings
>
<
add
key
=
"Telerik.Web.UI.StyleSheetFolders"
value
=
"~/css;~/css/Common"
/>
<
add
key
=
"Telerik.Skin"
value
=
"Default"
/>
</
appSettings
>
<
location
path
=
"~/images/common/formlogin.jpg"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
<
system.web
>
<
authentication
mode
=
"Forms"
>
<
forms
name
=
"auth"
loginUrl
=
"~/Account/login.aspx"
slidingExpiration
=
"true"
timeout
=
"43200"
defaultUrl
=
"~/..."
/>
</
authentication
>
<
authorization
>
<
deny
users
=
"?"
/>
</
authorization
>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
--><
compilation
debug
=
"true"
targetFramework
=
"4.0"
>
<
assemblies
>
<
add
assembly
=
"System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
add
assembly
=
"Telerik.Web.UI, Version=2011.3.1202.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/></
assemblies
></
compilation
>
<
pages
>
<
controls
>
<
add
tagPrefix
=
"telerik"
namespace
=
"Telerik.Web.UI"
assembly
=
"Telerik.Web.UI, Version=2011.3.1202.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/>
<
add
tagPrefix
=
"asp"
namespace
=
"System.Web.UI"
assembly
=
"System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
</
controls
>
</
pages
>
<
httpHandlers
>
<
remove
verb
=
"*"
path
=
"*.asmx"
/><
add
path
=
"ChartImage.axd"
type
=
"Telerik.Web.UI.ChartHttpHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource"
verb
=
"*"
validate
=
"false"
/>
<
add
verb
=
"*"
path
=
"*.asmx"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
add
verb
=
"*"
path
=
"*_AppService.axd"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
add
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate
=
"false"
/>
</
httpHandlers
>
<
httpModules
>
<
add
name
=
"RadUploadModule"
type
=
"Telerik.Web.UI.RadUploadHttpModule"
/>
<
add
name
=
"RadCompression"
type
=
"Telerik.Web.UI.RadCompression"
/>
<
add
name
=
"ScriptModule"
type
=
"System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
</
httpModules
>
<
httpRuntime
maxRequestLength
=
"2097151"
/>
</
system.web
>
<
system.webServer
>
<
validation
validateIntegratedModeConfiguration
=
"false"
/>
<
modules
runAllManagedModulesForAllRequests
=
"true"
>
<
remove
name
=
"RadUploadModule"
/>
<
add
name
=
"RadUploadModule"
type
=
"Telerik.Web.UI.RadUploadHttpModule"
preCondition
=
"integratedMode"
/>
<
remove
name
=
"RadCompression"
/>
<
add
name
=
"RadCompression"
type
=
"Telerik.Web.UI.RadCompression"
preCondition
=
"integratedMode"
/>
<
add
name
=
"ScriptModule"
preCondition
=
"integratedMode"
type
=
"System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
</
modules
>
<
handlers
>
<
remove
name
=
"ChartImage_axd"
/>
<
remove
name
=
"WebServiceHandlerFactory-Integrated"
/><
add
name
=
"ChartImage_axd"
path
=
"ChartImage.axd"
type
=
"Telerik.Web.UI.ChartHttpHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
remove
name
=
"Telerik_Web_UI_SpellCheckHandler_axd"
/>
<
add
name
=
"Telerik_Web_UI_SpellCheckHandler_axd"
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
remove
name
=
"Telerik_Web_UI_DialogHandler_aspx"
/>
<
add
name
=
"Telerik_Web_UI_DialogHandler_aspx"
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
remove
name
=
"Telerik_RadUploadProgressHandler_ashx"
/>
<
add
name
=
"Telerik_RadUploadProgressHandler_ashx"
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
remove
name
=
"Telerik_Web_UI_WebResource_axd"
/>
<
add
name
=
"Telerik_Web_UI_WebResource_axd"
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"ScriptHandlerFactory"
verb
=
"*"
path
=
"*.asmx"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
add
name
=
"ScriptHandlerFactoryAppServices"
verb
=
"*"
path
=
"*_AppService.axd"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
add
name
=
"ScriptResource"
preCondition
=
"integratedMode"
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
add
name
=
"Telerik.Web.UI.WebResource"
path
=
"Telerik.Web.UI.WebResource.axd"
verb
=
"*"
type
=
"Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2011.3.1202.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/>
</
handlers
>
<
security
>
<
requestFiltering
>
<
requestLimits
maxAllowedContentLength
=
"2147482624"
/>
</
requestFiltering
>
</
security
>
</
system.webServer
>
<
system.web.extensions
>
<
scripting
>
<
webServices
/></
scripting
></
system.web.extensions
>
</
configuration
>
Since you reference the Telerik.Web.UI assembly with its fully qualified name:
<
configuration
>
................
<
assemblies
>
<
add
assembly
=
"System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
add
assembly
=
"Telerik.Web.UI, Version=2011.3.1202.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/></
assemblies
></
compilation
>
<
pages
>
<
controls
>
<
add
tagPrefix
=
"telerik"
namespace
=
"Telerik.Web.UI"
assembly
=
"Telerik.Web.UI, Version=2011.3.1202.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/>
<
add
tagPrefix
=
"asp"
namespace
=
"System.Web.UI"
assembly
=
"System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
</
controls
>
</
pages
>
................
</
configuration
>
which contains the assembly version - you should have the corresponding Telerik.Web.UI.dll in the GAC. In your case it is version
2011.3.1202.40,
which is different from our official Q3 version(C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 2011\Bin40\Telerik.Web.UI.dll).Could you please verify that you have the Telerik.Web.UI.dll version
2011.3.1202.40
in the GAC?Regards,
Helen
the Telerik team
how can i see what kind of dll there is in the gac??
i've tried to insert the dll into the gac through the visual studio 2010 command prompt but i still cannot see it into the windows/assembly folder.
There is another place i have to look???
below i attach two print screens of the assembly and of the command prompt.
You may redirect the output of the "gacutil /l(lists all the assemblies from the GAC)" to the text file and then examine it.
See for details the following article.
As a result of the following command, you will receive all the assemblies from GAC in the 'gacoutput.txt' file located in c:\temp folder
gacutil /l >c:\temp\gacoutput.txt
Hope it helps.
All the best,
Helen
the Telerik team
I tried your suggestion and i've seen which i've a telerik.web.ui in GAC.
But the problem continue to persist.
Thanks for your support.
Could you please open a support ticket and send us a sample project which demonstrates the issue to examine it locally?
Otherwise I tested the issue locally, but couldn't reproduce the problem.
Please find attached a sample project as part of our local tests. Does it work at your side?
What might be the difference in your case? What are we missing?
Kind regards,
Helen
the Telerik team
I found the problem: the problem is the authentication mode form.
If I remove the code block
<
authentication
mode
=
"Forms"
>
<
forms
name
=
"auth"
loginUrl
=
"~/Account/login.aspx"
slidingExpiration
=
"true"
timeout
=
"43200"
defaultUrl
=
"~/GestioneProperty/PMgestione.aspx"
/>
</
authentication
>
<
authorization
>
<
deny
users
=
"?"
/>
</
authorization
>
(if I add the block of code to your example does not work anymore.)
I have not found the solution.
Have You another idea?
thanks
Thank you for the additional information. We finally were able to reproduce the problem locally.
Could you please add the the following setting to your web.config file:
<?
xml
version
=
"1.0"
?>
<
configuration
>
.................
<
location
path
=
"Telerik.Web.UI.WebResource.axd"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"?"
/>
</
authorization
>
</
system.web
>
</
location
>
.................
</
configuration
>
Please let us know whether it helps.
Regards,
Helen
the Telerik team
Hi!
thanks for the reply!
I tried your suggestion and it work!!
when i click export to pdf it is not opening in new window.
please help me.
I write the code to print Scheduler.
<telerik:RadScheduler ID="AppScheduler" class="BOPScheduler.css" runat="server" DataKeyField="Appointment.AppointmentID"
DataSubjectField="Facility" AutoPostBack="true" DataStartField="Appointment.ConfirmedDate" MonthView-VisibleAppointmentsPerDay="1"
DataEndField="Appointment.ConfirmedDate" SelectedView="MonthView" OnAppointmentCreated="AppScheduler_AppointmentCreated"
DataDescriptionField="Appointment.InmateNumber" ShowAllDay="true" OverflowBehavior="Expand" Localization-HeaderMultiDay="Work Week"
OnAppointmentDataBound="AppScheduler_AppointmentDataBound" AppointmentContextMenuSettings-EnableDefault="true" OnAppointmentCommand="AppScheduler_AppointmentCommand" OnAppointmentClick="AppScheduler_AppointmentClick" Localization-ShowMore="Show More" RowHeight="120px"
AllowInsert="false" AllowEdit="false" OnNavigationComplete="AppScheduler_NavigationComplete" >
<AppointmentTemplate>
<div class="rsMonthView .rsApt">
<div class="rsAptSubject">
<asp:Image runat="server" ID="imgProfile"/>
<%# Eval("Subject")%>
</div>
<asp:LinkButton ID="lkbappointment" runat="server" CommandName="SelectApp" Text='<%# Eval("Description") %>' />
</div>
</AppointmentTemplate>
<Reminders Enabled="true"></Reminders>
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
<ExportSettings OpenInNewWindow="true" FileName="SchedulerExport">
<Pdf Author="a" PageTitle="Scheduler Export" DefaultFontFamily="Comic Sans MS" PageBottomMargin="0px" PageFooterMargin="0px" PageHeaderMargin="0px" Subject="Test"/>
</ExportSettings>
</telerik:RadScheduler>
protected void btnpdfexport_Click(object sender, EventArgs e)
{
AppScheduler.ExportToPdf();
}
It seems that the problem is caused by the property class in your RadScheduler markup code:
<
telerik:RadScheduler
ID
=
"AppScheduler"
class
=
"BOPScheduler.css"
runat
=
"server"
.... >
....
</
telerik:RadScheduler
>
Please replace it with our recommended built-in property for setting a css class for the RadScheduler div container as shown in the code snippet below:
<
telerik:RadScheduler
ID
=
"AppScheduler"
CssClass
=
"your class name goes here"
runat
=
"server"
.... >
....
</
telerik:RadScheduler
>
Regards,
Boyan Dimitrov
Telerik