Thursday, December 24, 2009

Not able to connect Dell BH200 headset from vista

I was trying to connect my Dell BH200 headset from my Dell Inspiron1525 installed with vista OS. I was facing several problems and had to spend bit time to troubleshoot and make it work.

  1. In case if you are facing similar problems this steps may help you and save your time.
    When i tried to connect the Bluetooth Stereo Audio from Bluetooth settings--> Audio tab, It tried connecting but disconnected again immediately.
    I fixed this by enabling this device in checking the Controlpanel-->Audio settings-->Headset properties and set that as defaut. [The device gets disabled sometime if it is switched-off while connected with the system].
  2. Another point to be takencare is when we try to add this headset using "Add new bluetooth device option" the device should be in the pairing mode. In Dell BH200 we need to keep pressing the power button till the Blue LED flashes quickly. Because during the first press it will be in power-on mode(Blue LED solid On) and not in pairing mode.

Sunday, December 13, 2009

Windows advance search missing

Unlike the WindowsXP era we do not have the straightforward option to get the advancesearch option in vista and windowsserver2008.

Here is a small shortcut to get the advancesearch option.

  1. Click on the start menu
  2. Type something in the search box and click search.
  3. We can see a link called "Search Everywhere". Click on the link.
  4. We will get an explorer window with AdvanceSearch options enabled.

Other option is we need to wait till the search is over. But generally it will take time and it will be bit frustating to wait for it.

Friday, August 28, 2009

InfoPath form .udcx data connections not working

We are using lot of InfoPath data connection .udcx files for populating the drop down boxes used in the InfoPath forms. During one of the deployment we found that the changes made in the connection string was not getting updated and the InfoPath forms were keep throwing the errors.

While trouble shooting the issue we found that the Approval status of the Data connection files were showing the pending status. We made the files approve and the InfoPath forms were able to take the latest changes from the .Udcx files.(Publishing features were activated in our site)

We found that there is a way to make the .Udcx connections working even with the "Pending" status. We should modify the logged in user's permission level to have the "Approve" access in the Site Settings-->Advanced Permission --> Settings -->Permission Levels-->[permission level name (for eg contribute)




Monday, July 27, 2009

Edit in Datasheet view is not working

As part of one of our deployment we had to modify lot of data in a SharePoint list, which was used by the InfoPath forms for populating the dropdowns. To make the deployment steps short we gave the steps to use the Edit in Datasheet view option. But when the deployment team was executing the steps, they were not able to use the Edit in Datasheet view and they were getting some activeX related issues.

We were troubleshooting this issue and found that this problem is mostly related to a office component which corrupts because of some reason. We followed the steps mentioned below and it resolved the error.

1.Go go to this directory:C:\Program Files\Microsoft Office\Office12
2.Then delete OWSSUPP.DLL after taking a backup
3.Then run Microsoft Office Diagnostics (Start-Programs-Microsoft Office-Microsoft Office Tools - Microsoft Office Diagnostics).It will verify your installation and recreate the OWSSUPP.DLL file.

Friday, June 26, 2009

w700i flight mode settings

I was trying to use my mobile phone Sony ericsson w700i in flight mode and it took a while to find out the settings. By default these settings will be turned off. So we can't use the phone in case the SIM card is not there or if we would like to use it in the areas where the mobile phone transmitters must be turned off. Check out the following simple settings

Menu-->Settings-->General tab-->Start-up menu

Sunday, April 26, 2009

Run Virtual PC at maximum speed

I was executing my deployment scripts in one of the Test virtual machine. The deployments scripts includes uploading form templates,site template,Installing and activating the features and creating the site collection. This was taking lot of time to execute. So the issue was whenever i change my focus to the host operating system the VPC was not executing at its full speed, because of this the deployment scripts were getting time-out errors. So i had to stay focused in the virutal machine to execute all the deployment scripts it will run more than 2 hours.

I was trying various settings of VPC to get rid of this problem and found the following settings to correct this problem .

From the the virtual PC Console window click on the File-->Options. Select Performance from the left menu and choose the "Run Virtual PC at maximum speed". This resolved my problem.


