Friday, October 24, 2008

BDC Sample

Scenario:
A Web service proxy class named SurveyWebServiceProxy contains the following method:

public Survey[] GetSurveys() { 
object[] results = this.Invoke("GetSurveys", null);
return ((Survey[])(results[0]));
}
You create the following method for a Survey entity in a Business Data Catalog (BDC) application definition file:
<Method Name="GetSurveys"> 
<Parameters>
<Parameter Name="Surveys" Direction="Return">
<TypeDescriptor
TypeName="SurveyWebServiceProxy.Survey[], SurveyWebService"
IsCollection="true"
Name="ArrayOfSurvey">
<TypeDescriptors>
<TypeDescriptor TypeName="SurveyWebServiceProxy.Survey, SurveyWebService"
Name="Survey">
<TypeDescriptor TypeName="System.Int32" Name="SurveyID"
IdentifierName="SurveyID"/>
<TypeDescriptor TypeName="System.String" Name="Title"/>
</TypeDescriptor>
<TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
</Method>
Now to return the default view of the Survey entity.

This configuration creates a Finder method. A Finder method is one that returns multiple entity instances. In this scenario, the method returns multiple instances of the Survey entity.
<MethodInstance 
Type="Finder"
ReturnParameterName="Surveys"
Name="GetSurveys"/>
This configuration creates a SpecificFinder method. A SpecificFinder method is one that returns a single entity instance.
<MethodInstance 
Type="SpecificFinder"
ReturnParameterName="Surveys"
Name="GetSurveys"/>
Also keep in mind that an Association element defines an association between two entities.

Getting members of a particular Audience

Scenario:
You need to get all members in an audience named "Finance".

Code:

AudienceManager audienceManager = new AudienceManager();
ArrayList members = audienceManager.Audiences["Public Notaries"].GetMembership();

Create a new SharePoint Virtual PC

Steps:
Creating a new Virtual Machine ( VHD ) from scratch
http://www.pptspaces.com/sharepointreporterblog/Lists/Posts/Post.aspx?ID=28

Hardware :
Laptop/ Desktop ( OS Home Edition is not supported - but will still work , ignore the warnings you get during any installation ) - 2 GB RAM minimum & 20GB free hard disk space

Download Links :

Virtual PC 2007
Virtual PC 2007


Download Windows 2k3 preconfigured VHD


Microsoft .NET Framework Version 2.0 Redistributable Package (x86 or x64)


Microsoft .NET Framework 2.0 Service Pack 1 (x86 or x64)


Microsoft .NET Framework 3.0 Redistributable Package ( File Size should be 54 MB approx ) (Don't download the setup , download from x86 or x64 link depending upon your machine configuration)

SQL Server 2005 Express
or
SQL Server 2005 Standard Trail


Microsoft Office SharePoint Server 2007 Trial Version
( Make sure you register to get the keys for the product above, keys will not be made available on the page if you don't register )

Pre-Configured VHD Downloads ( Does not have Visual Studio installed )

Windows SharePoint Services 3.0 SP1 Developer Evaluation VPC Image ( Comes with Visual Studio 2008 )

Developer Interview questions for SharePoint

Article:

WebParts
http://www.sharepointsecurity.com/blog/sharepoint/sharepoint-2007-development/sharepoint-developer-interview-questions-answers/

Multiple Choice Questions
http://qmoss.blogspot.com/

http://sharepointtests.blogspot.com/

Good overview and Administrative Questions
http://it.toolbox.com/wiki/index.php/Sharepoint_Interview_questions

FAQ Questions

Some more

Interview + Certification Book
http://www.amazon.com/Microsoft-Sharepoint-Interview-Questions-Certification/dp/1933804661

Jobs
http://www.indeed.com/jobs?q=sharepoint&l=

What is GAC ?

The GAC stands for the Global Assembly Cache. It is the machine wide code cache which will give custom binaries place into the full trust code group for SharePoint. Certain SharePoint assets, such as Feature Receivers need full trust to run correctly, and therefore are put into the GAC. You should always try to avoid deployment to the GAC as much as possible since it will possibly allow development code to do more than it was intended to do.

Location : C:\Windows\Assembly

Thursday, October 16, 2008

The path specified cannot be used at this time

Error:
While creating a new Web Application you got following error
The path specified cannot be used at this time. (Exception from HRESULT: 0x80070094)

or

When you try accessing IIS, it tells me that’s it’s not connected to any computer and prompts me to connect. When you type in the computer name it tells me that “The path specified cannot be used at this time.”

Solution:
1. Try IIS Reset.
2. Check the following KB article
http://support.microsoft.com/kb/946517

Wednesday, October 15, 2008

While searching you are not getting results for a particular site or list

Scenario:
Access is denied. Check that the Default Content Access Account has access to this content, or add a crawl rule to crawl this content. (The item was deleted because it was either not found or the crawler was denied access to it.)

Solution:
Access Denied , that means its clearly a Permission Issue.

Few things to try :
1. Check for the Site Collection > Site Settings > Search Visibility > Make sure its set to Yes
2. Check for the List Settings > Advanced Options > Search option should be Yes
3. Make sure Default Content Access account have access to the site. You can check it by logging to the site using that account.
4. Create a new crawl rule for the site with a different account which can access the site.