Friday, July 29, 2011

User profile synchronization service starting issues

There can be many problems which can cause to this issue, I will explain few which i found and how i address.

user profile synchronization service stuck on starting

here though i delete and recreate the user profile service application the synchronization still stuck in the middle.

let briefly see how user profile working ..

clip_image002

User Profile Service Application and User profile Synchronization share same Sync BD and Profile DB. But User profile synchronization service  access AD through Forefront Identity Manager Synchronization service.

Workouts

First Check Forefront Identity Manager is Working (miisclient.exe).  If this is starting most of the time their are no issues in Forefront Identity manager service and Sync Service. If so we have to check the databases for permission. 

C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe

image

If this not working (Most of the time this is the issue).

we need to check following windows services. (Services.msc)

image

if miisclient.exe is not working either above service may not work. so try to start the service. if it is a login problem it will say that can not strat due to login problem.

then go to Properties

image 

and check logOn username,password  and Account.

image

After correcting this try to restart the  profile service and synchronization in the SharePoint after restarting the IIS.

image

Thursday, July 7, 2011

How to get Username , UserID in CAML Query

If you are want to get the userID you can simple use following code.

<Where>
   <Eq>
      <FieldRef Name='userfieldname' />
      <Value Type='Integer'>
           <UserID Type='Integer' />
      </Value>
   </Eq>
</Where>

in here you should declare the UserID variable before it uses. normally If you make a user filter in the SharePoint designer it will automatically create the parameter in parameter binding section in the web part.

<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>

But assume you want to filter using a user name and the field is not a persongroup feild and it is just a text field. then you can use following query to archive it.

<Where>
   <Eq>
      <FieldRef Name='userfieldname' />
      <Value Type=’Text’>
           <UserID Type=’Text’/>
      </Value>
   </Eq>
</Where>

Tuesday, July 5, 2011

Cannot connect to the LobSystem (External System). Timeout expired. the timeout period elapsed prior to completion of the operation or the system is not responding.

 

image

This error might come for different scenarios. In my case this error occurred when i going to connect to the SQL server using  BCS (Business connectivity services in SharePoint). though i provide correct user name and password the error is coming.

when i look in to the problem i found that SharePoint SQL database server is running on different port to protect unauthorized access.

But then how we going to connect ?

It is pretty simple but i wasted whole 3/4 hours to figure out that. normally we are giving port like Servername:port but unfortunately this is not working but if we give ‘comma’ rather than semicolon it is working fine.

servername,port

  image

Monday, July 4, 2011

InfoPath adjust connection do not work properly.

Normally in the we are developing InfoPath in a test server and published it in to the production server. when we are going to publish in to the different server InfoPath asked to change the connection files accordingly.  But sometimes when we are changing the publish location it is giving wrong URL’s for the connections.

thus you can manually change the connection URL properties in the InfoPath manifest files. but please be careful of what you are doing.

Howe to Change InfoPath Manifest manually  

  • Export Info path as source files.

image

  • change the manifest and save it.
    • Tips: InfoPath data connections are stored in the section <xsf:dataObjects>
    • You can change the urls by using site collection, baseurl  , relaliveurl attributes.
  • Open manifest as design.
  • save it again as xsn.