while trying to output the details using RadSchedular control to export to PDF" getting follwing error.
The remote server returned an error: (401) Unauthorized.]
System.Net.HttpWebRequest.GetResponse() +5376077
Telerik.Web.UI.Scheduler.SchedulerExporter.GetStyleSheet(String url) +76
Telerik.Web.UI.Scheduler.SchedulerExporter.RenderControl(Page page) +254
Telerik.Web.UI.Scheduler.SchedulerExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +55
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8679961
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
Telerik.Web.UI.Scheduler.SchedulerExporter.PdfExportRenderPage(HtmlTextWriter nullWriter, Control page) +108
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
currently we are using the NTLM security on web application then error is occuring.
when we changed the security level to anonymous able to open the PDF document.
Request to assistance on the above issue to workout with NTLM secutity.
Thanks
Rajendra.k
23 Answers, 1 is accepted
We fixed the 'The remote server returned an error: (401) Unauthorized.' error for the Q3 2011 release, which is about the go live after few hours. Please download the new bits, test them on your side and let me know how it goes.
Best wishes,
Simon
the Telerik team

I'm using the Q1 2013 ASP.NET AJAX controls and I'm getting this error when using the ExportToPDF() function.
Any ideas?
Thanks,
Matt
We are not aware of what may be causing such error with the latest version of RadControls. Would you please let us know if your sample is some how different from the one on our online demo and if it happens locally or when you host it on the server?
If you notice any other differences please share them as well.
Plamen
Telerik

Would you please provide a bit information about the server you are using so we could test the exact scenario locally and try to research the issue deeper?
Plamen
Telerik

Would you please try setting the following setting in your web config and let us know if it is working properly this time:
<
configuration
>
...
<
location
path
=
"Telerik.Web.UI.WebResource.axd"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
...
</
configuration
>
You can also review this help topic where more information about possible issues in PDFExport is provided.
Hope this will be helpful.
Regards,
Plamen
Telerik

In order to avoid any further confusions I am attaching a sample web site project containing RadScheduler and RadButton control to export the RadScheduler to PDF file and it works as expected at our side. Could you please try to move that project to your server and test whether it is working and exports it successfully?
Regards,
Boyan Dimitrov
Telerik

