Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom content type defined, with a document template, similar to below:

<ContentType 
    ID="0x010100120A74C7DFDA4C6fA8C3E519B41F421E" 
    Name="My Excel Library" 
    Group="My Content Types"
    Description="">
    <FieldRefs>
        <FieldRef ID="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" Name="Description" Required="FALSE" />
     </FieldRefs>
    <DocumentTemplate TargetName="MyTemplate.XLSX" />
</ContentType>
<Module Name="My Template" SetupPath="Features\MyContentTypes" Url="_cts/My Template">
    <File Url="MyTemplate.XLSX"/>
</Module>

Now if I provision a library with this content type added to it, and click 'New' on the list view menu, I see my content type. If I then click on my content type, my document template gets opened successfully, but ONLY when using Windows authentication.

With forms based authentication, I get the standard IE login prompt (domain\username and password). Since I'm a forms user, my credentials won't work here. If I click 'Cancel', it still opens Excel (since my document template is an .xlsx file), but instead of my document template, Excel tries to render my custom login.aspx page for forms authentication (not very pretty).

Any thoughts? Can I not use a custom document template with forms authentication?

share|improve this question
    
Alright, I just noticed that if I enable anonymous access for my forms zone in SharePoint, then I get prompted with my custom login.aspx page in a popup window. If I enter my FBA credentials, the document template does open correctly, but the popup window remains open and redirects to the default.aspx page for my site collection. Anybody know how to make the popup window automatically go away after authenticating? –  Anonymous Mar 1 '10 at 18:23
add comment

1 Answer

I think I've figured this out on my own. Please feel free to chime in if you have any concerns or comments about this approach. First of all, the following article was instrumental in find the solution: http://msdn.microsoft.com/en-us/library/bb977430.aspx#MOSSFBAPart3_IntegratingWithOffice2007.

I found that if I click on the "Remember me next time" check box on my forms login page, to force my membership provider to issue a persistent authentication cookie, then the document template opens with no problem (even without enabling anonymous access for the zone). There are some caveats to using persisted cookies (as detailed in the article), but this seems like the best approach to me at the moment.

Hopefully, somebody else will find this thread to be helpful in the future.

share|improve this answer
    
@Jason: Thanks for coming back with the answer and welcome to SharePoint Overflow! –  Alex Angas Mar 1 '10 at 22:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.