Tuesday, April 28, 2009

View GAC Content

Create a new DWORD key under HKLM\Software\Microsoft\Fusion\ with the nane DisableCacheViewer and set it’s [DWORD] value to 1.

Monday, April 20, 2009

ManagementObjectSearcher Access Is Denied

  1. Open the Computer Management Microsoft Management Console
    (MMC) snap-in.
  2. Expand Services and Applications, and then select WMI Control.
  3. Right-click WMI Control, and then click Properties.
  4. In the WMI Control Properties dialog box, click the Security tab.
  5. Expand Root, select CIMV2, and then click Security.
  6. In the Security dialog box, click Advanced.
  7. In the Access Control Settings dialog box, click Add. Select localMachineName\ASPNET, and then click OK.
  8. In the Permission Entry dialog box, make sure that Apply Onto is set to This namespace and subnamespaces.
  9. Make sure that the Allow 'Enable Account' and Allow 'Remote Enable' check boxes are selected.
  10. Click OK in each dialog box until you return to the WMI Control Properties dialog box.
  11. Repeat steps 5 through 10 for other WMI namespaces that
    your application will access.
  12. Restart IIS. To do this, run
    IISRESET from the command line.

Tuesday, February 17, 2009

A solution to "An unexpected error has occurred" in WSS v3

Debugging SharePoint can be problematic at times, it does like to hide debugging information from you. The bain of my life recently has been “An unexpected error has occurred” with nothing written to log files, trace or the event log.


Normally I can debug the problem with a little commenting & narrowing down of the problem, but today I have managed to get rid of that error screen completely.


The solution is to change a single entry in web.config, by modifying the line…


<SafeMode MaxControls=“200“ CallStack=“false“…


to…


<SafeMode MaxControls=“200“ CallStack=“true“…



You will also need to set custom errors to 'Off' .


<customErrors mode=“Off“/>


You will no longer see the “An unexpected error has occurred” error page and instead you get a lovely ’standard ASP.Net error page’ with the stack trace and everything…development has got that little bit easier!!

Monday, February 9, 2009

Event 10016: The application-specific permission settings do not grant Local Launch permission for the COM Server application


  1. Go to Start - Run, and type regedit, and press enter

  2. Locate and then click the following registry subkey:

    HKEY_CLASSES_ROOT\CLSID\CLSID value

    Note In this subkey, “CLSID value” is a placeholder for the CLSID information that appears in the event error. I.e. in case of Sharepoint, the CLSID would be {61738644-F196-11D0-9953-00C04FD919C1},

  3. Double-click on AppID in the right pane, .

    A dialog box appears. Leave this box open

  4. Go to Start - Run, and type dcomcnfg, and press enter

  5. In the Component Services window, go to Component Services, go to Computers, go to My Computer, and then click DCOM Config.

  6. In the details pane, locate the program by using the friendly name, then choose Properties by right clicking on it

  7. At the Security tab, in the Launch and Activation Permissions area, click Customize, and then click the Edit button.

  8. Add the Local Service or Network Service account by clicking the Add button, typing the user’s account name (Local Service or Network Service, this depends on whats in your event error), and then clicking OK.

  9. Select the account name you just added, click to select the Allow check boxes for the following items:

    • Local Launch

    • Remote Launch

    • Local Activation

    • Remote Activation

  10. Click OK two times and quit the registry editor

Wednesday, February 4, 2009

Save and retrive the value in ViewState object before the PostBack

//Save the value in ViewState object before the PostBack
ViewState["SomeVar"] = txtFirstName.text;

//Retrieve the value from ViewState object after the PostBack
String strFirstName = ViewState["SomeVar"].ToString();

Tuesday, January 27, 2009

Unable to connect to SQL Server session database. The connection string (server='', database='SharedServices1_DB') was returned by an...

1. On SQL Server 2005 Management Studio, below Security - Logins
locate the user that represents your web server, DOMAIN\MACHINE$.
2. Right-click the DOMAIN\MACHINE$, choose User Mapping.
3. Map the SharedServices1_DB. check the roles db_owner and public.
4. Click OK and you're set!

MASHINE - your mashine name

Wednesday, January 14, 2009

Import user profiles from Active Directory to MOSS 2007

Scenario-1 - All users are in the current domain.

1. Go to User Profile and Properties under Shared Services Administration.

2. Click on configure profile import link. Select current domain as the profile datasource.

3. Make sure default access account is specified and is valid.

4. Run full import or incremental report.

Scenario-2 - Users are scattered into multiple domains or other data sources.

1. Go to User Profile and Properties under shared services administration.

2. Click on Import New Connection. Add a new connection for each of the data sources where you users are located. Delete any unwanted connections that might already be there.

3. Configure the import as mentioned above and make sure that Custom source is selected.

4. Run the full import or incremental import.