Thursday, January 28, 2010

TFS : The solution you have opened is under source control but not currently configured for integrated source control in Visual Studio

At some point you opened a solution offline, and this caused the associated server to be marked offline. The messagebox you are seeing is due to a bug with opening solutions from Source Control Explorer while the server is marked offline. The bug should be addressed in VS 2008 Service Pack 1.

The fix/workaround for your issue is to mark your server online again by taking a solution online. You should see a Go Online option in Solution Explorer (right-click menu or toolbar button). Use that to take your solution online. After that you should be able to open solutions from Source Control Explorer again without issue.

The fact that taking a solution offline also marks the server offline is catching some of our users offguard.

Debugger error : The debugger stopped execution of code on the Web site. This caused IIS to assume that the worker process.



To continue to debug, you must configure IIS to allow the worker process to continue. This error message does not appear with versions of IIS that are older than IIS 7.


To configure IIS to allow the worker process to continue

  1. Open the Administrative Tools window.

    1. Click Start, and then choose Control Panel.

    2. In Control Panel, choose Switch to Classic View, if necessary, and then double-click Administrative Tools.

  2. In the Administrative Tools window, double-click Internet Information Services (IIS) Manager.

    IIS Manager opens.

  3. In the Connections pane, expand the <computer name> node if necessary.

  4. Under the <computer name> node, right-click Application Pools.

  5. In the Application Pools list, right-click the name of the pool your application runs in, and then click Advanced Settings.

  6. In the Advanced Settings dialog box, locate the Process Model section, and perform one of the following actions:

    • Set Ping Enabled to False.

    • Set Ping Maximum Response Time to a value that is larger than 90 seconds.

    Setting Ping Enabled to False stops IIS from checking whether the worker process is still running and keeps the worker process alive until you stop your debugged process. Setting Ping Maximum Response Time to a large value allows IIS to continue monitoring the worker process.

  7. Click OK to close the Advanced Settings dialog box.

  8. Close IIS Manager and the Administrative Tools window.

Installation of Moss on Windows Server 2008 : Compatibilityi issue

We should install MOSS with SP1 on Windows Server 2008 environment to avoid the compatibility.

Access denied while updating web objects.

We get Access denied even if the code is running under 'RunWithElevatedPrivileges' and AllowUnsafeUpdates is set to True.

Solution :
Instead of using RunWithElevatedPrivileges command , create a instance of SPSite with system account user token.

SPSite currentSite = SPContext.Current.Site;

using(SPSite _oSite = new SPSite(currentSite.ID, urrentSite.SystemAccount.UserToken))
{
// Do something
}

Thursday, December 17, 2009

Use SPDisposeCheck Tool for Sharepoint Objects

SPDisposeCheck is a tool to help you to check your assemblies that use the SharePoint API so that you can build better code. It provides assistance in correctly disposing of certain SharePoint objects to help you follow published best practice. This tool may not show all memory leaks in your code.
Download SPDisposeCheck from

http://code.msdn.microsoft.com/SPDisposeCheck

Path of SpDisposeCheck in system : "c:\Program Files\Microsoft\SharePoint Dispose Check\"
Run the following command against assembly :

c:\>Spdisposecheck "Path of Assembly " >> "output filename with full path"

Best practice notes of SPDisposeCheck , refer below link:
http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx

Regards,
Shobha

Sunday, October 12, 2008

SharePoint Portal Server 2003 Migration to MOSS 2007

Steps for Database Migration :
1. Prescan the 2003 Sharepoint site or database using the following command in 12 hive directory:
Prescan /all : for all sites.
Prescan /v http://SiteUrl : For a single site.
2. Check the logs of prescan, if any errors fix it and prescan again until operation completes without errors.
3. Take the backup of database.
4. Restore the database in Sql Server 2005 at MOSS 2007 environment.
5. Create a web application in central administration (MOSS 2007).
6. Open the command prompt and change to 12 hive directory.
7. Use the stsadm –o addcontentdb Command to upgrade the database:
stsadm.exe -o addcontentdb -url -databasename [-databaseserver ] [-databaseuser ] [-databasepassword ]
It takes time(hours) to upgrade the database depends on the size of database.
That’s it, Operation completed successfully. If not check for errors in log file(Upgrade Log).
Note : SP1 should be installed at Moss 2007 environment before upgrade.