.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Manipulate Site and Farm IDs

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#

On our current site (pre 2010) we use some 3rd party solutions that rely on Site and Farm IDs when they create the licenses.  I have created a 2010 site for development.  I bought all of the necessary licenses from the third party for the 2010 site I am developing. 

The issue is the following;  my boss is the one who deals with the 3rd party.  Every time I break my site and rebuild it from scratch, the Farm ID and Site ID change.  My boss is getting annoyed with having to constantly ask the 3rd party for a new license each time.   

For a variety of reasons, I need to have the 3rd party software up and running, when the development site is working (demos etc.), but I don’t want to be locked into my current site build.  Is there a way to assign the site and farm ids myself so that they match the license.


View Complete Post

More Related Resource Links

FileNotFound exception trying to open a site - Farm.local is Null - x64

  Hello I've created a simple asp.net application to open a site and display the title of the corresponding web. But i'm getting FileNotFoundException while trying to open the site. The same code works perfectly when i run it in a console app. My spec Windows Server 2008 R2 x64 SharePoint 2007 x64 Visual Studio 2005 My target for the asp.net app is set to 'Any CPU'. As far as permissions is considered i've checked that the current identity using which VS2005 hosts the asp.net app has full rights. In fact i've used the same identity for app pools in IIS. As an asp.net web application As a console application Any ideas? Regards NLV Visit SharePoint User group - India

not able to edit page when moved site to a new farm

Hi, I moved my site to a new farm. Now when I tired to edit the page I am getting Page error. I thought its a page layout url issue. I found some broken links for that web site in sharepoint designer, but some pages are giving error which are not listed as a broken url. what should i do to fix this problem? can anybody help me please?    

Same server farm administrator domain account for both Intranet and Internet Sharepoint site?

Hello,   We are planning to setup 2 streams of architecture for both Intranet and Internet web sites. Just wondering whether there is any best practices/security concerns if we are using the same domain account as the Server Farm Administrator for both Intranet and Internet platform?   Thanks,

Unable to access sub site from all farm WFEs