However, the host machine will be bit slow after applying this settings. It was not a big difference to me and it was manageable.

Save site as template link is missing

I was trying to create the site template from a site where the "Office SharePoint Server Publishing" feature was activated for some reason. But the issue here is after activating the "Office SharePoint Server Publishing" feature the "Save site as template" link from the "Look and Feel" section of site settings is missing.

I understand that its disabled because the functionalities part of "Office SharePoint server Publishing" can't be included in the site template(.stp) file. But i have applied lot of customization which are not related to publishing feature, I will be requiring those changes in a template file.

So if we have the core template we can apply the publishing related changes on top of the site created with the core template.For that we need the core template...we can still get the template by calling the "_layouts/savetmpl.aspx" page from the address bar. We should also make sure we will be applying the publishing related changes on top of it.

The template you have chosen is invalid or cannot be found

I was trying to create a site collection in my Virtual machine using a site template taken in a test server. But i was keep getting the weired error "The template you have chosen is invalid or cannot be found". I checked the publishing features of the source site and confirmed those are turned off while taking the template. I was able to understand some features available in the test server might be missing in my virtual machine.

There were lot of features installed in the test server. It was bit difficult to trace the missing feature. Other issues was, using the Site Collection features list I couldn't trace the features which will be installed as part of SharePoint infrastructure updates. However to track the missing features the following tool[STPInspector] http://www.codeplex.com/STPInspector developed by Madhur ahuja was very helpful. It showed the features missing in the source machine. The best part was, i was able to identify the search related features which will be installed as part of the SharePoint Infrastructure updates.

I installed the following Infrastructure updates after the service pack installation.

It resolved my problem and I was able to create the site collection using the template.

Tuesday, March 31, 2009

Access is denied. Check that the Default Content Access Account has access to this content, or add a crawl rule to crawl this content

I was trying to crawl the "Local Office SharePoint Server sites" content source to make my site data appear in the search result. I already configured the starting url (web application url) of my site in the "Start Addresses" section of the "Local Office SharePoint Server sites" content source properties.

But i was getting the following error message from the crawl log. Only the site i was working is not crawled and the other sites got crawled successfully.

http://mysharepointserver:7708 Access is denied. Check that the Default Content Access Account has access to this content, or add a crawl rule to crawl this content. (The item was deleted because it was either not found or the crawler was denied access to it.)

I understood the error was something related to the security configuration and found that my site was using the "Basic authentication" and the rest of the sites were using "Integrated windows authentication". By default the crawler can't access the sites using "Basic authentication" security mode. The following workarounds can be done to get rid of this issue.

Approach 1:

  1. Extend the problematic web application under a different name and use "Integrated windows authentication" for that newly created extended web application.
  2. Remove the URL of the problematic web application from the "Local Office SharePoint Server sites" properties and add the newly created extended web application.

Approach 2:

  1. Check the "Default content access account" in the Crawl settings page.
  2. Add the same account in the site which needs to be crawled.

"Quick Launch" link is missing in the "Look and Feel" section of SharePoint site settings

As per one of my customization task i was adding various links in the Left Navigation of my site by using the "Quick Launch" option under the "Look and Feel" section of the site settings.

The issue was, suddenly the "Quick Launch" link was missing from the site settings page. I tried various options and couldn't find the exact reason for the problem. I completed my work by accessing the following URL as a workaround.
http://mysharepointserver:6666/sites/myplayground/_layouts/quiklnch.aspx

I was investigating about this problem and found the following points as root cause of the above issue.
  1. "Quick Launch" link will be replaced by the "Navigation" link if we activate the "Office SharePoint Server Publishing Infrastructure" feature. (This was activated by another user simultaneously accessed my site. That caused the confusion)
  2. We can still do all the functionalities provided by "Quick Launch" using the "Navigation" option with added features like audience and ordering of the links.

LoadBalancer.RegisterLauncher failed: Unable to connect to the remote server

I was trying to enable the Internet in my Virtual machine. While trying various steps i found the local sharepoint site and the central admin were not accessable. I was keep getting the following error in the Event log.

"LoadBalancer.RegisterLauncher failed: Unable to connect to the remote server"

