Posts

Sql Script Generator

During project development you might have come across a situation where you need Insert script along with values from SQL Table. Found a very useful tool  SQL Script Generator   at CodePlex.  SQL Script Generator is a tool for generate INSERT/UPDATE statement SQL script. With SQL Script Generator you can create script to copy data from one database to another.

Shrink LDF file in SQL SERVER 2005

I recently encountered an issue on one of our development box, where SQL log files on C:\ and transaction logs grew to 13GB, on the other hand the DB size is just 29 MB. Used following SQL query to reduce the size of log file to free up the space ALTER DATABASE [DBNAME] SET RECOVERY SIMPLE; GO --Shrink the truncated log file to 1 MB. DBCC SHRINKFILE ( [DBNAME_LOGFILE_NAME] , 1); GO --Reset the database ALTER DATABASE  [DBNAME] SET RECOVERY FULL; GO

Corrupt WMI Causing SharePoint Provisioning to Fail

Image
Recently our team ran into an issue where SharePoint where solution deployment is failing with following errors. After troubleshooting and going through the forums it was suspected that WMI might be corrupt on the Windows 2003 Server hosting SharePoint. To confirm the suspicion that WMI was indeed corrupt, we used the wbemtest.exe utility to check connectivity. Click Connect: Click Connect, using the default values: If no error is thrown, you have successfully connected to the local machine via WMI. If “Not Found” error message is received, you indeed have a corrupted WMI instance. To further test, you could execute the following WMI query to test the specific class SharePoint is querying during search provisioning, using the following example: If you received an error message when trying to connect, you can attempt to re-register the WMI .dll’s and .exe’s using the following seven steps: 1. Disable and stop the Windows Management Instrumentation service. 2. Right-...

Mutual SSL Authentication

Detailed introduction to Mutual SSL Authentication by Elvin Cheng. http://www.codeproject.com/Articles/326574/An-Introduction-to-Mutual-SSL-Authentication

WCF WSDL location address Issue resolved when hosted over HTTPS with basicHTTPBinding

Image
Recently I was working on a WCF web service which needs SSL implementation using basicHttpBinding, so that the service remains inter-operable and cater to native clients. Everything was going well, I was able to host my web service over HTTPS (I will detail out the configuration for the same in section below). But when I deployed on Server, following errors were received when proxy is generated: " Metadata contains a reference that cannot be resolved: " " The WSDL document contains links that could not be resolved." The issue lies with the WSDL which generates the location url with client machine name, which restricts generation of appropriate proxy over Internet because it will never be able to resolve machine name over internet. Here is what the Soap Address location and WSDL Import location look like in my WSDL: < soap:address location ="https://MachineName.mydomain.com/MyService/Service.svc" /> < wsdl:import   locati...

IE9 rendering issues table offset at random columns

Today while developing an ASP.NET application using AJAX to display the Search Result, I encountered a weird issue. My aspx p age contain a Repeater control with ItemTemplate to display free flow data in HTML Table .  Issue What seems to happen though, is that one or two rows in the loaded table, will have its data offset at a random column.   You can find the details of issue in following articles: http://stackoverflow.com/questions/7267014/ie9-table-has-random-rows-which-are-offset-at-random-columns http://social.msdn.microsoft.com/Forums/en-AU/iewebdevelopment/thread/28d78780-c95c-4c35-9695-237ebb912d90 Resolution The problem was with extra white space between td nodes causing IE9 render a dynamically generated table incorrectly, in my case to misalign a cell within a table.  Same code rendered perfectly fine in IE6, IE7, IE8, FireFox 4, Chrome 10, but not IE9.  Try one of the following Adding to the head element [me...

How to get the IUSR and IWAM user account passwords

Open up command prompt and navigate to C:\Inetpub\AdminScripts. Then type: cscript.exe adsutil.vbs get w3svc/anonymoususerpass If everything goes well, you will see the following with the password in ***** format: C:\Inetpub\AdminScripts>cscript.exe adsutil.vbs get w3svc/anonymoususerpas Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. anonymoususerpass : (STRING) "**********" To display the IUSR and IWAM account passwords in cleartext, you need to open C:\Inetpub\AdminScripts and edit Adsutil.vbs in Notepad. Find this line: If (Attribute = True) Then IsSecureProperty = True Else IsSecureProperty = False End If and change it to: If (Attribute = True) Then IsSecureProperty = False Else IsSecureProperty = False End If Now run the script commands above again and you will see the passwords in clear text. Of course, please make...