Here is my web.config in case it will help:
<?
xml
version
=
"1.0"
?>
<
configuration
>
<
configSections
>
<
sectionGroup
name
=
"system.web.extensions"
type
=
"System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
>
<
sectionGroup
name
=
"scripting"
type
=
"System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
>
<
section
name
=
"scriptResourceHandler"
type
=
"System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission
=
"false"
allowDefinition
=
"MachineToApplication"
/>
<
sectionGroup
name
=
"webServices"
type
=
"System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
>
<
section
name
=
"jsonSerialization"
type
=
"System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission
=
"false"
allowDefinition
=
"Everywhere"
/>
<
section
name
=
"profileService"
type
=
"System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission
=
"false"
allowDefinition
=
"MachineToApplication"
/>
<
section
name
=
"authenticationService"
type
=
"System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission
=
"false"
allowDefinition
=
"MachineToApplication"
/>
<
section
name
=
"roleService"
type
=
"System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission
=
"false"
allowDefinition
=
"MachineToApplication"
/>
</
sectionGroup
>
</
sectionGroup
>
</
sectionGroup
>
</
configSections
>
<
connectionStrings
>
// Connection strings.
</
connectionStrings
>
<
appSettings
>
<
add
key
=
"Telerik.Skin"
value
=
"Office2007"
/>
<
add
key
=
"Telerik.ScriptManager.TelerikCdn"
value
=
"Disabled"
/>
<
add
key
=
"Telerik.StyleSheetManager.TelerikCdn"
value
=
"Disabled"
/>
</
appSettings
>
<
system.web
>
<
authentication
mode
=
"Windows"
/>
<
identity
impersonate
=
"true"
/>
<
anonymousIdentification
enabled
=
"false"
/>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
<
compilation
debug
=
"true"
>
<
assemblies
>
<
add
assembly
=
"System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
/>
<
add
assembly
=
"System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
assembly
=
"System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
/>
<
add
assembly
=
"System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
/>
</
assemblies
>
</
compilation
>
<
pages
>
<
controls
>
<
add
tagPrefix
=
"telerik"
namespace
=
"Telerik.Web.UI"
assembly
=
"Telerik.Web.UI"
/>
<
add
tagPrefix
=
"asp"
namespace
=
"System.Web.UI"
assembly
=
"System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
tagPrefix
=
"asp"
namespace
=
"System.Web.UI.WebControls"
assembly
=
"System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
</
controls
>
</
pages
>
<
httpHandlers
>
<
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"
/>
<
remove
verb
=
"*"
path
=
"*.asmx"
/>
<
add
verb
=
"*"
path
=
"*.asmx"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
verb
=
"*"
path
=
"*_AppService.axd"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
validate
=
"false"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
</
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=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
</
httpModules
>
<
customErrors
mode
=
"Off"
/>
</
system.web
>
<
location
path
=
"Telerik.Web.UI.WebResource.axd"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
<
system.webServer
>
<
validation
validateIntegratedModeConfiguration
=
"false"
/>
<
modules
runAllManagedModulesForAllRequests
=
"true"
>
<
remove
name
=
"ScriptModule"
/>
<
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
=
"managedHandler"
type
=
"System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
</
modules
>
<
handlers
>
<
remove
name
=
"WebServiceHandlerFactory-Integrated"
/>
<
remove
name
=
"ScriptHandlerFactory"
/>
<
remove
name
=
"ScriptHandlerFactoryAppServices"
/>
<
remove
name
=
"ScriptResource"
/>
<
remove
name
=
"ChartImage_axd"
/>
<
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
=
"Telerik.Web.UI.WebResource"
path
=
"Telerik.Web.UI.WebResource.axd"
verb
=
"*"
type
=
"Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=3.5.0.0, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/>
<
add
name
=
"ScriptHandlerFactory"
verb
=
"*"
path
=
"*.asmx"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
name
=
"ScriptHandlerFactoryAppServices"
verb
=
"*"
path
=
"*_AppService.axd"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
name
=
"ScriptResource"
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
preCondition
=
"integratedMode"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
</
handlers
>
</
system.webServer
>
<
system.codedom
>
<
compilers
>
<
compiler
language
=
"c#;cs;csharp"
extension
=
".cs"
type
=
"Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
warningLevel
=
"4"
>
<
providerOption
name
=
"CompilerVersion"
value
=
"v3.5"
/>
<
providerOption
name
=
"WarnAsError"
value
=
"false"
/>
</
compiler
>
</
compilers
>
</
system.codedom
>
<
runtime
>
<
assemblyBinding
appliesTo
=
"v2.0.50727"
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Web.Extensions"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-1.1.0.0"
newVersion
=
"3.5.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Web.Extensions.Design"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-1.1.0.0"
newVersion
=
"3.5.0.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
</
configuration
>

We have performed lots of tests with the same project on different servers but unfortunately could not replicate the same error. It looks like a specific issue that may be caused by some setting of the specific server. Is it possible for you to test if you observe the same error on different server?
Plamen
Telerik


I did run across this however: http://msdn.microsoft.com/en-us/library/ms998355.aspx
I use Windows authentication and the web application is running on ASP 2.0 on a Windows Server 2003 server. Would the problem that that link highlights have anything to do with it?
We have inspected the article that you shared but there is no a know issue in RadScheduler that is similar to the one in it. In case when Authentication is used there should be no problem when the appropriate setting that we have already shared in this thread are set properly in the configuration file.
Plamen
Telerik

We have tested the issue described but could unfortunately could not observe the unusual behavior. I have logged it for further investigation by our developers.
Plamen
Telerik

Was a resolution ever found for this? We are experiencing the same problem. It runs locally but if you try remotely it does not. We are running on Windows Server 2012 R2 with Windows authentication and impersonation.
What folder permissions and permission types are required by your control to successfully export to PDF?

Unfortunately we were still not able to replicate the issue at our side. Yet the issue is logger for deeper investigation. If you are able to replicate the issue with the SchedulerPDF.zip project attached in this thread locally please let us know what are the exact settings to observe it locally.
Regards,
Plamen
Telerik


After a couple painstaking weeks. It turned out to be a permission problem caused by network routing. We finally figured out that the export process was sending a request to itself during the export process. It was not staying within our intranet when it did. This was preventing the process from impersonating the user during the export. It would work with the fully qualified server name, but it would not work with the DNS for our intranet server. We had to update an internal a name record that allowed the server accept requests internally on our intranet. This retained the impersonation that was needed to authorize the user to resources on the server. It now works for us.
Your issue may be different from ours, and I don't know if this will help but hopefully it will put you on to a possible solution that you may have been overlooking.
Regards,
Chris