Since i was trying many settings changes and many approaches to enable the internet i couldn't remember which settings or the approach was causing the problem.
However, I was able to get my sites back online by doing the following workaround. Still trying to find the rootcause of the problem, most probablly it might be related to the various IP address settings changes i tried. The following workaround resolved the problem.
  1. Start-->Run and type the "drivers"
  2. Open the "etc" folder
  3. Open the "hosts" file in Notepad.
  4. Enter the IP and domain name mapping

Extracting email address from the "Assigned To" (people picker) column

I was creating a Job to send email alerts to the people whose assigned tasks are overdue. Tasks are getting created in a TaskList library by a workflow.

The job should check the DueDate column value and if it is overdue then it should send a email to the person specified in the "Assigned To" column.

The issue here is the Assigned To column value was something like "TestDomain\TestUser". I couldn't send mail using that and I required the exact email address of the "TestUser" like "Testuser@abccompany.com". I tried various approaches and the following one worked perfectly well for my scenario. [The "TestDomain" users should be imported in the SharePoint User Profiles]

try
{
SPSite site = new SPSite("
http://mysharepointsite:6666/sites/site1");
SPWeb web = site.OpenWeb();
SPList list = web.Lists["Tasks"];
SPListItem item = list.Items[0];
string userName = list.Items[0]["Assigned To"].ToString();
SPFieldUser field = (SPFieldUser)item.Fields["Assigned To"];
SPFieldUserValue fieldValue = (SPFieldUserValue)field.GetFieldValue(userName);
MessageBox.Show(fieldValue.User.Email);
}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}

Tuesday, March 24, 2009

InfoPath form publishing Error: "The following URL is not valid "http://...."

Whenever we we try to publish the InfoPath forms using the File-->Publish option to a SharePoint server list we used to get the following error.

"The following URL is not valid "http://exampleurl/sites/sitecollection1"

We were able to resolve this issue by using either of the following approaches

