When you first configure SharePoint 2007 and it's associated Shared Services Provider on a server, you specify a username and password in several places. You will see this informally called the "farm account". If this password ever gets changed, there are a few hoops you need to jump through in order for SharePoint to continue to function. This page demonstrates the different steps to accomplish this. I'll summarize here:
stsadm -o updatefarmcredentials -userlogin DOMAIN\USERNAME -password THEPASSWORD
iisreset /noforce
stsadm -o updateaccountpassword -userlogin DOMAIN\USERNAME -password THEPASSWORD –noadmin
stsadm -o spsearch -farmserviceaccount DOMAIN\USERNAME -farmservicepassword THEPASSWORD
stsadm -o spsearch -farmcontentaccessaccount DOMAIN\USERNAME -farmcontentaccesspassword THEPASSWORD
stsadm -o osearch -farmserviceaccount DOMAIN\USERNAME -farmservicepassword THEPASSWORD
stsadm -o editssp -title SharedServicesProviderName -ssplogin DOMAIN\USERNAME -ssppassword THEPASSWORD
iisreset /noforce
Go to the Shared Services Provider page, Search Settings, and click on the Default content access account. Change the password here.
Friday, June 27, 2014
Wednesday, June 25, 2014
Removing a stubborn assembly from the GAC
Sometimes when removing a assembly from the GAC, you will get an access denied message. In this case, you'll need to use the gacutil utility to remove the file. This is installed as part of Visual Studio and can be accessed by opening a Visual Studio Command Prompt. If the computer you are working with does not have Visual Studio installed, you can copy the tool from a computer that does. Just stick it in the framework folder: C:\Windows\Microsoft.NET\Framework\v....
Here is the command to remove the file:
gacutil -u NameOfFileGoesHereWithoutTheExtension
Here is the command to remove the file:
gacutil -u NameOfFileGoesHereWithoutTheExtension
Thursday, June 12, 2014
Recaptcha
If your project requires CAPTCHA functionality, I highly recommend Recaptcha. Recaptcha is a free service offered by Google that serves up CAPTCHA functionality. First, you need to sign up here. Assuming you've got a google id and are signed in, all you need to provide is the domain where you will be using recaptcha. Google will provide you a public and private key that will be used by the recaptcha control.
For ASP.NET, you just need to download the recaptcha dll and reference it in your project. Then put this at the top of the page where the CAPTCHA functionality is needed:
This snippet will render the CAPTCHA control itself:
And finally, this code will check to make sure the correct code was entered. This assumes you have a ValidationSummary control on your page.
For ASP.NET, you just need to download the recaptcha dll and reference it in your project. Then put this at the top of the page where the CAPTCHA functionality is needed:
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
This snippet will render the CAPTCHA control itself:
<recaptcha:RecaptchaControl ID="recaptcha" runat="server" Theme="white" PublicKey="Provided By Google" PrivateKey="Provided By Google" />
And finally, this code will check to make sure the correct code was entered. This assumes you have a ValidationSummary control on your page.
If Page.IsValid = False Then Return End If
jQuery Plugins
Sometimes you will come across some bit of functionality that jQuery doesn't handle natively and jQuery UI doesn't offer up a solution. For example, let's say you need to implement a mask on a text box for a phone number. You could use the Ajax Control Toolkit, but I've had issues getting this to work so I don't recommend it. I love jQuery and jQuery UI, but you can't do this "out of the box".
A jQuery plugin is an extension of jQuery that "some guy" has written to accomplish something that jQuery doesn't do by itself. In fact, jQuery UI is basically a "plugin". The only difference is that jQuery UI is official and a plugin is not. And this is what makes me a little hesitant to use plugins. But, in the case of our phone number mask example, I think it's probably the best fit.
First go to the jQuery Plugins page and find something you think will work. The inputmask seemed to work well for me. Download all the files, and stick them all in a folder in your project folder. There should be some documentation either on the plugin page or downloaded into your folder. It will tell you how to use the plugin in your code. As an example, here is how I used the inputmask.
First add this script to your page.
Then your jQuery would look like this:
A jQuery plugin is an extension of jQuery that "some guy" has written to accomplish something that jQuery doesn't do by itself. In fact, jQuery UI is basically a "plugin". The only difference is that jQuery UI is official and a plugin is not. And this is what makes me a little hesitant to use plugins. But, in the case of our phone number mask example, I think it's probably the best fit.
First go to the jQuery Plugins page and find something you think will work. The inputmask seemed to work well for me. Download all the files, and stick them all in a folder in your project folder. There should be some documentation either on the plugin page or downloaded into your folder. It will tell you how to use the plugin in your code. As an example, here is how I used the inputmask.
First add this script to your page.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="InputMask/dist/jquery.inputmask.bundle.js" type="text/javascript"></script>Note that I'm using a content provider (google) to host the "out of the box" jQuery code. This is simply for brevity.
Then your jQuery would look like this:
$(document).ready(function () { $("#txtPhoneNum").inputmask("999-999-9999"); });
Subscribe to:
Posts (Atom)