Thursday, December 6, 2012

Error Failed to Connect to the Configuration Database: An Exception of Type System.ArgumentNullException Was Thrown. Additional Exception Information: Value Cannot Be Null Parameter Name: Service.

So, here we are trying to expand the SharePoint 2010 farm a bit. The farm is comprised of one or more VM sitting in an elaborate VMware infrastructure and a few physical servers hosting the databases. So the VM hosting the application services for SharePoint 2010 is kinda slow, so, decided to add a new one and yank the slow one out, or perhaps even leave both of them in there, y'know how cool it is for us to have more servers doing stuff, good for my ego.

And after going through the harrowing experience of missing locally and missing in xxxx servers and yyyy servers, and other annoying language pack issues, the box was finally ready. So, I fired up the SharePoint 2010 Products Configuration Wizard of Oz, and got this along the way, just the very first steps really:


error failed to connect to the configuration database: an exception of type system.argumentnullexception was thrown. additional exception information: value cannot be null parameter name: service.


Familiar it seems. Of course the error is not familiar, but getting errors from SharePoint is like our thing. I mean if you don't get any you begin to wonder am I doing things right? Kidding.

So, how do we resolve this?
Create an alias on the server for the SQL client. For some reason this was just the solution.
And to do that:

SQL Alias is something which you may have to create when you’re moving your database server. I had a requirement to move from an old database server to new one  and as a part of the migration had to create SQL Alias. This is how you create it.

You will have to create SQL Alias on each web front and application server of SharePoint.

Click on Start > Run and Type cliconfg
Click on Ok
Now enable TCP/IP Protocol.
Select TCP/IP and Click on Enable



Click on Alias Tab
Click on Add
Select TCP/IP from Network Libraries
And enter the old database server name in Server Alias
And set the Server Name to New Database Server Name
Click Ok

An Exception of Type System.Reflection.TargetInvocationException was Thrown

From the stables of SharePoint 2007 error-laden blockbuster features, comes another mysterious and annoying error, *drum roll*special effects*camera upclose*camera drawback*more Star War effects*


An exception of type System.Reflection.TargetInvocationException was thrown. Additional exception information: Exception has been thrown by the target of an invocation.

Sounds like something from FRINGE.
This happens when you try to join a new server to a farm. And that is after you have battled the infamous installcheck which returned like 80 language packs problem, 120+ missing locally problem and the rest of the evil minions from SharePain hell.

So, what do we do? How do we resolve?

You won't believe this. It's your NTFS drive letter causing this. Crazy!
Just to be sure, open your ULS log file in the APPLICATION server and do a search for directory name you entered is invalid.

If this returns a series of results (best if you use Notepad++) then that is the problem. What to do is take a look at the drive letter convention in your machines, and ensure your new server is consistent with the drive letters. So, if your APPLICATION server has C, D, E, F drives, ensure your new machine is named the same way. When done, re-run the Configuration Wizard again, and you should be fine.

Wednesday, October 17, 2012

SHAREPOINT 2010 ERROR: "Cannot start service SPAdminV4 on computer '.'." error on SharePoint configuration wizard


It always repeats itself! Jeez!! Why!! Arrrrggghhhhhhh!!!
We can't run away from it. We can only hope 20 years up the line from now that SharePoint will stop giving us hair-tearing problems for no apparent known reason. I mean we are just on our own thinking everything is fine and we get that problem that almost makes you feel like you really don't know this thingy.

Let me let you in on the back story. I have this development server was just fine and good. Then I travelled on a vacation that was really long and sweet, and I basically returned with a little more flesh around my middle region. I mean, that means I had a groovy vacation. Ok, I'm sorry, I lied. It wasn't really a vacation, it was an official assignment that felts so good just like a vacation. I still remember the good times of it even now.

So, here I am, and then my boss says, "Hey James, um, please can you kindly send me the URL for the development server Central Admin?" So, just before I send it, I figured, um, let me just check it before sending it on, pretty normal cyclic redundancy check (crc) of every geek's brain, right? Well, it took forever, and it never came up, and after what feels like eternity, I get a pop-up asking me to setup central admin by running Configuration Wizard. I went like "What!" And then I checked some stuffs and I finally had to do the unthinkable, configure again. Well, it just went from fail, fail, to more fails and fails. Then I get this log entries and messages that's the title of this blog.

This entry is for those environments with the June 2012 CU for SharePoint 2012.  This patch causes CRL (Certificate Revocation List) checks to be enforced, which in turn affects some native functionality of SharePoint AdminV4 service. 
When running the SharePoint Product Configuration Wizard, the configuration will fail with the following error:

Failed to create the configuration database.
An exception of type System.InvalidOperationException was thrown.  Additional exception information: Cannot start service SPAdminV4 on computer '.'.

In order to bypass the CRL Check for SPAdminV4 service start-up, the following steps need to be completed on each SharePoint server.
·         Add a new computer policy which alters the options for retrieving certificate validation on a network
·         Add host file entries into the local computer host file

To do this:
·         ALTER THE COMPUTER POLICY

  • Click on Start-Run
  • Type in "gpedit.msc" and click "OK"
  • Expand Computer Configuration --> Windows Settings --> Security Settings --> Public Key Policies
  • In the Public Key Policy window displayed on the right pane, double-click "Certificate Path Validation Settings"



  • Click on the "Network Retrieval" tab
  • Check the box "Define these policy settings"
  • Uncheck "Automatically update certificates in the Microsoft Root Certificate Program (recommended)" and "Allow issuer certificate (AIA) retrieval during path validation (recommended"
  • Click on "OK"

·         Close out of gpedit.msc console.

·         ADD HOST FILE ENTRIES
·         Click on Start --> Run
·         Type in "C:\Windows\System32\Drivers\Etc" and click "OK"
·         Double-click the file "Hosts"
·         Select "Notepad" as the program to open the file
·         Insert the following lines into the hosts file
·         0.0.0.0 crl.microsoft.com
·         0.0.0.0 crl.verisign.com
·         0.0.0.0 ocsp.verisign.com
·         0.0.0.0 SVRSecure-G2-crl.verisign.com
·         0.0.0.0 SVRSecure-G3-crl.verisign.com
·         0.0.0.0 www.download.windowsupdate.com
·         0.0.0.0 SVRSecure-G2-aia.verisign.com

Save file and exit notepad (you may encounter a little problem here saving the host file depending on your system's security hardness, a good way if you cant save the host file back to the ETC folder is to copy it out from the secure path to your desktop, modify it as it is and copy it back to overwrite the original). If you have gone this far in SharePoint, that shouldn't be a problem to you, it's pretty simple to workaround.
Problem solved.

Wednesday, September 26, 2012

“The install in progress conflicts with a previously installed Microsoft Office 2010 Server product”

SharePoint 2010 is fun. SharePoint 2010 is easy. I mean, for example, years back working with Windows operating system installation was a arduous task. Deep blue screen, white lettered alphabets, few instructions, shortcut keys to answer either YES, NO, CANCEL, PRESS ANY KEY TO CONTINUE, and the corrupt dll files all plagued us till Win2k3. And then came Vista with the easiest ungeeky method of installation, and same for Win2k8. In the SharePoint side of things, it started off as easy in WSS until MOSS 2007 came into the picture and it was all a picture of Hiroshima and Nagasaki all afresh. Now we breathe some air of relief with SharePoint 2010 configurations made easy in one simple Wizard screen. If we thought it was over, we were all probably not very right.

This is one of the reasons I believe that there will never really be a renegade robot or software that will take over the world, Sarah Connor can go about a normal life.

With SharePoint 2010, installing, uninstalling, reinstalling, re-uninstalling is just so tempting at the slightest thought of problem. But you will get bitten a few times. Language Packs is one. Office Web Access is another. These guys can ruin your 5 minutes eternal coffee time.
Here is one example, see the screenshot:

I just yanked off an installation because someone in the team downloaded a custom code, and installed it in my dev environment. This killed my Central Admin one time. Every other site was working except my CA. SharePoint 2010 is tempting. I figured rather than looking for the problem, yank it off and reinstall after a proper backup. So, I uninstalled. I began re-installing and just after the product key page I got this.

This particular problem is caused by Language Pack. I had installed a French language pack because half my users are French speaking. So you can imagine.

SOLUTION:
1. Stop the installation.
2. Go to Control Panel --> Programs and Features
3. Identify the language pack for SharePoint
4. Uninstall
5. Reboot

Now you can proceed to install your SharePoint.

Friday, September 21, 2012

An Unhandled Exception 'system.security.cryptography.cryptographicexception' Occurred in OWSTIMER.EXE

I have this really slow and annoying SharePoint 2010 development server, bumped Visual Studio 2010 into it. Great idea it seemed then. Well, it still seems still in my eyes. Then, I had some application services not starting and just getting lost in limbo for like forever. So, I re-installed the SharePoint 2010. Them one of my content databases refused to mount because of schema difference. So, I decided to install the March 2012 cumulative update ( http://support.microsoft.com/kb/2597150 which took eternity, and even so now is still in eternity, and intermittently between these two eternities I have gotten this error like forever (see screenshot):


If this error was coming up perhaps when running some of my custom codes, and this debug suggestion comes up, then no problems, I can proceed and debug. Visual Studio is trying to help us out with an unhandled exception by asking about launching debug.  That’s all well and good but I didn’t write the SharePoint code or the cumulative update code and so I have no plans to change it. So for as often as it pops up, is the same number of times you tell it to get da hell outta da way... :) :)
However, one way to work with this is to disable the JIT (Just-In-time Debugger) by following a few simple Registry Key changes: http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/9e6cb3fb-f8fb-4c22-8608-e521e13260ff