I know there is probably a simple explanation for this, but so far I've not found it.  I'm simply creating a new site collection (sites/subsite) for the default port 80 web application and am able to access it from wfe1, but not from other wfes in the farm. So, the default site collection (/) is already there and can be accessed from any WFE in the farm (i.e. http://wfe1/ http://wfe2, etc..)  No I go to create a new site collection and am using the following URL http://wfe1/sites/subsite.  From WFE1 I can access the new site no problem. But, if I try and go through wfe2, etc. (http://wfe2/sites/subsite), I get an immediate HTTP 404 Not Found error.  I've tried adding alternate access mapping for each wfe in the farm and that seems to work, but doesn't that essentially mean that all request are answered by wfe1? This was not the default behavior in SP7.  What has changed?

Restore Site Collection on a Different Farm with Taxonomy Field



I am trying to restore a site collection from my production environment into a staging environment (completely separate farm).  However, my site collection contains a Pages library which has a taxonomy field that points to a Managed Metadata Service term store in the production environment.  When the site collection is restored in the staging environment, the items in the Pages library have invalid content in the taxonomy field.  Ie. The values are there, but when I try and edit an item, the values in the picker are invalid. 

I have imported the same term set in the term store in the staging environment but it still doesn't work.  I am assuming it is because all of the terms have different guids in each environment so the values are not 'synching' up properly... 

Can I restore the Managed Metedata Service application from my production environment into my staging environment?  Or, am I going about this process in the wrong way entirely?

Thank you for any advice.


How to associate STP file to an existing site in same farm.




single farm


there are 2 web-applications: web-app1, web-app2.


Each webapp has one site collection. that is 


webapp1 has site-collect1


webapp2 has site-collect2


Now for some reason I want to copy site-collect2 to webapp1 as site-collect1.


content-db doesn't work because of database ID issue.


I am trying to use 'save as template' from site-collect2 and can get STP file but how do I assocaite this STP file to site-collect1. I am looking for any STSADM commands or source code that does this. Here also I wanted to create site-template with 'data' but it is giving me error. I will check this later. 

thanks for reading.please suggest.

Create Custom Site Template & Deploy as Farm Solution


So I've seen a few posts and blogs about this, but nothing with the specific error I'm getting.  All I'm trying to do is create a custom site template from an existing site (now WSP), and make that custom template available in CA so I can create host-named site collections from that template in PowerShell.  Apparenly this was a lot easier in 2007, as you could just save your template as STP, and run some stsadm addsolution to get it in the farm.  With 2010, I've read there are 2 options:

  1. Install-SPWebTemplate
  2. Deploy via Visual Studio 2010

I've tried running Install-SPWebTemplate (which only takes CAB files), and NOTHING I do works.  I've created a cab from the WSP with makecab, I've renamed the WSP to CAB, and all I get is "cannot find or parse web template file".  So on to VS2010.

Using this article as a guide (http://msdn.microsoft.com/en-us/library/ff408263.aspx), I created a new 2010 Import existing solution project, left all items selected, and the import was successful.  I made a change or two to the ONET.xml to fix some things, and then I just try to deploy it to the farm.  Whether I set the URL to the root intranet site, or the CA URL, I get deployment conflict errors:

"The URL or

Moving a site from one Farm to Another Farm sharepoint 2010


SharePoint 2010

Is there a way to move a sharepoint site from within a site collection to an already exsisting site collection on another sharepoint farm.

i want to move a site from our development SharePoint site to our production environment.

How to Save a site template to farm and deploy it to new site


Hi all,

When I create a new site and plan to save it as template to create multiple new sites.

Different from MOSS 2007, I cannot find the Save Site as Template option under System Settings. What I did is to type savetmpl.aspx website and save the template.

After that, I tried to use stsadm.exe -o addtemplate command to add the template to farm, but I got another error again!

Cannot find or parse web template file c:\Templates\template.wsp.

I googled a lot websites but only found one related solution to to use stsadm.exe -o addsolution command. But after trying that, I still cannot  see the template when I create new site collection via Sharepoint Central Administration.

Can anyone please help me and let me know how to fix the issue?




moving Team Foundation Server 2010 site to SharePoint 2010 farm.....

What is the best way to move a Team Foundation Server site over to our SharePoint 2010 farm? Can someone please point me to some documentation on how? Thanks,

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Take a tour of your SharePoint site

What is a SharePoint site for?
A SharePoint site is a Web site that provides a central storage and collaboration space for documents, information, and ideas. A SharePoint site is a tool for collaboration, just like a telephone is a tool for communication, or a meeting is a tool for decision making. A SharePoint site helps groups of people (whether work teams or social groups) share information and work together. For example, a SharePoint site can help you:

Coordinate projects, calendars, and schedules.
Discuss ideas and review documents or proposals.
Share information and keep in touch with other people.

Six easy ways to customize your site using Web Parts in SharePoint

Becoming familiar with Web Part customization techniques gives you a range of page-customization choices. For example, you can customize your site's home page so that it displays the specific information that your team needs. You can rearrange the list items on the home page, add lists, and even change the images on the home page. As you become more familiar with Web Part Page customization techniques, you can build interactive Web Part Pages that makes the data in lists more dynamic and useful, and you can add new Web Parts that provide access to external data and Web services.

Tips to Improve Your ASP.NET Web site performance

ASP.NET has been developed with lots of features which makes developer life easy. Start from ViewState, PostBack, Server Controls , User Controls and etc. All of them can make your web development experience fun and easy, but improper use of them can cause your site performance slowdown. Most of the controls generate overhead to the client and server. Therefore in this article, I I will list out about things you can do and don't to improve your ASP.NET website performance.

Easily manipulate data with the GridView control in ASP.NET 2.0

Last week, I introduced ASP.NET 2.0's GridView data control and covered the basics of using it. This week, I go a step further by going into the details of working with the data contained in the control. This includes viewing, editing, and deleting data. Thankfully, the GridView control makes it easy to utilize these features. Before diving into these topics, I begin with an examination of the different field types supported by the GridView control.

SharePoint Application and Site Pages - Part 1 of 2

In this first part of the two part series, Steven covers the differences between Site and Application pages in SharePoint 2007, why each may be used in various circumstances, and prepares for the construction of a menu located application page. After a brief introduction he examines the concept of Site Pages and Application Pages separately in detail with supported screenshots.

SharePoint Application and Site Pages - Part 2 of 2

As the second article in a two part series, Steven examines the attributes and details of a SharePoint 2007 application page, including the construction and feature deployment of the same page based project. Since this is a WSS level objective, as opposed to MOSS, you will not need MOSS to work with the code included in this project. Windows Server 2003, WSS, and Visual Studio 2005 are all that is needed, with no additional add-ons. He provides a detailed analysis of each step involved in the creation and deployment of the project.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend