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

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

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?

  • 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, 2010 at 18:23

1 Answer 1


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.

  • @Jason: Thanks for coming back with the answer and welcome to SharePoint Overflow!
    – Alex Angas
    Mar 1, 2010 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.