Friday, March 18, 2011

I RECEIVED MICROSOFT MCC Award 2011


I was not very surprised when I got the Microsoft Community Contributor Award 2011, but I was excited to have been recognized with it. I knew Microsoft was aware of everything going on in the forums, but did not quite envisage that I would get something this valuable -- not in terms of money, but the resources (Microsoft Press E-Reference Library) that comes with the package! That's something to shout about!

The Microsoft Community Contributor Award seeks to recognize notable contributions to Microsoft online community forums such as TechNet, MSDN® and Answers. The value of these resources is greatly enhanced by participants who voluntarily contribute their time and energy to improve the online community experience for others. Each day around the world, Microsoft Community Contributor Award recipients contribute to Microsoft online technical communities in a range of ways, including providing helpful answers, translating online resources into local languages and serving as moderators.

Through the Microsoft® Community Contributor Award, Microsoft expresses their thanks to individuals who freely volunteer their time and energy to help improve the Microsoft online technical community experience for others.
More and more technology users are seeking ideas and solutions for enhancing their technology experience through online resources. At Microsoft, customers find answers when and where they want them through online forums such as TechNet, MSDN® and Answers.
Today, up to 4,000,000 people gain valuable information through Microsoft online forums–and that number is growing.
These valuable resources are enhanced by the contributions of Microsoft Community Contributor awardees, who help other participants in a range of ways, such as providing helpful answers, translating online resources into local languages and serving as moderators.”

Frequently Asked Questions

Q1. What is the Microsoft® Community Contributor Award?

A1. It is an award offered by Microsoft which is designed to recognize notable contributions to Microsoft online community forums such as TechNet, MSDN®, and Answers.

Q2. Do Microsoft Community Contributor Award recipients represent Microsoft?

A2. No. Awardees are not Microsoft employees, nor do they speak on Microsoft's behalf. Awardees are independent third-party individuals who have received an award from Microsoft that recognizes their notable contributions to Microsoft online technical communities.

Q3. How does Microsoft select recipients of the Microsoft Community Contributor Award?

A3. More and more technology users are seeking ideas and solutions for enhancing their technology experience through online resources. Microsoft reviews the contributions of participants who offer their time and energy to online technical communities such as Answers, MSDN and TechNet to identify those who make notable contributions for possible recognition as a Microsoft Community Contributor. In addition, Microsoft Community Contributors can be recommended by Microsoft Most Valuable Professionals, who serve as deep technical experts and thought leaders in the community.

Q4. Do Microsoft Community Contributor Award recipients receive any payment from Microsoft?

A4. No. Recipients of the Microsoft Community Contributor Award receive a small benefit which can serve as a resource for their participation in technical forums, but they do not receive any monetary payment from Microsoft.

Q5. What does Microsoft expect from Community Contributor Award recipients?

A5. Because the Microsoft Community Contributor Award is awarded based on past contributions, Microsoft has no expectations of awardees beyond the normal expectations of courtesy, professionalism, and adherence to the community rules that we ask of all Microsoft online community members. These rules can be found on the Microsoft Communities Rules of Conduct page.

Q6. How long does the Microsoft Community Contributor Award last?

A6. One year from the date of the award, which can be found on the award notification email.

Q7. How can I be considered for the Microsoft Community Contributor Award?

A7. Individuals are considered for the Microsoft Community Contributor Award by Microsoft, or as recommended by Microsoft Most Valuable Professionals, based on their contributions during the previous year to Microsoft online technical communities.

Q8. Can I recommend someone to receive the Microsoft Community Contributor Award?

A8. No. Microsoft Community Contributor Award recipients are identified by Microsoft as a result of their notable contributions to Microsoft online community forums and can be recommended by Microsoft Most Valuable Professionals as part of their role as leaders in technical communities.

Q9. Are Microsoft employees eligible to receive the Community Contributor Award?

A9. No, Microsoft employees cannot receive the Microsoft Community Contributor Award.

Q10. Are Microsoft Most Valuable Professionals (MVPs) eligible to receive the Microsoft Community Contributor Award?

A10. No. Microsoft Most Valuable Professionals can recommend individuals for the Microsoft Community Contributor Award as part of their role as leaders in technical communities.

Q11. Are there any requirements to receive the Microsoft Community Contributor Award?