Approach1:

  1. Creating a root site for the web application. (Don't know how this is fixing the issue. But its working :))

Approach2:

  1. Publish the template to a network location
  2. Upload the published template to the central admin.
  3. Activate the template as a content type feature in the site collection.
  4. Add the site content type into the form library.
  5. User the form using new-->form name(content type name)

Monday, March 23, 2009

Enabling Internet inside the Virtual Machine.[WS 2003]

We were trying to use the Internet inside our Virtual Machine. But the default settings in the virtual Machine were not supporting. However we were able to enable the internet by using the following settings.
Selecting the "Shared networking (NAT)" option in the "Networking" section of the Virtual Machine.

and by setting the "Obtain an IP address Automatically option" in the Local Area Connection Properties-->TCP/IP Properties.

Friday, February 27, 2009

Passing list item ID from SharePoint custom context menu item

We had to add a new menu item in the SharePoint ECB menu in one of our form library. We added it using a simple javascript as specified here. We were able to see the newly added menu item in all the SharePoint list items kept in the form library.

The issue was, We had to pass the ID field of the list item as a parameter to a custom .aspx, which we were redirecting while clicking the new menu item. It was required to find, in which item the menu was clicked. After spending some time with this investigation we found its very simple and straight forward.
"currentItemID" was giving the value. We can even retrieve the list item name using "ctx.listName". Here is the code we used

Wednesday, February 25, 2009

Getting the listItems reside inside a SharePoint folder

One of our project's form library was designed with folders due to the 2000 items per view limitation. (Forms submitted in January will be kept inside a folder called "Jan08")
As part of some other requirement we had to access only the items inside a particular folder. Here is the code we found after some time of investigation with the SPQuery object.

try
{
//25/02/2009- FEB Get only the items specific to a folder
SPSite site = new SPSite(
http://mysite:6666/sites/lat);
SPWeb web = site.OpenWeb();
SPList list = web.Lists["DocumentLibrary1"];
SPQuery query = new SPQuery();
SPFolder myFolder = list.RootFolder.SubFolders["MyFolder_001"];
query.Folder = myFolder;
SPListItemCollection folderItems = list.GetItems(query);
foreach (SPListItem item in folderItems)
{
//Do something here with the items belongs to the folder "MyFolder_001"
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}


Hope if it helps for some people.

Saturday, January 31, 2009

The template you have selected is invalid or cannot be found


We were trying to create a site collection using a template uploaded in to Global template gallery using the stsadm command. But while creating the site collection we were getting the following error.

"The template you have selected is invalid or cannot be found"

After some investigation, again this is due to the Publishing feature. We deactivated the "Publishing feature" in the source site. Recreated the template. Uploaded it again using the Stsadm command. Now the site collection got created successfully.

Cannot find or parse web template file

I was trying to create a SharePoint site collection based on a template saved with lot of site level customizations. Site collection templates should be available in global template gallery and it can be added there using the Stsadm commands I tried to add the template in the global template gallery by using the following command

"stsadm -o addtemplate -filename "c:\mysitecollection" -title "Ari Site collection" "

But it was giving the following error

"Cannot find or parse web template file c:\mysitecollection."

It was a simple error to resolve. But was on a bad day and made me to sweat lot. Yes, the think i missed is the extension of the file name . I modified the command like below and it worked :( another bad day.

"stsadm -o addtemplate -filename "c:\mysitecollection.stp" -title "Ari Site collection" "

Cannot debug project with both ASP and unmanaged debugging enabled

"Cannot debug project with both ASP and unmanaged debugging enabled"

The above mentioned error was occurring when we tried to debug an old .net project in VisualStudio2003. Even though the error was pretty clear it was taking a while for us to find this settings under the property pages of the project. :(

The assembly does not allow partially trusted callers

I was creating a Custom page (code in separate code behind file) for sharepoint. I had to deploy both the .aspx file and .dll file. I deployed the .aspx file and the web.config in a separate folder under layouts folder. The .dll file was deployed to the bin folder of the web application. But while trying to see the page, it was showing the following error message.

"The assembly does not allow partially trusted callers"

After some investigation i found that the error will be happening when we try to call some trusted assemblies from not trusted or partially trusted assemblies.
I was able to resolve the problem by doing the following steps.

  1. Signing the assembly with "Mark assemblies with AllowPartiallyTrustedCallerAttribute(APTCA)" option checked in website project properties-->MSBuild Options
  2. Deployed the dll in to the GAC
  3. Added the assembly in the safe control list of the web.config of SharePoint site.

OpenXML a replacement for serverside automation

As per one of our project requirement we had to do lot of word automation. Since the project is based on SharePoint we had to do all these automation in the code behind of custom.aspx page. But later we found that there are some challenges while invoking the word instance in server using a logged in user. We were able to overcome this problem by impersonating a local user. However we found that server side automation is not supported by Microsoft because of the reasons mentioned in the article(http://support.microsoft.com/kb/257757).

They are suggesting the OpenXML approach for word automation. This seems to be a feasible approach compared to the server automation. To start with OpenXML we should understand the structure of it. We can do it easily by renaming a MSWord2007 .docx format file to .zip extension.

Steps

  1. Create a new MSWord2007 document with the name OpenXMLStructure.docx
  2. Rename the file to OpenXMLStructure.zip
  3. Open the archive file using archiving tool.
  4. It will show the entire structure of the MSWord2007 file in OpenXML format.
  5. To have better understanding about each XML file refer the following MSDN link.http://msdn.microsoft.com/en-us/library/aa338205.aspx
  6. Main part is the word.xml file containing the text of the document. we can read the documentXML in a XML DOM object and do all the automation. The following sites are having lot of information about various automation techniques http://msdn.microsoft.com/en-us/library/aa982683.aspx, http://openxmldeveloper.org/archive/category/1007.aspx

Saving a file only with extension

I was trying to create an OpenXML package manually. For that, a file named ".rel" (only with .rel extension) needs to be created. But if generally if we try to rename a file only with extension we will be getting the message "You must type a file name" and we can't rename the file.

There is a workaround to get rid of this problem. Instead of renaming the file, open the file in NotePad. Use the "Save as" option and type only the extension name in the File Name box. It will be saved only with the extension.