puneet's profileAchilles WatchesPhotosBlogListsMore ![]() | Help |
|
|
SharePoint + This might also be because an indexer move is in progressI got this exception while developing on the SharePoint enterprise search.
"Microsoft.Office.Server.Search.Query.SearchServiceNotFoundException: The search request was unable to connect to the Search Service. at Microsoft.Office.Server.Search.Query.FullTextSqlQuery.Execute()" And i could not access the search settings in the shared service provider. I was getting the following message: "The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress"
The way to get start back again is to restart the Office Search service. This can be accessed via the "services.msc" in the command prompt.
Thanks,
Puneet.H SharePoint: Web User Control in master pagesI was using the SharePoint designer and instantiated the User Control (placed in CONTROL TEMPLATES) I created for the top navigation bar in the master page.
Since i was working with the split mode. I didnt see any HTML of the user control in the page. So this is the tricky part, i had not given the id for the instance on the page.
Enjai,
Puneet.H
SharePoint: Caml Query- Time being ignoredHey All, Caml query not using the time part in datetime. If your are doing a caml query and you see that your time is being ignored in datetime try this:
<Value Type=”DateTime” IncludeTimeValue=”TRUE”><Today /></Value>
You have to use IncludeTimeValue=”TRUE”.
Found this blog which explained it, and works like a dream.
Enjai,
Puneet.H "Some or all identity references could not be translated" in SharePoint
I was configuring my WSS 3.0 installation and was getting this exception logged in the eventviewer on every page refresh and getting a message "Some or all identity references could not be translated". The solution to this problem was "stsadm.exe -o updatefarmcredentials -userlogin -password". Yippee, the central administration came up.
Description: Failed to register SharePoint services. An exception of type System.Security.Principal.IdentityNotMappedException was thrown. Additional exception information: Some or all identity references could not be translated. System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated. at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) at System.Security.Principal.NTAccount.Translate(Type targetType) at Microsoft.SharePoint.Administration.SPFarm.CurrentUserIsAdministrator() at Microsoft.SharePoint.Administration.SPPersistedObject.Update() at Microsoft.SharePoint.Administration.SPService.Update() at Microsoft.SharePoint.Administration.SPDiagnosticsService.Update() at Microsoft.SharePoint.Administration.SPPersistedObject.Update(Boolean ensure) at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInConfigDB(Boolean provisionTheServiceToo, String serviceRegistryKeyName) at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo) at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()
Enjai, Puneet.H MOSS: Configure icons for PDF documents in search resultsTo configure the icons for PDF documents to show up in search results (read more about configuring MOSS search to index PDF documents) or in the default view of the document library, follow the steps below:
1. Copy the .gif file to
SharePoint Server 2007- Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images
2. Edit the Docicon.xml file to include the .pdf extension. To do this, follow these steps:
3. Restart the server. Enjai Maadi, Puneet.H MOSS and Searching PDF DocumentsI was trying to configure MOSS search to index PDF documents present in the document libraries. Here are the steps:
1. Download Adobe Reader 8.x from here and install it on the server.
2. Add the filter extension to the File Types crawled:
3. Modify the following registry default values with the new CLSID for the Adobe IFilter:
{E8978DA6-047F-4E3D-9C78-CDBE46041603} (run regedit in the command prompt
4. Add the Installation directory of the Adobe Reader v.8 to the System Path. For example, if the Reader is installed on "D:\Program Files\Adobe", then add "D:\Program Files\Adobe\Reader 8.0\Reader" to the system path by:
Right Click on My Computer -> Properties -> Advanced -> Environment Variables -> Path (Under System Variables) -> Edit -> (Add "D:\Program Files\Adobe\Reader 8.0\Reader").
5. Restart the search service by running the following commands in the prompt:
Enjai Maadi,
Puneet.H MOSS 2007 - Create a survey, add question and choices programmaticallyI was trying to create an out of the box survey programmatically and wanted to add the question and choices to it too. Below is the sample implementation in C#.
SPWeb web = SPControl.GetContextWeb(HttpContext.Current);
// create the out of the box survey using the list template
Guid surveyId = web.Lists.Add("Name of the Title", "Description of the survey", SPListTemplateType.Survey);
SPList survey = web.Lists[surveyId];
string Question = "what?";
StringCollection choices = new StringCollection();
choices.Add("choice1");
choices.Add("choice2");
choices.Add("choice3");
// Set the question and choices for the survey
survey.Fields.Add(Question, SPFieldType.Choice, true, false, choices); // save the changes back to the list
survey.Update();
// save the changes made in the site
web.Update(); Enjai Maadi,
Puneet.H A fast one on new hiresWe just pulled a fast one on the new hires the other day. We welcomed them with pomp and grandeur. We had elephants, drums et all. The video can be seen at http://www.youtube.com/watch?v=9GpPcMVbmtw. You can also watch the video below...
-Enjai Maadi,
Puneet.H
Chart Web part in MOSSFound this link which lets you download a chart web part. You can use it as a bar chart or as a pie chart.
Check it out at ListCharts - new web part.
Enjai Maadi,
Puneet.H Media player in MOSS 2007I needed to stream a video file to the client.. say as in streaming a webcast. So we needed to embed a video player in a SharePoint site. I found this link where he has explained the same. It worked for me like a dream.
Add a Content Editor Web Part onto your page, and click on the Source Editor where you could input the following HTML, and update the URL value accordingly. Parameters could be added or removed according to your needs, refer to w3schools for the parameters available.
<OBJECT id="VIDEO" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">
<PARAM NAME="URL" VALUE="/Docs/[Your Document Library]/[folder]/[your file.wmv]"> <PARAM NAME="animationatStart" VALUE="true"> <PARAM NAME="transparentatStart" VALUE="true"> <PARAM NAME="SendPlayStateChangeEvents" VALUE="True"> <PARAM NAME="AutoStart" VALUE="false"> <PARAM name="uiMode" value="full"> </OBJECT> Enjai,
Puneet.H Fourteen Things That It Took Me 50 Years To Learn - Dave Barry1. Never, under any circumstances, take a sleeping pill and a laxative on the same night.
2. If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be "meetings." 3. There is a very fine line between "hobby" and "mental illness." 4. People who want to share their religious views with you almost never want you to share yours with them. 5. You should not confuse your career with your life. 6. Nobody cares if you can't dance well. Just get up and dance. 7. Never lick a steak knife. 8. The most destructive force in the universe is gossip. 9. You will never find anybody who can give you a clear and compelling reason why we observe daylight savings time. 10. You should never say anything to a woman that even remotely suggests that you think she's pregnant unless you can see an actual baby emerging from her at that moment. 11. There comes a time when you should stop expecting other people to make a big deal about your birthday. That time is age eleven. 12. The one thing that unites all human beings, regardless of age, gender, religion, economic status or ethnic background, is that, deep down inside, we ALL believe that we are above-average drivers. 13. A person who is nice to you, but rude to the waiter, is not a nice person. 14. Your friends love you anyway. Enjai,
Puneet.H Using an Agile Software Process with Offshore DevelopmentI found this blog which highlighted the key lessons
Enjai,
Puneet.H
The Times Of India 14th Feb, 2009This is the funniest of the mails going around on the debacle of the Indian Cricket Team at the World Cup.
---------------------------------------------------------------------------------------------------------------------------
The Times Of India 14th Feb,2009:
India is playing in a 5 nation tournament ;the other countries being Uganda,Sudan,Papua new guinea and the mighty Bolivia.Today is a must win match for India against tournament favourites Bolivia for a berth in the semi finals.The winner of the tournament will fight for a place to enter the top 35 rankings in the world. On the morning of the match ,a strategy session is being held by Greg and Rahul.This is how it goes. Greg:Boys,this is one of the most important matches in the last three years.We have to beat Bolivia.Lets go through the batting line up and the bowling line up in this meeting. Greg:So Sourav ,you will open right? Sourav:I don't know.Bolivia has a pace bowler who only bowls short pitch deliveries.His pace is consistently in the range 55-60 miles /hour.I cannot handle all that pace. Greg:Oh,thats ok.He won't dare to bowl short pitch stuff against the Indian batsman(we have such good credentials).If he does by mistake,just to make a statement to the media,get Hit Wicket and come back.Such non sense should not be tolerated. Greg:So who will partner Sourav. Rahul:I think Sehwag should.He looked in form in the last game against Sudan.He hit 5 fours between first slip and second slip before he caught at second slip.I think he is in the pink of his form and he should open. Greg:Thats good. Greg:Sachin,you will bat at four ... ok? Sachin:I don't know.I have to go shopping at 11.That means I can't bat beyond ten overs. Greg:Sourav and Sehwag will last till six overs.So ,you will come then.Don't worry,just play your natural game and follow your instincts.You will go by ten overs. Greg:So Dhoni,you will keep? Dhoni:I am not keeping.Last time ,I kept for three hours.My hair is getting spoilt of this.I have thousands of lice in my hair.As a result,the cows in my village have started snubbing me and my advances.These days,dragonflies have started staying in my hair as their food lice is there.I need a haircut ,I am not playing. Greg:Please play just one more match,its the mightly Bolivians ,just one last one. Dhoni:Ok.Don't do it next time. Greg meanwhile was going through the batting averages and noticed that Dravid had the longest stay at the crease for the last 67 matches.So he asked Dravid to give a presentation in front of the team as to what motivated him so much and the secret to his concentration. Dravid:My wife is extremely ugly.So,I try to stay as long as possible away from her.That is why I play a low risk game(In the last game,he hit 3 runs from 92 balls) .If I get out,I have to go back to her. Everyone starts applauding .What an inspirational cricketer. Now it is time to decide on the bowling line up. Greg:Obviously Zaheer is opening.He was brilliant last game. (Zaheer had bowled only 23 wides in the last match and he picked up three wickets.The secret to this brilliant bowling performance was a result of a mentoring session from Venkatesh Prasad.Prasad told him that to bowl from mid off and aim at Third slip.As a result ,Zaheer returned with the best figures in the match.) Greg:Offlate I have noticed that Rahul has been facing a lot of pressure and so we have decided to come up with Batting,Bowling and Fielding Captain to relieve Rahul of some of the responsibility. Greg:I have noticed that Munaf Patel has stayed not out in the last three matches(all the other batsmen had got out by then).I admire the commitment of this lad and as a result he is the Batting Captain. Greg:I was also going through this figure.Sourav has been involved in 177 run outs.But he himself has never got out.He values his wicket so much.I think we all need to Congratulate him on the price he sets for his wicket.Sourav,you are the RUNNING BETWEEN THE WICKETS captain. Greg:Anil has been sitting on the bench for the last three years.He keeps taking snaps throughout the match.He is such a teamman.I think we need to recognize this loyalty.Anil,you are the Bowling Captain. Greg:Harbhajan is the fielding captain. Rahul:But he dropped the catch in the last match when he dived to his right to take it. Greg:Atleast he dived in the right direction. After this intense brainstorming session ,India looks all set to take on Bolivia.Please pray for the team's success. --------------------------------------------------------------------------------------------------------------------------------------------------------------------
Enjai,
Puneet.H JavaScript document.write doesnot work in XMLI was working with an XML file which had spit out HTML . This XML file contained a document.write("<script> .... </script>"); which was breaking the xml file.
Enjai,
Puneet.H PKCS7 in .Net and PKCS5Padding in Java with JCEMy Client was encrypting using JCE on a app server running Java 1.3. The padding he was using is PKCS5 padding while in .Net i was using PKCS7 padding mode to decrypt. Both of us were using AES/Rijndael algorithm for encryption and decryption purposes.
I was wondering if the two padding modes were compatible. Yes, they are compatible with each other to block sizes between 1 and 255 bytes inclusive.
For further info go here.
Enjai,
Puneet.H SharePoint - Business Data Catalog walkthroughI was looking out for some BDC related stuff and for some walkthroughs and tutorials.
Here is the MS Virtual Lab link to the walkthrough which i found really helpful. You have to be a MSDN subscriber and a MSN passport account helps.
Also editing the application definition file by hand is a pain. Using BDC MetaMan is advised. You can find it here.
Enjai,
Puneet.H Using SPSecurity.RunWithElevatedPrivileges: Get a FileWell, i had a SharePoint site running Forms Authentication and i had to get a file from the document library for editing. So i decided to give Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges method a try. This takes a void function which will be run in elevated priveleges. So creating/deleting MySite for users while adding them from a legacy system can be done without the application running in System Account.
Heres the sample code:
SPFile rFile;
SPWeb web;
using (SPSite site = new SPSite(serverurl))
{
web = site.OpenWeb();
// get the file
SPSecurity.RunWithElevatedPrivileges(GetSPFile);
// read the file
StreamReader streamReader = new StreamReader(rFile.OpenBinaryStream());
filecontent = streamReader.ReadToEnd();
// do some file manipulation
/*
.......
*/
web.AllowUnsafeUpdates = false;
}
private void GetSPFile()
{
web.AllowUnsafeUpdates = true;
rFile = web.GetFile(strFileURL);
}
Enjai,
Puneet.H |
|
|