Thursday, February 22, 2007

InfoPath error: The server is running InfoPath Forms Services, but the compatibility settings for this form template is InfoPath only

Issue:
While publishing an InfoPath form, you wil get an error "The server is running InfoPath Forms Services, but the compatibility settings for this form template is InfoPath only".

Reason:
This issue is due to the reason that InfoPath form was not configured that it can be opened on browsers also. You need to go to the form template and modify the settings to open the infopath form in a browser or InfoPath applicatoin. If you do not configure the below settings in the fix, forms will be always opened in the InfoPath application on the client. If the user do not have InfoPath installed on his machine, he will get the error. If you have a requirement that the form needs to be open in the InfoPath only, then just ignore this fix.


Fix:
Go to the form template(.XSN) and do the following:

1. Tools -> Form Options
2. Select "Compatibility" from the categories on the left hand quick launch
3. Check the option "Design a form template that can be opened in a browser or InfoPath".
4. click OK

Thursday, February 15, 2007

An error has occurred while accessing the SQL Server database or the Office SharePoint Server Search service

Problem:


  1. While accessing the User Profiles and Properties page in a SSP, you get the error: "An error has occurred while accessing the SQL Server database or the Office SharePoint Server Search service. If this is the first time you have seen this message, try again later. If this problem persists, contact your administrator."
  2. While accessing the "Search Settings page" in a ssp, you get the error :
    "Insufficient memory to continue the execution of the program"

Fix:


  1. Try to access the search properties page in SSP.
    If you get "An indexer is not assigned to the Shared Services Provider" error, then do the following:
    Application Tab -> Create or Manage this farm’s shared services -> SSP context menu -> Edit Properties -> Assign the proper index server.
    If you have an Index server already assigned, then go to step 2.
  2. Restart the search service on the Index server and all the WFEs.
    Start -> Run
    net stop osearch
    net start osearch
  3. If you are still in the woods, check whether the Search crawler account has enough permissions access on the DB.
    -Step1: Central Administration > Operations > Services on Server > Office SharePoint Server Search Service Setting -> Note down the Farm Search Service Account
    - Step2: Go to Central Administration > Shared Services > Personalization services permissions -> add the account that you noted in the first step with Manage Uer Profiles and manage Permissions.
  4. If you get this issue after you just restored the farm, then open the config db table in the SQL server and look for the record that contains the id "1AAB936C-E65C-4829-9683-5CCF5BAB90B0" that points to the search service. If you do not get to see this record then insert a record with the same id and name.

Cannot connect to the configuration database Sharepoint page and central administration

Problem Definition:


Sharepoint page throws 'Cannot connect to the configuration database'
Error :


Reason:




backend database is down or authentication failed.




Fix:




To fix this problem, you need to know the database server's name. If you know the server's name, you can skip the below and follow the step 1.




Database server name will be specified on the Sharepoint central administration's home page. But, if this error occurs, SCA will be also down. So the only way you will come to know is through logs. Default location of the logs is 'C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Logs'




In the logs, you will see some thing like this:




Critical Cannot connect to SQL Server. 'Your DB server name' not found. Additional error information from SQL Server is included below. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. OWSTIMER.EXE (0x09C4) 0x127C Windows SharePoint Services Database




System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)




Once you got the server name, follow the below steps:




  1. Check whether the database server is down. If it is down, start the server.


  2. Check whether Database server's MSSQLSERVER service is stopped. If stopped, start the service
    Start -> Programs -> admin tools -> Services -> MSSQLSERVER -> Right click -> Start
    (Note: Some servers will have MS$SHAREPOINTSERVER)


  3. Check whether the MSSQLSERVER service id/pwd is same as the sharepoint Application pool identity or not.

    steps to know the MSSQLSERVER identity:
    Start -> Programs -> admin tools -> Services -> MSSQLSERVER -> Double click -> Logon

    steps to know the Application Pool identity:
    Start -> Programs -> admin tools -> IIS ->right click on the specific application pool that your application is running on -> Properties -> Identity

    If these two Id/pwds are not same, then make it same.
    Also check whether the password is expired/changed.












Wednesday, February 14, 2007

Cannot Retrieve Properties at this Time and Cannot save your changes in sharepoint

Problem Definition:

While editing the content editor webpart, you get the javascript error 'Cannot Retrieve Properties at this Time'. Some times it allows you to go to the rich text editor or source editor, upon saving the content, it throws, 'Cannot save your changes in sharepoint'

Reason:

Some times, you try to copy the text from Word pad to Sharepoint content editor webpart. In this process, you try to copy some format that is not understandable to sharepoint's CEWP. Though it saves the text some times, some times throw the error. At this time application pool is currupted with the invalid formats. So, if you come to the same CEWP, server throws the error 'Retrieve Properties at this Time'.

Fix:

look at the log and decide which one suits

  1. Recycle the application pool.
    go to IIS -> web sites -> right click on the application pool -> recycle.
  2. I heard it some where, not sure.. u can try..
    web.config -> go to http modules tag and delete the 'Clear' tag.

  3. look at the ISA settings.

Wednesday, February 7, 2007

unable to update the information in the microsoft office document shared documents

Sitiuation:

While selecting 'Edit Properties' from a document's context menu or adding a document to the lib, this error occurs.

Reason:

There are so many reasons, main reason is sharepoint is not capable of changning the metadata of a file due to the metadata is being locked down!

Microsoft documents' metadata gets locked due to any one of the following reasons:

  1. Document is placed to a sharepoint library from another LOB application automatically.
  2. Document is checked out to some other user.
  3. Document is checked in using a different version (eg.DOCX), thus causing an invalid property promotion/demotion.


