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 am trying to deploy an Administrator Approved InfoPath form template to SharePoint 2010 as a feature. I've done this lots of times in 2007 and never had an issue - but this will not play ball.

I created a new feature SPI in VS2010 and manually edited the xml to the following:

   <Feature xmlns="http://schemas.microsoft.com/sharepoint/" 
                 Title="My Feature"
                 Id="0e716460-b201-4188-ab31-f78035bd7922" 
                 ReceiverAssembly="Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.InfoPath.Server.Administration.XsnFeatureReceiver" 
                 Scope="Site">
        <ElementManifests>
        <ElementManifest Location="UserRequestForm\Elements.xml" />
        <ElementFile Location="UserRequestForm\UserRequest.xsn" />
        </ElementManifests>
        </Feature>

The elements xml is as follows:

    <?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="XSN" Url="FormServerTemplates" RootWebOnly="TRUE">
<File Path="UserRequestForm\UserRequest.xsn" Name="UserRequest.xsn" Url="UserRequest.xsn" Type="GhostableInLibrary" />
</Module>
</Elements>

The solution deploys successfully and the feature gets activated however the form template is not visible in the 'Manage Form Templates' area of central admin. I can't find any errors in the ULS logs or event logs - it seems to show that the XSNFeatureReceiver has been run with no problems.

The form does appear in the FormServerTemplates library correctly.

Things I have tried to so far:

-Running design checker in InfoPath and verifying that there are no errors or warnings

-Creating a new feature and verifying all feature XML is correct

-Creating my own FeatureReceiver class that inherits from XSNFeatureReceiver to try and debug (I am not able to step in to the XSNFeatureReceiver code)

For your information the form in question is extremely simply - it has a connection to a SQL database using SQL auth and a submit connection - it has no controls on the form. I have given the form Full Trust.

Hope someone can help with the issue as its been driving me crazy for ages!

Cheers

share|improve this question

2 Answers 2

Have you tried simply uploading the form manually in Central Admin to see if that works. This should verify stuff like permissions and the validity of the form.

Something to bring up in the pub with the assorted gurus tomorrow night ;-)....

share|improve this answer
    
Hi Daniel, Thanks for the reply. Yes I have uploaded the form manually and that works fine - creates feature and content type for the form as you would expect. Its a very strange issue - im going to try and create a new VS solution now. Sadly can't make SUGUK tonight but have a great time! Cheers Alex –  Anonymous Feb 3 '11 at 9:44

I ran into something similar. The problem is that the InfoPath Form Template is under the element's sub-folder. You need to put the .xsn file in the same folder as Feature.xml. I could not find a way to do this using the SharePoint Project template in Visual Studio 2010. So I used a WSPBuilder project instead.

share|improve this answer
    
You can deploy to the root folder using the Sharepoint project templates in Visual Studio 2010 - take a look at my post on it here - henry-chong.com/2010/12/… –  Blakomen Nov 22 '11 at 23:22

Your Answer

 
discard

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