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

Excel Export re-prompt for credentials

12 Answers 186 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Scott Hannon
Top achievements
Rank 1
Scott Hannon asked on 16 Aug 2011, 02:35 PM
My apologies if this has already been asked and answered. I searched, but did not find specific results relating to this problem.

RadGrid hooked up to a SQLDataSource. This is part of a utilitarian admin interface. The data is simple zip code information. It is an SSL protected website with BASIC windows authentication on IIS6. When I click on Export to Excel(or Word, etc..) the username/password credentials prompt comes back up. If the user re-enters their information, the download completes successfully. I don't want the prompt to re-appear.
My thought was that it may have something to do with where the RadGrid stores its temporary file on the server before export, or is it streamed in memory?

Any help is appreciated.

12 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 19 Aug 2011, 02:15 PM
Hello Scott,

The only file format we store temporary files for, is PDF. The contents for the rest of the export formats are generated in memory.

If you submit a support ticket with reference to this thread I will send you a special test project that will help you identify the issue.

Best regards,
Daniel
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Steele
Top achievements
Rank 1
answered on 30 Aug 2011, 08:07 AM
I am having this issue too.
In my VS2010 environment, when I Export to Excel from a radgrid, I am prompted for credentials to localhost (see attached screenshot).
I am using IE9.
Any word as to why?
I am using telerik version
2011.2.712.40

Thanks,
Steele.

-- Edit
The strange thing is, if I just cancel out from the prompt without entering any username/password info, the file is opened anyway. Weird.
0
Scott Hannon
Top achievements
Rank 1
answered on 30 Aug 2011, 03:31 PM
Does it also prompt when selecting "Save" first, then opening the saved file? Mine doesn't prompt in this case.
0
Steele
Top achievements
Rank 1
answered on 01 Sep 2011, 12:23 AM
That is the same for me.
The prompt appears when the user selects OPEN.
No prompt appears when saving the file.
Any word as to why this is happening?
Thanks,
Steele.
0
Bruno
Top achievements
Rank 2
answered on 01 Sep 2011, 08:45 AM
Might be that trying to open the excel document within the browser (meaning that the excel itself is shown inline) causes ie to reprompt for credentials.
See if setting the openinnewwindow=true addresses this.
0
Daniel
Telerik team
answered on 01 Sep 2011, 12:19 PM
Hello Steele,

Did you have a chance to debug my code locally? If so, what happened?
Also, the suggestion posted by Bruno is worth trying.

Best regards,
Daniel
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Steele
Top achievements
Rank 1
answered on 04 Sep 2011, 11:43 AM
Hi Daniel, Which code are you referring to? Apologies if it on this thread as I am viewing on mobile currently. Thanks, Steele .
0
Daniel
Telerik team
answered on 06 Sep 2011, 09:20 AM
Hello Steele,

I gave this sample project to Scott (the op), sorry for the confusion. Please feel free however, to submit a support ticket and I will send the same code to you if you need to test it at your side.
I guess the problem is (as mentioned by Scott and Bruno) that the browser (IE) tries to open the file within the same window (inline mode).

Best regards,
Daniel
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Steele
Top achievements
Rank 1
answered on 07 Sep 2011, 12:32 AM
Hi,
I am creating my RadGrid programmatically, and I am having trouble identifying where to set the property openinnewwindow.
I am using :

rg.MasterTableView.CommandItemSettings.ShowExportToExcelButton = true;
to allow the export.
Where can I find the openinnewwindow?
Thanks,
Steele.

 

 

0
Scott Hannon
Top achievements
Rank 1
answered on 07 Sep 2011, 01:38 PM
Setting the OpenInNewWindow=true solved my problem. Also, doing Save As, then opening worked as well.
This is only being used in a backend admin interface currently. I was unable to test the sample code locally as it did not precisely mimic my production environment.
Is the failure to open inline a browser or an authentication problem? OR, why does this happen?
Thanks for the help.
Scott
0
Daniel
Telerik team
answered on 07 Sep 2011, 09:59 PM
Hi guys,

It is not failure to use the inline (OpenInNewWIndow=false) mode but there is no real benefit from this setting, because the functionality that allows the excel file to be embedded in the browser is disabled by default.
In fact, it would be better to use the attachment mode due to the fact that it works consistently in all browsers. For instance, Internet Explorer ignores the file name when the content-disposition header is set to inline.

Sample code showing how to set OpenInNewWindow property:
RadGrid1.ExportSettings.OpenInNewWindow = true;

      ...
    <ExportSettings OpenInNewWindow="true" />
</telerik:RadGrid>

Regards,
Daniel
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Steele
Top achievements
Rank 1
answered on 09 Sep 2011, 01:31 AM
Thanks Daniel,
Yes, setting this property removed the credential prompting.  It is now working as expected.
Appreciate the help and code!
Steele.
Tags
Grid
Asked by
Scott Hannon
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Steele
Top achievements
Rank 1
Scott Hannon
Top achievements
Rank 1
Bruno
Top achievements
Rank 2
Share this question
or