Fix:

  1. First of all avoid uploading more than 5 MB size doc in the lib.
  2. Down load the document from the doc library to the local desktop location.
  3. Rename/Change the desired metadata that you wanted to edit.
    File -> Properties -> Custom Properties -> choose any property like client and
    type any value -> Add -> Close the dialog -> Save the document.
  4. Upload the changed document back to the doc library.
  5. If you still face the problem, then check whether MSXML 6.0 is un-installed.
    If its un installed, re-install !


Thursday, February 1, 2007

Contact Selector in InfoPath 2007

Procudure to create a Contact selector in InfoPath 2007.


  1. Open an infopath form in the design mode.

  2. Design Tasks -> Controls -> Add or Remove Custom Controls(locate this link at the bottom of the pane) -> Add -> ActiveX Controls -> Next -> Contacts Selector.-> next -> Don't include a .cab file -> Next -> Value -> Next -> From the Field or group type box choose Field or group (any data type)(*This is very important*)
    Click Finish
    Now the content selector control will be diplayed in the controls section.

  3. Now you need to create a schema that will host the Contact selector that we created in the above section.

    Design Tasks -> Data Source -> Select the 'myFields' and click on the Add a Field or Group(located at the bottom of the pane, under 'Actions'):
    Name : whatever you want (In my case, I named it as 'Grp_Contact_Selector')
    Type : Group
    OK. ( Do not check the 'Repeating' check box).

  4. Design Tasks -> Data Source -> Select the group name that you just created -> click on Add a Field or Group-> add a repeating 'Group' and name it 'Person'
    Name : Person
    Type: Group
    Check the 'Repeating' check box.
    OK.

  5. Select the 'Person' Group field and click on the Add a field or group, add 3 repeating fields under the 'Person' Group named 'DisplayName' , 'AccountId' and 'AccountType'.

    A. Creating the 'DisplayName' repeating field

    Select the 'Person' group, click on 'Add a field or group'
    Name: DisplayName
    Type: Field (element)
    Data Type : Text (string)
    Check the 'Repeating' check box.
    OK.

    B.
    Creating the 'AccountId' repeating field
    Select the 'Person' group, click on 'Add a field or group'
    Name: DisplayName
    Type: Field (element) Data
    Type : Text (string)
    Check the 'Repeating' check box.
    OK.

  6. C. Creating the 'AccountType' repeating field
    Select the 'Person' group, click on 'Add a field or group'
    Name: Account Type
    Type: Field (element)
    Data Type : Text (string)
    Check the 'Repeating' check box.
    OK.

    Once you are done with all the fields, your data source should look like the below image:




  7. Open Notepad and type the following text within the 'Context' node:


    <Context siteUrl="http://yourservername" />





  8. Name the xml file as 'Context.xml'.


  9. Tools -> Data Connections -> add -> recieve data -> select the "XML Document" -> Next -> Click on the 'Resource Files' -> browse to the XML file that you just created and add to the data conections. Name the connection as 'Context'.
    Note: Name of the XML node in the file, Name of the data connection and name of the .XML file should be 'Context' (case sensitive).


  10. You are done! Now drag and drop the newly created Contact selector group onto the form. In my case, its 'Grp_Contact_Selector'.
    While dropping on the form, a popup will get displayed with various fields. Select the 'Contact Selector'.
    If you can't see the contact selector in the popup double check the above steps, especially the step 2.


  11. If you wanna see the selected contact selector in the infopath form library, then add this contact selector to the promoted fields(File-> publish -> site URL -> Infopath form lib name -> select 'Display Name' out of the above structure and function as 'First'. )


  12. Some times Contact Selector will grey out in the preview mode but you will be able to edit it in the actual 'New' Form.

Multiple Contact Selectors in Infopath 2007:
If you wanna have two or more contact selectors on a signle form, follow the below Procedure:





  1. Create the actual format of the Contact Selector Groups schema(Grp_Contact_Selector) directly under the myFields. We are done creating the 'Grp_Contact_Selector' group in the ablove section. So, I am not repeating the procudure here.

  2. Our goal is to create two more groups as the same hierarchy showed in the above picture, besides the original master contact selector group(Grp_Contact_Selector).
    To create the above hieracrchy shown in the figure follow the below procedure.

  3. Create two non repeat groups directly under the 'myFields'. Name it whatever you like. In my example, I named 'Grp_Proj_Manager' and 'Grp_Requester'.

  4. richt click on the master schema group 'Grp_Contact_Selector' group -> 'Reference' -> Browse and select the first folder i.e 'Grp_Proj_Manager'.
    (Now all the original master contact selector nodes hierarchy is copied under the 'Grp_Proj_Manager' group).

  5. richt click on the 'Grp_Contact_Selector' group -> click on 'Reference' -> Browse to the second folder i.e 'Grp_Requester'. (Now all the original contact selector nodes hierarchy is copied under the 'Grp_Requester' group).

  6. Now that you have two contact selector schemas under two different groups.
    All you need to do is to drag and drop the first group's referenced contact selector template (in my case its 'Grp_Contact_Selector') on to the designer.
    Important: Do not drag and drop the actual group 'Grp_Proj_Manager' or 'Grp_Requester' drag the referenced template instead. If you drag the actual group, there will not be any error but while filling out the form, after you select the user from the AD, contact selector field will be grayed out.

  7. Drag and drop the second group ('Grp_Requester') on to the designer.

  8. Now you have two different contact selectors that holds two names.

  9. In my example I explained 2 contact selectors. But, you can have 'n' number of contact selectors. Have fun!