A11. Yes, all Microsoft Community Contributor Awardees must be 18 years or older.

Q12. Why must Microsoft Community Award Recipients be 18 years or older?

A12. Microsoft is committed to the safety and privacy of minors. Minors are defined as anyone who is not 18 years or older. To help ensure this safety, the Microsoft Community Contributor Award has a policy that all Microsoft Community Contributor Awardees confirm they are 18 years of age or older.

Q13. How do I contact Microsoft about the Community Contributor Award?

A13. You can send questions to the Microsoft Community Contributor Global Administrator at MCCGA@Microsoft.com.

Q14. How do I change or request a duplicate copy of my award benefits?

A14. Contact Microsoft Community Contributor Global Administrator at MCCGA@Microsoft.com.

Q15. Do I have to pay for the Microsoft Press® E-Reference Library?

A15. No. As a Microsoft Community Contributor awardee, Microsoft is pleased to offer you a 12 month subscription to Microsoft Press E-Reference Library at no cost as our way of saying thank you for making a difference in Microsoft online technical communities.

Q16. What is the Microsoft Press E-Reference Library?

A16. The Microsoft Press E-Reference Library, which is hosted by Safari® Books Online, contains over 400 books from Microsoft Press and offers you the most current technical information about Microsoft products in an easy-to-use online format.

Q17. How do I sign up for the Microsoft Press E-Reference Library at no cost?

A17. As an awardee, you will be invited to accept the complimentary 12 month subscription to Microsoft Press E-Reference Library when you accept the Microsoft Community Contributor Award on www.microsoftcommunitycontributor.com. Simply check the box to confirm your acceptance of the Microsoft Press E-Reference Library and within three business days you will receive your log-on information directly from Safari Books Online. To ensure you receive your log-on information, safe list the sender noreply@safaribooksonline.com.

 Thank you MS!

Monday, January 24, 2011

DEALING WITH A LARGE TRANSACTION LOG FILE

Transaction log principles
Whenever a data update is made entries are added to the transaction log.
It is not possible to prevent this as it is part of the way sql server 
maintains integrity - particularly during recovery.

The transaction log is a circular file i.e. when the end is reached any 
free entries at the start will be used.
This means that all being well the file will stay at a constant size as 
the current entry cycles round.

The system maintains the MinLSN which is a pointer to the first active log
record.
Any log records before this (in the circular file) are free.
The MinLSN will be prevented from moving forward by any open transactions -
i.e. the oldest open transaction entry will be >= the MinLSN.
The MinLSN is updated at checkpoint so committing a transaction will not 
immediately free entries and anything that holds up the checkpoint can cause 
problems.

If the database is in simple recovery mode all entries prior to the MinLSN 
will be freed at checkpoint.
If the database is in full recovery mode (and a full backup has been taken) 
the entries prior to the MinLSN will only be freed by a transaction log 
backup (not full backup).


Common cause of large transaction log file (.ldf)

Unfortunately the sql server default (except local editions) leaves the 
databases in full recovery mode.
This menas that if no action is taken no tr log entries will be freed and 
the log file will eventally fill the disk and crash the system.
The SQL Server installation process is very simple and commonly carried out 
by inexperienced personel. This will appear to work happily but cause 
problems later.
I would recommend always setting the model database to simple recovery 
mode to set the default for new databases.


Stopping the transaction log file (.ldf) from growing

If the log file has grown do to being in full recovery mode then set it to 
simple before going any further. This should immediately stop the log from 
growing.
Enterprise manager
Right click on the database, properties, Options, set model to simple, OK.
t-sql
sp_dboption [dbname], 'trunc. log on chkpt.', 'true'
 
 
Shrinking the transaction log file (.ldf)
Before this make sure there are free entries by setting the recovery model 
to simple or backing up the log.

Enterprise manager
Right click on the database, All tasks, Shrink database, Files, Select log 
file, OK.

t-sql
dbcc shrinkfile ([db_log_name])
Here [db_log_name] is the logical name of the log file as found from 
sp_helpdb or the table sysfiles
 
PROCEDURE










Shrinking the log file via detach/attach
Always take a full backup before a detach.

Detach the database, delete/rename the log file, attach the database - 
this will create a minimum size log file.
Note that the log file must be deleted/renamed otherwise it will be 
re-used even though it is not mentioned in the attach.

Enterprise manager
Right click on the database, All tasks, Detach database, OK.
Delete/rename the disk log file.
Right click on databases, All tasks, Attach database, Select the .mdf file, 
OK, Yes (to the create new log message).

t-sql
sp_detach_db [dbname]
Delete/rename the disk log file.
sp_attach_single_file_db [dbname], [filename]
where [filename] is the name of the physical data file (.mdf).