Your Ad Here

Friday, November 20, 2009

Rational Robot

Rational Robot

1. What is the use of requisite pro?

Using Requisite pro You can store your proj details. You can load all the details you collet from client. SRS, Use Cases, Prototypes, Design....etc.


2. What is the difference between rational robot and QTP or Winrunner? which is more ueful of the three?
Diff b/w Rational Robot and WinRunner is

WinRunner Supports GUI(Graphical User Interface)

Whereas, Rational Robot Supports Both GUI and CUI(Character User Interface)

:-)

3. What is the difference between Rational Robot (Rational Functional Tester)and IBM functional tester?
Which is better?

Ibm rational functional tester extension for terminal applicationis quite superior to any of the solutions avialble for Ibm rational robot

and Ibm functional tester is better than the rational robotRational functional tester when compared to the Rational Robot reduces the scripting effort & time.

Rational functional tester has only 2 verification points whereas the Rational Robot has 13 verification points.

In Rational functional tester scripting is done through simple Java programming where as in Rational robot scripting is done using SQA BAsic language

4. What is UCM?
UCM Means is Unified Change Management.

5. can we do dynamic data verification using rational robot?

what i want to do is use a single data verification point and change its baseline value corresponding to each datapool iteration.
we have done somethins similar using rational functional tester but can we do it using rational robot tester?
i dont want to create baselines manually corresponding to each iteration.
if we have to do coding for the same then can anyone provide me with similar kinda coding?

Answer: Dynamic data verification can be done by using Rational Functional Tester. It has the facility called patteren that helps the testers to change the normal expression into regular one

6. Which is the script used in rational robot?
SQA/VB SCRIPT.

7. What SQABasic commands have you used?

We can use many Sqabasic Command like

Datapool command

1. SQADataPoolOpen()

2.SQADataPoolFetch()

3. SQADataPoolValue()

4.SQADataPoolClose()

For Calling other Script in Script

1. Callscript( "script name" )

8. Difference between SQAgetpropertyArray and SQAGetPropertyAsString?

SQAGetPropertyAsArray - Return type of this function is in the form of array.

SQAGetPropertyAsString - Return type of this function is in the form of String.

9. Is it possible to conduct Unit Testing using with Rational Robot ?
if it is yes, how it is ?
No, it is not possible to conduct unit testing using rational robot since unit testing i.e., white-box testing is carried out by developers. Rational robot is used to carry out either functional or performance testing which forms a part of black_box testing.

10. Can anybody provide code of any sample script in Rational Robot?

*** this is the sample script for login into the application***

//every statement must be within the main

Sub Main

//declare variables through dim satatement. here Result is the default integer type variable
Dim Result As Integer

//single quote (') is comment simbol
'Initially Recorded: 7/19/2006 12:41:57 PM
'Script Name: abc

StartApplication """C:Program FilesRationalRational TestSample ApplicationsClassics OnlineClassicsA.exe"""

Window SetContext, "Name=frmExistingLogin", ""
//choosing a user name from a combo box
ComboBox Click, "Name=lstUserName", "Coords=142,9"
ComboListBox Click, "ObjectIndex=1", "Text=Susan Flontly"
//giving password through keyboard
EditBox Click, "Name=txtPassword", "Coords=105,13"
InputKeys "prakash"
PushButton Click, "Name=cmdOK"

End Sub

11. How do we connect to database using Rational Robot?

1. First we need to create script for single use test

2. Datapools are created

3. Script are edited whih will work for large number of data

12. What is the difference between GUI Scripts and VU scripts in Rational Robot?

GUI script is for functional testing. VU and VB scripts are for performance testing.

GUI Scripts: Used to play back the GUI activities you record.

VU scripts ? Used to play back the client/server requests you record during performance testing sessions.

13. What is a datapool? what it contains ? how do we create a datapool?briefly give the explanation

Datapool in rational robot is used to replace single or fixed value with multiple values in single recording instead of doing recording several times for different input datas.

U have to create a script by doing recording .

Select a field in the application for which u want to create a datapool.And goto the test manager Click the tools menu->manage->Datapools to create datapool follow the windows and enter the appropriate Datapool name,Field name its datatype .

And Enter the multiple values u want to replace in that field. Modify ur script by adding few statements in it saying about the datapool creation for the field in ur script.

And when u execute ur script u can c the application opening many times and the appropriate field is getting replaced with multiple values given by u.

14. What are two types of script recording in rational robot?

There are two types of recording in rational

1] Low level recording

2] High level recording

15. How to capture a window using verification point?

u also can use window existence verification point to capture an existance window.
This verification point verifies the existence and status of specified window during the play back.

16. Can anyone please tell me the exact difference b/w Rational Functional Tester and Rational Robot.
What i think is that RFT is more advanced then Robot.

If you are testing a Java, .NET, Web, or browser-based application RFT (Rational Functional Testger) is the right tool.

If you are testing Visual Basic, C++, or other Windows 32-bit applications, (RFT) Rational Functional Tester is not the tool for you, you can use Rational Robot.

17. In which directory are the .sbl files stored?

They are stored in source code file and contain procedure defitions to use in the scripts file.

18. What do .sbl and .sbh represent?

sbl represents as library file. this file will contain all the detailed level coding of your function which you declared in your header file.

.sbh represents as header file, this file will have all the functions declarations.

19. may I know is there any Load testing tool called Rational Site Load tool,where can I get the information from and is the tool is similar to that of Load Runner,and also tell me the similarities and differences in that tool.....?

There is no tool named Rational Site Load Tool. You can use "Rational Performance Tester" , Else "Rational Robot". By using Rational Robot we can do Functional as well as performance testing also.

20. Which Corelation Functions have you used?

we used the following funciton for correlation

web_reg_save_param

for ex: web_reg_save_param("outFlightVal", "LB=outboundFlight value=", "RB= checked >", LAST);

21. how do you perform dynamic object testing using robo
scenario;
enter any number b/w 1 to 100 in an edit box, there is command buton, on click of cmd button, if you enter 50, 50 comboxes should be dispalyed, how do you test this??
ANSWER:Use SQAGetChildren and obtain child count / child names before clicking the cmd button - after clicking the button obtain the list of children again and compare.If recognition strings of the combo boxes follows a fixed pattern i.e. cmbBox1, cmbBox2,... use string concaenation and SQAfindObject to test their existence

22. Can anybody provide code of any sample script in Rational Robot?

Look at Robot help - lot of sample scripts there.

23. Is it possible to have an executable for the script that is made in Rational Robot? Is the script able to take arguements?

You can have a .BAT file that opens up Robot and executes the necessary script - as such no packaging is provided to make the scripts directly executable.You can write your own functions that wrap CallScript command and accepts args and sets some global values- there by achieveing passing args to scripts

24. How do we create or retrieve libary file from Verification point? Is it possible?

if you are looking to obtain the location of the lib files use standard Robot varialbes SQAGetDir (something like that - look in robot help) etc..but if you want the location of a verification point file (actual / baseline) use SQAGetActualVPFile, SQAGetBaaselinefile etc. (not exact names)


Monday, November 9, 2009

SharPoint Server

what is SharePoint?
Portal Collaboration Software.
SharePoint is an enterprise information portal, from Microsoft, that can be configured to run Intranet, Extranet and Internet sites. Microsoft Office SharePoint Server 2007 allows people, teams and expertise to connect and collaborate. A SharePoint enterprise portal is composed of both SharePoint Portal and Windows SharePoint Services, with SharePoint being built upon WSS. WSS is typically used by small teams, projects and companies. SharePoint Server is designed for individuals, teams and projects within a medium to large company wide enterprise portal.

Why should you use SharePoint?
• As companies grow so does the amount of their files. It soon becomes difficult to keep track of the multiplying documents and their locations. SharePoint overcomes this by allowing you to store and share your files in a central site.
• Sharing work files through email is a cumbersome process. SharePoint eliminates this by allowing files to be stored in one location, allowing easy access to all team members.
• Business Intelligence has traditionally remained in the hands of a few key decision makers within organizations. For years, it has been the goal of BI providers to “democratize business intelligence” by making it available to all levels of workers throughout companies. With the addition of PerformancePoint to the SharePoint Enterprise version of SharePoint, this vision is realized, finally taking business intelligence out of the hands of the few and into the hands of many.
• Today’s work occurs over multiple locations, whether it is in different countries, office locations, separate departments or at your home office. SharePoint enables teams and individuals to connect and collaborate together regardless of where they are located.
• Surveys have shown that employees can spend up to 20 – 30 % of their day searching for data and information. SharePoint eliminates this drag on productivity by providing the robust search functionality needed to find the information and expertise buried in the thousands, or hundreds of thousands of files a company generates in the course of business.
• It’s difficult and time consuming to create and maintain sites. SharePoint allows anyone to create sites for use within their company’s Intranet, as they are needed, whether they are departmental sites, document libraries, meetings sites, survey sites, or discussion boards.

what is the difference between SharePoint Portal Server and Windows SharePoint Services?
SharePoint Portal Server is the global portal offering features like global navigation and searching. Windows SharePoint Services is more content management based with document libraries and lists. You apply information to certain areas within your portal from Windows SharePoint Services or directly to portal areas.

what is a document library?
A document library is where you upload your core documents. They consist of a row and column view with links to the documents. When the document is updated so is the link on your site. You can also track metadata on your documents. Metadata would consist of document properties.

what is a meeting workspace?
A meeting workspace is a place to store information, attendees, and tasks related to a specific meeting.

what is a document workspace?
Document workspaces consist of information surrounding a single or multiple documents.

what is a web part?
Web parts consist of xml queries to full SharePoint lists or document libraries. You can also develop your own web parts and web part pages.

what is the difference between a document library and a form library?
Document libraries consist of your core documents. An example would be a word document, excel, powerpoint, visio, pdf, etc… Form libraries consist of XML forms.

what is a web part zone?
Web part zones are what your web parts reside in and help categorize your web parts when designing a page.

how is security managed in SharePoint?
Security can be handled at the machine, domain, or sharepoint level.

how are web parts developed?
Web parts are developed in Visual Studio .Net. VS.Net offers many web part and page templates and can also be downloaded from the Microsoft site.

what is a site definition?
It’s a methods for providing prepackaged site and list content.

what is a template?
A template is a pre-defined set of functions or settings that can be used over time. There are many templates within SharePoint, Site Templates, Document Templates, Document Library and List Templates.

how do you install web parts?
Web Parts should be distributed as a .CAB (cabinet) file using the MSI Installer.

what is CAML?
tands for Collaborative Application Markup Language and is an XML-based language that is used in Microsoft Windows SharePoint Services to define sites and lists, including, for example, fields, views, or forms, but CAML is also used to define tables in the Windows SharePoint Services database during site provisioning.

what is a DWP?
The file extension of a web part.

what is the GAC?
Global Assembly Cache folder on the server hosting SharePoint. You place your assemblies there for web parts and services.

what are the differences between web part page gallery, site gallery, virtual server gallery and online gallery?
Web Part Page Gallery is the default gallery that comes installed with SharePoint. Site Gallery is specific to one site. Virtual Server gallery is specific to that virtual server and online gallery are downloadable web parts from Microsoft.
what is the difference between a site and a web?
The pages in a Web site generally cover one or more topics and are interconnected through hyperlinks. Most Web sites have a home page as their starting point. While a Web is simply a blank site with SharePoint functionality built in; meaning you have to create the site from the ground up.

What is Microsoft Windows SharePoint Services? How is it related to Microsoft Office SharePoint Server 2007?
Windows SharePoint Services is the solution that enables you to create Web sites for information sharing and document collaboration. Windows SharePoint Services — a key piece of the information worker infrastructure delivered in Microsoft Windows Server 2003 — provides additional functionality to the Microsoft Office system and other desktop applications, and it serves as a platform for application development.
Office SharePoint Server 2007 builds on top of Windows SharePoint Services 3.0 to provide additional capabilities including collaboration, portal, search, enterprise content management, business process and forms, and business intelligence.

What is Microsoft SharePoint Portal Server?
SharePoint Portal Server is a portal server that connects people, teams, and knowledge across business processes. SharePoint Portal Server integrates information from various systems into one secure solution through single sign-on and enterprise application integration capabilities. It provides flexible deployment and management tools, and facilitates end-to-end collaboration through data aggregation, organization, and searching. SharePoint Portal Server also enables users to quickly find relevant information through customization and personalization of portal content and layout as well as through audience targeting.

What is Microsoft Windows Services?
Microsoft Windows Services is the engine that allows administrators to create Web sites for information sharing and document collaboration. Windows SharePoint Services provides additional functionality to the Microsoft Office System and other desktop applications, as well as serving as a plat form for application development. SharePoint sites provide communities for team collaboration, enabling users to work together on documents, tasks, and projects. The environment for easy and flexible deployment, administration, and application development.

What is the relationship between Microsoft SharePoint Portal Server and Microsoft Windows Services?
Microsoft SharePoint Products and Technologies (including SharePoint Portal Server and Windows SharePoint Services) deliver highly scalable collaboration solutions with flexible deployment and management tools. Windows SharePoint Services provides sites for team collaboration, while Share Point Portal Server connects these sites, people, and business processes—facilitating knowledge sharing and smart organizations. SharePoint Portal Server also extends the capabilities of Windows SharePoint Services by providing organizational and management tools for SharePoint sites, and by enabling teams to publish information to the entire organization.

Who is Office SharePoint Server 2007 designed for?
Office SharePoint Server 2007 can be used by information workers, IT administrators, and application developers.
is designed

What are the main benefits of Office SharePoint Server 2007?
Office SharePoint Server 2007 provides a single integrated platform to manage intranet, extranet, and Internet applications across the enterprise.
* Business users gain greater control over the storage, security, distribution, and management of their electronic content, with tools that are easy to use and tightly integrated into familiar, everyday applications.
* Organizations can accelerate shared business processes with customers and partners across organizational boundaries using InfoPath Forms Services–driven solutions.
* Information workers can find information and people efficiently and easily through the facilitated information-sharing functionality and simplified content publishing. In addition, access to back-end data is achieved easily through a browser, and views into this data can be personalized.
* Administrators have powerful tools at their fingertips that ease deployment, management, and system administration, so they can spend more time on strategic tasks.
* Developers have a rich platform to build a new class of applications, called Office Business Applications, that combine powerful developer functionality with the flexibility and ease of deployment of Office SharePoint Server 2007. Through the use of out-of-the-box application services, developers can build richer applications with less code.

What is the difference between Microsoft Office SharePoint Server 2007 for Internet sites and Microsoft Office SharePoint Server 2007?
Microsoft Office SharePoint Server 2007 for Internet sites and Microsoft Office SharePoint Server 2007 have identical feature functionality. While the feature functionality is similar, the usage rights are different.
If you are creating an Internet, or Extranet, facing website, it is recommended that you use Microsoft Office SharePoint Server 2007 for Internet sites which does not require the purchase client access licenses. Websites hosted using an “Internet sites” edition can only be used for Internet facing websites and all content, information, and applications must be accessible to non-employees. Websites hosted using an “Internet sites” edition cannot be accessed by employees creating, sharing, or collaborating on content which is solely for internal use only, such as an Intranet Portal scenario. See the previous section on licensing for more information on the usage scenarios.

What suites of the 2007 Microsoft Office system work with Office SharePoint Server 2007?
Office Outlook 2007 provides bidirectional offline synchronization with SharePoint document libraries, discussion groups, contacts, calendars, and tasks.
Microsoft Office Groove 2007, included as part of Microsoft Office Enterprise 2007, will enable bidirectional offline synchronization with SharePoint document libraries.
Features such as the document panel and the ability to publish to Excel Services will only be enabled when using Microsoft Office Professional Plus 2007or Office Enterprise 2007.
Excel Services will only work with documents saved in the new Office Excel 2007 file format (XLSX).

How do I invite users to join a Windows SharePoint Services Site? Is the site secure?
SharePoint-based Web sites can be password-protected to restrict access to registered users, who are invited to join via e-mail. In addition, the site administrator can restrict certain members' roles by assigning different permission levels to view post and edit.

Can I post any kind of document?
You can post documents in many formats, including .pdf, .htm and .doc. In addition, if you are using Microsoft Office XP, you can save documents directly to your Windows SharePoint Services site.

Can I download information directly from a SharePoint site to a personal digital assistant (PDA)?
No you cannot. However, you can exchange contact information lists with Microsoft Outlook.

How long does it take to set up the initial team Web site?
It only takes a few minutes to create a complete Web site. Preformatted forms let you and your team members contribute to the site by filling out lists. Standard forms include announcements, events, contacts, tasks, surveys, discussions and links.

Can I create custom templates?
Yes you can. You can have templates for business plans, doctor's office, lawyer's office etc.
How can I make my site public? By default, all sites are created private.
If you want your site to be a public Web site, enable anonymous access for the entire site. Then you can give out your URL to anybody in your business card, e-mail or any other marketing material. The URL for your Web site will be:
http:// yoursitename.wss.bcentral.com
Hence, please take special care to name your site.
These Web sites are ideal for information and knowledge intensive sites and/or sites where you need to have shared Web workspace.
Remember: Under each parent Web site, you can create up to 10 sub-sites each with unique permissions, settings and security rights.

How do the sub sites work?
You can create a sub site for various categories. For example:
* Departments - finance, marketing, IT
* Products - electrical, mechanical, hydraulics
* Projects - Trey Research, Department of Transportation, FDA
* Team - Retention team, BPR team
* Clients - new clients, old clients
* Suppliers - Supplier 1, Supplier 2, Supplier 3
* Customers - Customer A, Customer B, Customer C
* Real estate - property A, property B
The URLs for each will be, for example:
* http://yoursitename.wss.bcentral.com/finance
* http://yoursitename.wss.bcentral.com/marketing
You can keep track of permissions for each team separately so that access is restricted while maintaining global access to the parent site.

How do I make my site non-restricted?
If you want your site to have anonymous access enabled (i.e., you want to treat it like any site on the Internet that does not ask you to provide a user name and password to see the content of the site), follow these simple steps:
# Login as an administrator
# Click on site settings
# Click on Go to Site Administration
# Click on Manage anonymous access
# Choose one of the three conditions on what Anonymous users can access:
** Entire Web site
** Lists and libraries
** Nothing
Default condition is nothing; your site has restricted access. The default conditions allow you to create a secure site for your Web site.

Can I get domain name for my Web site?
Unfortunately, no. At this point, we don't offer domain names for SharePoint sites. But very soon we will be making this available for all our SharePoint site customers. Please keep checking this page for further update on this. Meanwhile, we suggest you go ahead and set up your site and create content for it.

What are picture libraries?
Picture libraries allow you to access a photo album and view it as a slide show or thumbnails or a film strip. You can have separate folder for each event, category, etc
What are the advantages of a hosted SharePoint vs. one that is on an in-house server?
* No hardware investment, i.e. lower costs
* No software to download - ready to start from the word go
* No IT resources - Anyone who has used a Web program like Hotmail can use it
* Faster deployment

Can I ask users outside of my organization to participate in my Windows SharePoint Services site?
Yes. You can manage this process using the Administration Site Settings. Simply add users via their e-mail alias and assign permissions such as Reader or Contributor.
Are there any IT requirements or downloads required to set up my SharePoint site?
No. You do not need to download any code or plan for any IT support. Simply complete the on-line signup process and provide us your current and correct email address. Once you have successfully signed up and your site has been provisioned, we will send a confirmation to the email address you provided.

I am located outside of the United States. Are there any restrictions or requirements for accessing the Windows SharePoint Services?
No. There are no system or bandwidth limitations for international trial users. Additionally language packs have been installed which allow users to set up sub-webs in languages other than English. These include: Arabic, Danish, Dutch, Finnish, French, German, Hebrew, Italian, Japanese, Polish, Portuguese (Brazilian), Spanish and Swedish.

Are there any browser recommendations?
Yes. Microsoft recommends using the following browsers for viewing and editing Windows SharePoint Services sites: Microsoft Internet Explorer 5.01 with Service Pack 2, Microsoft Internet Explorer 5.5 with Service Pack 2, Internet Explorer 6, Netscape Navigator 6.2 or later.

What security levels are assigned to users?

Security levels are assigned by the administrator who is adding the user. There are four levels by default and additional levels can be composed as necessary.
* Reader - Has read-only access to the Web site.
* Contributor - Can add content to existing document libraries and lists.
* Web Designer - Can create lists and document libraries and customize pages in the Web site.
* Administrator - Has full control of the Web site.

How secure are Windows SharePoint Services sites hosted by Microsoft?
Microsoft Windows SharePoint Services Technical security measures provide firewall protection, intrusion detection, and web-publishing rules. The Microsoft operation center team tests and deploys software updates in order to maintain the highest level of security and software reliability. Software hot-fixes and service packs are tested and deployed based on their priority and level of risk. Security related hot-fixes are rapidly deployed into the environment to address current threats. A comprehensive software validation activity ensures software stability through regression testing prior to deployment.

What is the difference between an Internet and an intranet site?
An internet site is a normal site that anyone on the internet can access (e.g., www.msn.com, www.microsoft.com, etc.). You can set up a site for your company that can be accessed by anyone without any user name and password.
An intranet (or internal network), though hosted on the Web, can only be accessed by people who are members of the network. They need to have a login and password that was assigned to them when they were added to the site by the site administrator.

What is a workspace?
A site or workspace is when you want a new place for collaborating on Web pages, lists and document libraries. For example, you might create a site to manage a new team or project, collaborate on a document or prepare for a meeting.
What are the various kinds of roles the users can have?
A user can be assigned one of the following roles
* Reader - Has read-only access to the Web site.
* Contributor - Can add content to existing document libraries and lists.
* Web Designer - Can create lists and document libraries and customize pages in the Web site.
* Administrator - Has full control of the Web site.

Can more than one person use the same login?
If the users sharing that login will have the same permissions and there is no fear of them sharing a password, then yes. Otherwise, this is discouraged.

How customizable is the user-to-user access?
User permissions apply to an entire Web, not to documents themselves. However, you can have additional sub webs that can optionally have their own permissions. Each user can be given any of four default roles. Additional roles can be defined by the administrator.

Can each user have access to their own calendar?
Yes there are two ways to do this,
* by creating a calendar for each user, or
* by creating a calendar with a view for each user

How many files can I upload?
There is no restriction in place except that any storage consumed beyond that provided by the base offering may have an additional monthly charge associated with them.

What types of files can I upload / post to the site?
The only files restricted are those ending with the following extensions: .asa, .asp, .ida, .idc, .idq. Microsoft reserves the right to add additional file types to this listing at any time. Also, no content that violates the terms of service may be uploaded or posted to the site.

Can SharePoint be linked to an external data source?
SharePoint data can be opened with Access and Excel as an external data source. Thus, SharePoint can be referenced as an external data source. SharePoint itself cannot reference an external data source.

Can SharePoint be linked to a SQL database?
This is possible via a custom application, but it not natively supported by SharePoint or SQL Server.

Can I customize my Windows SharePoint Services site?
YES! Windows SharePoint Services makes updating sites and their content from the browser easier then ever.
SharePoint includes tools that let you create custom lists, calendars, page views, etc. You can apply a theme; add List, Survey and Document Library Web Parts to a page; create personal views; change logos; connect Web Parts and more.
To fully customize your site, you can use Microsoft FrontPage 2003. Specifically, you can use FrontPage themes and shared borders, and also use FrontPage to create photo galleries and top ten lists, utilize standard usage reports, and integrate automatic Web content.
Will Microsoft Office SharePoint Server 2007 run on a 64-bit version of Microsoft Windows?
Windows SharePoint Services 3.0, Office SharePoint Server 2007, Office Forms Server 2007, and Office SharePoint Server 2007 for Search will support 64-bit versions of Windows Server 2003.

How Office SharePoint Server 2007 can help you?
Office SharePoint Server 2007 can help us:
Manage content and streamline processes. Comprehensively manage and control unstructured content like Microsoft Office documents, Web pages, Portable Document Format file (PDF) files, and e-mail messages. Streamline business processes that are a drain on organizational productivity.
Improve business insight. Monitor your business, enable better-informed decisions, and respond proactively to business events.
Find and share information more simply. Find information and expertise wherever they are located. Share knowledge and simplify working with others within and across organizational boundaries.
Empower IT to make a strategic impact. Increase responsiveness of IT to business needs and reduce the number of platforms that have to be maintained by supporting all the intranet, extranet, and Web applications across the enterprise with one integrated platform.
Office SharePoint Server 2007 capabilities can help improve organizational effectiveness by connecting people, processes, and information.
Office SharePoint Server 2007 provides these capabilities in an integrated server offering, so your organization doesn't have to integrate fragmented technology solutions itself.
What are the features that the portal components of Office SharePoint Server 2007 include?
The portal components of Office SharePoint Server 2007 include features that are especially useful for designing, deploying, and managing enterprise intranet portals, corporate Internet Web sites, and divisional portal sites. The portal components make it easier to connect to people within the organization who have the right skills, knowledge, and project experience.

What are the advanced features of MOSS 2007?
* User Interface (UI) and navigation enhancements
* Document management enhancements
* The new Workflow engine
* Office 2007 Integration
* New Web Parts
* New Site-type templates
* Enhancements to List technology
* Web Content Management
* Business Data Catalog
* Search enhancements
* Report Center
* Records Management
* Business Intelligence and Excel Server
* Forms Server and InfoPath
* The “Features” feature
* Alternate authentication providers and Forms-based authentication

What are the features of the new Content management in Office SharePoint 2007?
The new and enhanced content management features in Office SharePoint Server 2007 fall within three areas:
* Document management
* Records management
* Web content management
Office SharePoint Server 2007 builds on the core document management functionality provided by Windows SharePoint Services 3.0, including check in and check out, versioning, metadata, and role-based granular access controls. Organizations can use this functionality to deliver enhanced authoring, business document processing, Web content management and publishing, records management, policy management, and support for multilingual publishing.

Does a SharePoint Web site include search functionality?
Yes. SharePoint Team Services provides a powerful text-based search feature that helps you find documents and information fast.
Write the features of the search component of Office SharePoint Server 2007?
The search component of Office SharePoint Server 2007 has been significantly enhanced by this release of SharePoint Products and Technologies. New features provide:
* A consistent and familiar search experience.
* Increased relevance of search results.
* New functions to search for people and expertise.
* Ability to index and search data in line-of-business applications and
* Improved manageability and extensibility.

What are the benefits of Microsoft Office SharePoint Server 2007?
* Provide a simple, familiar, and consistent user experience.
* Boost employee productivity by simplifying everyday business activities.
* Help meet regulatory requirements through comprehensive control over content.
* Effectively manage and repurpose content to gain increased business value.
* Simplify organization-wide access to both structured and unstructured information across disparate systems.
* Connect people with information and expertise.
* Accelerate shared business processes across organizational boundaries.
* Share business data without divulging sensitive information.
* Enable people to make better-informed decisions by presenting business-critical information in one central location.
* Provide a single, integrated platform to manage intranet, extranet, and Internet applications across the enterprise.

Will SharePoint Portal Server and Team Services ever merge?
The products will come together because they are both developed by the Office team.

What does partial trust mean the Web Part developer?
If an assembly is installed into the BIN directory, the code must be ensured that provides error handling in the event that required permissions are not available. Otherwise, unhandled security exceptions may cause the Web Part to fail and may affect page rendering on the page where the Web Part appears.

How can I raise the trust level for assemblies installed in the BIN directory?
Windows SharePoint Services can use any of the following three options from ASP.NET and the CLR to provide assemblies installed in the BIN directory with sufficient permissions. The following table outlines the implications and requirements for each option.
Option Pros Cons
Increase the trust level for the entire virtual server. For more information, see "Setting the trust level for a virtual server" Easy to implement.
In a development environment, increasing the trust level allows you to test an assembly with increased permissions while allowing you to recompile assemblies directly into the BIN directory without resetting IIS. This option is least secure.
This option affects all assemblies used by the virtual server.
There is no guarantee the destination server has the required trust level. Therefore, Web Parts may not work once installed on the destination server.
Create a custom policy file for your assemblies. For more information, see "How do I create a custom policy file?" Recommended approach.
This option is most secure.
An assembly can operate with a unique policy that meets the minimum permission requirements for the assembly.
By creating a custom security policy, you can ensure the destination server can run your Web Parts.
Requires the most configuration of all three options.
Install your assemblies in the GAC
Easy to implement.
This grants Full trust to your assembly without affecting the trust level of assemblies installed in the BIN directory.
This option is less secure.
Assemblies installed in the GAC are available to all virtual servers and applications on a server running Windows SharePoint Services. This could represent a potential security risk as it potentially grants a higher level of permission to your assembly across a larger scope than necessary
In a development environment, you must reset IIS every time you recompile assemblies.
Licensing issues may arise due to the global availability of your assembly.

Does SharePoint work with NFS?
Yes and no. It can crawl documents on an NFS volume, but the sharepoint database or logs cannot be stored there.

How is SharePoint Portal Server different from the Site Server?
Site Server has search capabilities but these are more advanced using SharePoint. SPS uses digital dashboard technology which
provides a nice interface for creating web parts and showing them on dashboards (pages). SS doesn't have anything as advanced as that. The biggest difference would be SPS document management features which also integrate with web folders and MS Office.
What would you like to see in the next version of SharePoint?
A few suggestions:
# SPS and STS on same machine
# Tree view of Categories and Folders
# General Discussion Web Part
# Personalization of Dashboards
# Role Customization
# Email to say WHY a document has been rejected for Approval
# More ways to customize the interface
# Backup and restore an individual Workspaces
# Filter for Visio
# Better way to track activity on SPS

Why Sharepoint is not a viable solution for enterprise wide deployments?
Document management does not scale beyond a single server, but scales great within a single server. For example, a quad Xeon machine with 4GB of RAM works great for a document management server that has about 900,000 - 1,000,000 document, but if you need to store 50,000,000 document and want to have them all in one single workspace then it does not scale at all. If you need a scenario like this, you need to plan your deployment right and it should scale for you, it just does not right out of the box.
If you are using your server as a portal and search server most for the most part it scales great. You can have many different servers crawl content sources and have separate servers searching and serving the content.
If you have < 750,000 documents per server and fewer than 4 content sources and fewer than 50,000 users, SPS should scale just fine for your needs with the proper planning.

What are the actual advantages of SharePoint Portal Services (SPS) over SharePoint Team Services (STS)?
SharePoint Portal Services (SPS) has MUCH better document management. It has check-in, check-out, versioning, approval, publishing, subscriptions, categories, etc. STS does not have these features, or they are very scaled back. SharePoint team Services (SPS) has a better search engine, and can crawl multiple content sources. STS cannot. STS is easier to manage and much better for a team environment where there is not much Document Management going on. SPS is better for an organization, or where Document Management is crucial.

How Does SharePoint work?
The browser sends a DAV packet to IIS asking to perform a document check in. PKMDASL.DLL, an ISAPI DLL, parses the packet and sees that it has the proprietary INVOKE command. Because of the existence of this command, the packet is passed off to msdmserv.exe, who in turn processes the packet and uses EXOLEDB to access the WSS, perform the operation and send the results back to the user in the form of XML.

How do I open an older version of a document?
Normally, all previous versions are located in the shadow, so if you right click a published document from within the web folders, go to properties and then the third tab, versions you can view older versions.
If you want to do this in code:

strURL = "url of the last published version"
Set oVersion = New PKMCDO.KnowledgeVersion
Set prmRs = oVersion.VersionHistory(strURL)
Set oVersion = Nothing

prmRS will contain a recordset, which contains the url to the old versions in the shadow.

Why do the workspace virtual directories show the error “stop sign” symbol in the IIS snap-in?
If World Wide Web Publishing Service (W3SVC) starts before Microsoft Exchange Information Store (MSExchangeIS), “stop sign” symbols appear under the Default Web Site folder of the Internet Information Services console in Microsoft Management Console (MMC).
There is a dependency between the local paths of the SharePoint Portal Server virtual directories and the MSExchangeIS. You must start MSExchangeIS first, followed by W3SVC.
Complete the following steps to prevent the stop signs from appearing each time you restart:
# Change the Startup type for W3SVC to Manual.
# Restart the server. The MSExchangeIS service starts automatically.
# Start W3SVC.

What is SharePoint from a Technical Perspective?
Technically SharePoint illustrates neatly what Microsoft's .net strategy is all about: integrating Windows with the Web. Microsoft has previously made accessing stuff on a PC easier, (Windows) then on a network (NT) and now on the web (.NET). SharePoint is an application written to let a user access a web accessible directory tree called the Web Storage System.
SharePoint was written with a set of technologies that allow the programmer to pass data, functions, parameters over HTTP, the web's medium. These are XML, XSL and SOAP, to name a few I understand the basics of!
To the user it looks easy, like Hotmail, but every time they click a button or a link, a lot has to happen behind the scenes to do what they want to do quickly and powerfully. Not as easy as you might think, but SharePoint does it for you. Accessing this Web storage system and the server itself is also done using technologies like ADO, CDO, PKMCDO, LDAP, DDSC, ADSC. More on these later. SharePoint is a great example of how the Internet Platform can be extended and integrated into an existing well adopted technology, Windows.

What is SharePoint from an Administration Perspective?
Administering SharePoint mainly consists of setting it up, which is much easier than you expect, adding the content, which can be just dragging and dropping in whole directory structures and files, and then organizing the files better by giving them categories or other metadata. This is done either through the Web interface or through the SharePoint Client: a program what means you can access SharePoint as a Web folder and then right-click files to select options like "edit profile". Or add files by dragging them in individually or in bulk.
Setting the security is also important, using NT accounts, either NT4 or Active Directory (or both in mixed mode) you can give users access to files/folders the same way as you do in standard Windows. Users can be grouped and the groups given access privileges to help manage this better. Also SharePoint has 3 Roles that a User or Group can be given on a particular item. Readers can see the item (i.e. document/file or folder) but not change it, Authors can see and edit items and coordinators can set security privileges for the part of the system they have control over. Thus, you could set 12 different coordinators for 12 different folder trees, and they could manage who can do what within that area only.

What is SharePoint from a Users Perspective?
From a Users perspective SharePoint is a way of making documents and folders on the Windows platform accessible over the web. The user visits the SharePoint Portal web page, and from there they can add documents, change documents & delete documents. Through this Portal, these documents are now available for discussion, collaboration, versioning and being managed through a workflow. Hence the name "Share-Point". Details about the document can be saved too, such as: who wrote it, when, for whom, its size, and version, category or target audience. These can then be used to find the document through SharePoint's Search facility. Even documents not "in" SharePoint can be included in the search engine's index so they become part of the portal. All in all, it's a great way to get stuff up on the web for users with average technical skills, and for administrators to manage the content.

What are the various Sharepoint 2003 and Exchange integration points?
Link to Outlook
This is a button on contacts or events lists that lets Outlook 2003 add a pst file named Sharepoint Folders and it links to the data on the site. It’s read-only, but you could make the home page for that PST be the Sharepoint site for easier viewing. The link to outlook feature seems more to be where some can public a calendar, but not want too much collaboration. For example, a holiday schedule, company meeting schedule, etc, can be made available for people to be able to view from Outlook without having to go to a web browser. Another nice thing about OL2K3 is that you can compare these calendars with others side by side.
Searching Public Folders
With SPS you can index Exchange’s public folders with the search engine so that all that precious public folder content is searchable. You’ll want to look at content sources and indexing in Sharepoint administration.
Displaying Public Folders in a web part
Since exchange web-enables public folders, you can create a web part that displays that content. IE, http://exchangeserver/Public/IT/Helpdesk will display the IT/Helpdesk public folder via OWA. So you add the Page Viewer web part to a page and point it at that URL. The key here is to add ?cmd=contents to the end of the url if you don’t want the navigator pane on the left.
Smart web parts
Some of the web parts that come with SPS allow you to add a web part to a page that actually takes the users outlook info (calendar, inbox, contacts, tasks) and put them into the page.

Can SharePoint compare two document versions?
"In Word 2003, you can compare documents side by side. Open two documents. Then, from the Window menu of one of them, select the Compare Side By Side command. If you have only two documents open, the command will automatically choose to compare them. If you have three or more documents open, you'll have to select which document to compare with the current file.
A floating toolbar with two buttons will open. If the button on the left is selected, Word will scroll both documents at the same time. Press the button on the right side of the toolbar to return to where the cursor was located when you started comparing."
What are the integration differences between SPS 2003 and the various Office versions?
SPS webpage can detect you have installed the Office 2003 and run local dll to implement some SPS function, e.g. multi-file upload only works when you have office 2003 installed.
Integration with Office XP is gone.
You will get guys telling you that you can integrate with SPSv2 if you install a backwards compatible document library - but that’s really just putting a bit of SPS 2001 on the server.
Believe me, check-in, check-out, which are themselves very basic, are not available from inside Office XP, or even from the context menu in Windows Explorer.
The ONLY option you have is to use the web interface to check-in or check-out.

Can Group Approval be used in conjunction with other workflows?
Microsoft Office SharePoint Server 2007 provides solutions that support many possible workflows within the organization as well as Group Approval. For more information on supported workflows, see Help for each of those. However, Group Approval cannot share the same document library with other workflow solutions because it uses a document library exclusively. A separate document library needs to be created on the Team Site to use other workflow solutions.
In other words, even though you choose to add other workflows on the Customize My Approval page which is specified page of Group Approval, the added workflows will not work properly.

Both the Site Collection features group and the Site features group have a button that activates
the Group Approval. How are the two buttons different?
To ensure that Group Approval works properly, you must activate Group Approval feature on the Site Collection features page first and then on the Site features page.
If the solution is activated on the Site features page first, Group Approval will not work properly. To deactivate Group Approval, follow the sequence in reverse.
Note Group Approval can be activated only in the top level site of a site collection.

Can I change the screen configuration of Group Approval? Can I also create and add a new view? Can I add Web Part of Group Approval?
Changing or deleting the existing view may cause Group Approval to malfunction. If you encounter a problem after modifying the view, deactivate Group Approval and activate Group Approval again to fix the problem. Web Parts for Group Approval such as Web Parts for My Approval document library and Document ID Log Report list are available but because some of them require a higher permission to access, test the page with various permission levels before publishing the web site.
Note Avoid editing views by using SharePoint Designer or Edit Page function.

Can I add a new column on the screen?
While adding a new column to show on the default views — Personal Folders, For Approval, Proposed by Me, Rejected for Me, and Approved by Me — is not allowed, you can create and add a new column to admin view.
You can create a new column in the Columns folder on the Customize My Approval page, and then add it to the admin view in the Views folder.

Does the stamp guarantee identity of the submitter and the signer?
It is possible to forge the image of a stamp. Therefore, there is a limit to guarantee the actual signer's identity. Click the stamp displayed on the screen and right click the mouse button, and then click Signature Information. In the Signature Information dialog box, click View to see detailed information about the certificate used when it is signed. The certificate is more trustworthy than the stamp image, however, there is yet a limit to guarantee the actual signer's identity according to the reliability of the publishing company or certificate sharing policy. Therefore, administrator must build the enterprise reliable certificate system. For more details, see Help for certificate in Windows Server Help.
Note Group Approval monitors all the workflow process and verifies the users based on users' account information. A user without proper permission and account cannot participate in the approval process.

I understand that Group Approval is based on a document library from Microsoft Office SharePoint Server. Does it require any special attention in administration?
Yes, Group Approval is based on a document library from Microsoft Office SharePoint Server. Every document library has the Customize document library name page for managing relevant settings. Like any other document library, Group Approval also uses the Customize my approval page to customize features. To access the Customize my approval page, click My Approval, Settings, and then My Approval Settings on the Site Settings page.
Modifying the defaults of some customizable settings may affect the operations of Group Approval. Go to the Document Library Advanced Settings:

Can an Group Approval site be restored into Microsoft Office SharePoint Server site after it is backed up?
Yes, you should backup and restore Group Approval site by web application. Backup and restore every sites which was set to the application.

Can I set RSS Feeds for Group Approval?
Group Approval provides RSS Feed which is one of the basic features of document library of Microsoft Office SharePoint Server. Users can subscribe to it with RSS reader to see the document list. However, you cannot categorize documents by the status of approval process in RSS reader. You can view the document properties but cannot open, approve or reject documents with the list RSS provided.

How does Group Approval reflect any organizational changes, such as reorganization and employees who are on temporary leave or have left the company?
If an organization has been dissolved and removed , files stored in the removed organization's folder will be moved and stored in the parent organization's folder. If an organization is renamed, the archive automatically reflects the change, eliminating the need for manual control.
On the other hand, any changes occurring during the approval process require the administrator's manual control as applicable. For example, if a document has been submitted for approval but the submitter's department is dismissed from the company, that document is stored in the Undetermined folder in the archive. It is because the document number, which is assigned as soon as a document is submitted, is used to determine in which folder to store the document. When the latter approver is removed from organization chart before the former approver approves, the approval process cancel notice is e-mailed to the former approvers and the approval process is canceled. However, if the latter approver is removed from organization chart after the former approver’s approval, the approval process is not canceled but the submitter is not notified thus a separate management is needed. Then, the document remains in the Proposed by Me folder in case of the submitter, and in the Approved by Me folder in case of the former approver. An error occurs when you select the remained document and right click the mouse button and then select View Properties. This requires the submitter or the administrator to check and cancel the approval process as needed and submit the document again for approval.

When I click Users and Organizations page under Group Approval, an error message, the organization chart is inconsistent, appears. What is the reason and resolution for this problem?
This is because you deleted the Group under Group Approval through People and Groups page of Microsoft Office SharePoint Server. Click Here on displayed error message. On the page you moved, click Actions - Solve Inconsistency of Organization Tree. Delete organization from the organization chart which you removed from Microsoft Office SharePoint Server. To use the deleted group in Group Approval, you should register it again on the Group Approval organization chart. Make it positioned consistently with the exisitng organization chart and department folder structure. For more details, see Create Organization Chart.

I have created a distribution group on a Microsoft Exchange Server when creating role groups(or approval roles). What if a role group is deleted or its members change? Will such changes be automatically reflected in the distribution group?
Yes, they will. Deleting a role group will also delete its distribution group. Renaming a role group deletes the existing distribution group and creates a distribution group with a new name. And, any changes to the role group members are immediately reflected in the distribution group, provided that the Microsoft Office SharePoint Server administrator also has the Exchange server administrator privilege.

Can I remove a template registered with Group Approval?
Yes, you can, as long as the Web server has no documents created with that template when you attempt to delete it. All the documents created with the template need to be deleted from the Recycling Bin of the Web server as well as from the Group Approval archive. We recommend that templates be hidden from the user rather than deleted. For information on how to determine whether templates are visible to the user, see Set Display Order of the registered templates.

When auditing the archived documents, there should be no missing numbers in the document archive. Is there any way I can check every document number?
Group Approval provides a document log report apart from the document archive. Document ID Log Report is a useful tool for managing and auditing documents by number, listing all numbered documents by department and displaying a summarized approval record log for each document.
To see the report, click Document ID Log Report under Group Approval Administration on the Site Setting page. The report lists any organization that is registered with the organization chart and has any document that has been submitted. Clicking + next to the organization lists all documents by issued document number. Clicking + next to the document you want displays the document's record. The number within the parentheses () indicates the number of document instances by status, and might be therefore larger than the number of actual documents.
You can also display the log report in a different format as needed. Click Actions on the taskbar of the Document ID Log Report page, and then click Edit in Datasheet or Export to Spreadsheet to convert the report to the spreadsheet or datasheet format. Control the converted data as needed. Note that deleting or modifying the data invalidates the document log report.

How do I set up notification by e-mail?
Group Approval is an electronic approval solution created by Microsoft and based on the Microsoft Office SharePoint Server technology, which also enables the notification feature by linking to the e-mail system. For more information about setting up notification by e-mail, see Help for Microsoft Office SharePoint Server.
After notification by e-mail is set up, the submitters or approvers are automatically notified of requests for approval or approval status and receive summary e-mail messages when the approval process is completed. If you use Exchange Server, it conveniently allows you to create and manage a distribution group for Group Approval approval roles. Fore more information, click Create Approval Roles.

Saturday, November 7, 2009

Silver Light

1 What is Silverlight?
Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of Microsoft .NET–based media experiences and rich interactive applications for the Web. It is combination of different technolgoies into a single development platform that allows you to select tools and the programming language you want to use. Silverlight integrates seamlessly with your existing Javascript and ASP.NET AJAX code to complement functionality which you have already created. Silverlight aims to compete with Adobe Flash and the presentation components of Ajax. It also competes with Sun Microsystems' JavaFX, which was launched a few days after Silverlight.

2 What features are available in the Silverlight 1.1 Alpha?
The Silverlight 1.1 Alpha includes all the features available in Silverlight 1.0 Beta plus a number of new features focused primarily on improving the developer productivity and power, including:

* Managed code support
* Support for dynamic languages including managed Microsoft JScript and Python
* Rich UI control model based on WPF
* Improved networking stack with support for REST, RSS, JSON, and POX
* Enhanced, two-way HTML/AJAX bridge
* Comprehensive and consistent base class library
* Support for LINQ (LINQ to Objects, LINQ to XML)

3 Which platforms and browsers will Silverlight support?
Silverlight will support all major browsers on both Mac OS X and on Windows. Particular care is being taken to account for differences in platform and browser capabilities to ensure a consistent experience including experiences on FireFox, Safari, and Internet Explorer.

4 Will Silverlight support HD quality?
Yes, Silverlight supports 720p, HD quality with considerable performance benefits over other solutions. Performance is dependent upon the central processing unit (CPU) capabilities of your computer and configurations. Generally, in testing, a 3-gigahertz (GHz) CPU and/or dual-core support greatly benefit the HD playback experience.

5 What audio or video formats are supported in Silverlight?
Silverlight supports Windows Media Audio and Video (WMA, WMV7–9) and VC-1, as well as MP3 audio. Additional formats may be available by the final release based on customer feedback.

6 Will Silverlight support all the codecs Windows Media Player supports?
Since Silverlight is a lightweight cross-platform technology, it only carries the most common codecs that are needed for Web playback. However, we are gathering information from customers about the needed codecs and can update Silverlight when necessary.

7.What are the different ways to display text with Silverlight?
Silverlight supports displaying static preformatted text that is comprised out of glyph elements and also dynamic text that uses TextBlock. With glyphs, one needs to position the characters individually while TextBlock supports simple layout.

8.What kinds of fonts are supported with Silverlight?
Beyond standard and western fonts, Silverlight also supports East Asian characters, double-byte characters, and can work with any East Asian font or Middle Eastern font by using the glyphs element and a supporting TrueType font file that supports the requested glyph.

9 What is XAML ?
Extensible Application Markup Language (XAML, pronounced zammel) is a declarative XML-based language created by Microsoft which is used to initialize structured values and objects.

10 What is the difference between WPF and Silverlight?
Silverlight uses a particular implementation of a XAML parser, with that parser being part of the Silverlight core install. In some cases, the parsing behavior differs from the parsing behavior in Windows Presentation Foundation (WPF), which also has a particular implementation.

11 Can you name built-in layout panels you have been using with Silverlight?
You are looking for Canvas, StackPanel and Grid

12 What is Storyboard?
Storyboard is a Silverlight class with controls animations with a timeline, and provides object and property targeting information for its child animations

13 How can you implement following functionality: clicking left mouse on the ellipse should start ellipse movement to the right, ellipse should stop after moving 200px ?

In the answer you are looking for following steps:

1. Ellipse should have on mouse click event handler: either MouseLeftButtonUp or MouseLeftButtonDown, as following MouseLeftButtonUp=”AnimationStart”

2. Canvas should include Storyboard in the resource section :

Canvas.Resources>

3. Storyboard should contain double animation object:

4. Storyboard.TargetProperty should be set to (Canvas.Left) and Storyboard.TargetName should be set to name of ellipse object i.e. ellipseTest

Given XAML below



14 How can you set image Source dynamically from C# application to” test.png” file?

Surprisingly it is not as straight forward as it might sound, but anyone who seriously worked with Silverlight should be easily answer it.

One of the ways is: img.Source = new BitmapImage(new Uri("test.png", UriKind.Relative));

15 How can you implement following functionality: clicking left mouse on the box should start box movement to the right, but instead of having linear speed object should move rapidly when it begins, slows down, and then speeds up again before it ends.

In this question you are looking for Key-frame animations, particulary SplineDoubleKeyFrame and Bezier interpolation.

To animate with a key-frame animation:

• Add Translate Transform Property to Rectangle object
< name="test" height="20" width="20" left="0" top="10">
x:Name="saTranslateTransform"
X="0" Y="0" />


• Declare the animation and specify its Duration, as you would for a From/To/By animation.
• For each target value, create a key frame of the appropriate type, set its value and KeyTime, and add it to the animation's KeyFrames collection.
• Associate the animation with a property, as you would with a From/To/By animation
• Set KeySpline property to represent accelerate – slow down behaviour



ASP.Net I

1. What is .NET?
.NET is a general-purpose software development platform, similar to Java. At
its core is a virtual machine that turns intermediate language (IL) into
machine code. High-level language compilers for C#, VB.NET and C++ are
provided to turn source code into IL. C# is a new programming language,
very similar to Java. An extensive class library is included, featuring all the
functionality one might expect from a contempory development platform -
windows GUI development (Windows Form s), database access (ADO.NET),
web development (ASP.NET), web services, XML etc.

2. What operating systems does the .NET Framework run on?
The runtime supports Windows Server 2003, Windows XP, Windows 2000,
NT4 SP6a and Windows ME/98. Windows 95 is not supported. Some parts of
the framework do not work on all platforms - for example, ASP.NET is only
supported on XP and Windows 2000/2003. Windows 98/ME cannot be used
for development.
IIS is not supported on Windows XP Home Edition, and so cannot be used to
host ASP.NET. However, the ASP.NET Web Matrix web server does run on XP
Home.
The .NET Compact Framework is a version of the .NET Framework for mobile
devices, running Windows CE or Windows Mobile.
The Mono project has a version of the .NET Framework that runs on
Linux.

Terminology

3. What is the CLI? Is it the same as the CLR?
The CLI (Common Language Infrastructure) is the definition of the fundamentals of
the .NET framework - the Common Type System (CTS), metadata, the Virtual
Execution Environment (VES) and its use of intermediate language (IL), and the
support of multiple programming languages via the Common Language Specification
(CLS). The CLI is documented through ECMA - see
http://msdn.microsoft.com/net/ecma/ for more details.
The CLR (Common Language Runtime) is Microsoft's primary implementation of the
CLI. Microsoft also have a shared source implementation known as ROTOR, for
educational purposes, as well as the .NET Compact Framework for mobile devices.
Non-Microsoft CLI implementations include Mono and DotGNU Portable. NET.

4 What is the CTS, and how does it relate to the CLS?
CTS = Common Type System. This is the full range of types that the .NET
runtime understands. Not all .NET languages support all the types in the
CTS.
CLS = Common Language Specification. This is a subset of the CTS which all
.NET languages are expected to support. The idea is that any program which
uses CLS-compliant types can interoperate with any .NET program written in
any language. This interop is very fine-grained - for example a VB.NET class
can inherit from a C# class.

5 What is IL?
IL = Intermediate Language. Also known as MSIL (Microsoft Intermediate
Language) or CIL (Common Intermediate Language). All .NET source code
(of any language) is compiled to IL during development. The IL is then
converted to machine code at the point where the software is installed, or
(more commonly) at run-time by a Just-In-Time (JIT) compiler.

6 What is C#?
C# is a new language designed by Microsoft to work with the .NET
framework. In their "Introduction to C#" whitepaper, Microsoft describe C#
as follows:
"C# is a simple, modern, object oriented, and type-safe programming
language derived from C and C++. C# (pronounced “C sharp”) is firmly
planted in the C and C++ family tree of languages, and will immediately be
familiar to C and C++ programmers. C# aims to combine the high
productivity of Visual Basic and the raw power of C++."
Substitute 'Java' for 'C#' in the quote above, and you'll see that the
statement still works pretty well :-).

7 What does 'managed' mean in the .NET context?
The term 'managed' is the cause of much confusion. It is used in various
places within .NET, meaning slightly different things.
Managed code: The .NET framework provides several core run-time services
to the programs that run within it - for example exception handling and
security. For these services to work, the code must provide a minimum level
of information to the runtime. Such code is called managed code.
Managed data: This is data that is allocated and freed by the .NET runtime's
garbage collector.
Satish Marwat Dot Net Web Resources satishcm@gmail.com 5 Page
Managed classes: This is usually referred to in the context of Managed
Extensions (ME) for C++. When using ME C++, a class can be marked with
the __gc keyword. As the name suggests, this means that the memory for
instances of the class is managed by the garbage collector, but it also means
more than that. The class becomes a fully paid-up member of the .NET
community with the benefits and restrictions that brings. An example of a
benefit is proper interop with classes written in other languages - for
example, a managed C++ class can inherit from a VB class. An example of a
restriction is that a managed class can only inherit from one base class.

8 What is reflection?
All .NET compilers produce metadata about the types defined in the modules
they produce. This metadata is packaged along with the module (modules in
turn are packaged together in assemblies), and can be accessed by a
mechanism called reflection. The System.Reflection namespace contains
classes that can be used to interrogate the types for a module/assembly.
Using reflection to access .NET metadata is very similar to using
ITypeLib/ITypeInfo to access type library data in COM, and it is used for
similar purposes - e.g. determining data type sizes for marshaling data
across context/process/machine boundaries.
Reflection can also be used to dynamically invoke methods (see
System.Type.InvokeMember), or even create types dynamically at run-time
(see System.Reflection.Emit.TypeBuilder).

Assemblies

9 What is an assembly?
An assembly is sometimes described as a logical .EXE or .DLL, and can be an
application (with a main entry point) or a library. An assembly consists of
one or more files (dlls, exes, html files etc), and represents a group of
resources, type definitions, and implementations of those types. An assembly
may also contain references to other assemblies. These resources, types and
references are described in a block of data called a manifest. The manifest is
part of the assembly, thus making the assembly self-describing.
An important aspect of assemblies is that they are part of the identity of a
type. The identity of a type is the assembly that houses it combined with the
type name. This means, for example, that if assembly A exports a type called
T, and assembly B exports a type called T, the .NET runtime sees these as
two completely different types. Furthermore, don't get confused between
assemblies and namespaces - namespaces are merely a hierarchical way of
organising type names. To the runtime, type names are type names,
regardless of whether namespaces are used to organise the names.
assembly plus the typename (regardless of whether the type name belongs
to a namespace) that uniquely indentifies a type to the runtime.
Assemblies are also important in .NET with respect to security - many of the
security restrictions are enforced at the assembly boundary.
Finally, assemblies are the unit of versioning in .NET - more on this below.

10 How can I produce an assembly?
The simplest way to produce an assembly is directly from a .NET compiler.
For example, the following C# program:
public class CTest
{
public CTest() { System.Console.WriteLine( "Hello from CTest" ); }
}
can be compiled into a library assembly (dll) like this:
csc /t:library ctest.cs
You can then view the contents of the assembly by running the "IL
Disassembler" tool that comes with the .NET SDK.
Alternatively you can compile your source into modules, and then combine
the modules into an assembly using the assembly linker (al.exe). For the C#
compiler, the /target:module switch is used to generate a module instead of
an assembly.

11 What is the difference between a private assembly and a
shared assembly?
· Location and visibility: A private assembly is normally used by a
single application, and is stored in the application's directory, or a subdirectory
beneath. A shared assembly is normally stored in the global
assembly cache, which is a repository of assemblies maintained by the
.NET runtime. Shared assemblies are usually libraries of code which
many applications will find useful, e.g. the .NET framework classes.
· Versioning: The runtime enforces versioning constraints only on
shared assemblies, not on private assemblies.

12 How do assemblies find each other?
By searching directory paths. There are several factors which can affect the
path (such as the AppDomain host, and application configuration files), but
for private assemblies the search path is normally the application's directory
and its sub-directories. For shared assemblies, the search path is normally
same as the private assembly path plus the shared assembly cache.

13 How does assembly versioning work?
Each assembly has a version number called the compatibility version. Also
each reference to an assembly (from another assembly) includes both the
name and version of the referenced assembly.
The version number has four numeric parts (e.g. 5.5.2.33). Assemblies with
either of the first two parts different are normally viewed as incompatible. If
the first two parts are the same, but the third is different, the assemblies are
deemed as 'maybe compatible'. If only the fourth part is different, the
assemblies are deemed compatible. However, this is just the default
guideline - it is the version policy that decides to what extent these rules are
enforced. The version policy can be specified via the application configuration
file.
Remember: versioning is only applied to shared assemblies, not private
assemblies.

Application Domains

What is an application domain?
An AppDomain can be thought of as a lightweight process. Multiple
AppDomains can exist inside a Win32 process. The primary purpose of the
AppDomain is to isolate applications from each other, and so it is particularly
useful in hosting scenarios such as ASP.NET. An AppDomain can be
destroyed by the host without affecting other AppDomains in the process.

Win32 processes provide isolation by having distinct memory address spaces.
This is effective, but expensive. The .NET runtime enforces AppDomain
isolation by keeping control over the use of memory - all memory in the
AppDomain is managed by the .NET runtime, so the runtime can ensure that
AppDomains do not access each other's memory.

One non-obvious use of AppDomains is for unloading types. Currently the
only way to unload a .NET type is to destroy the AppDomain it is loaded into.
This is particularly useful if you create and destroy types on-the-fly via
reflection.

How does an AppDomain get created?
AppDomains are usually created by hosts. Examples of hosts are the
Windows Shell, ASP.NET and IE. When you run a .NET application from the
command-line, the host is the Shell. The Shell creates a new AppDomain for
every application.
AppDomains can also be explicitly created by .NET applications. Here is a C#
sample which creates an AppDomain, creates an instance of an object inside
it, and then executes one of the object's methods:
using System;
using System.Runtime.Remoting;
using System.Reflection;
public class CAppDomainInfo : MarshalByRefObject
{
public string GetName() { return AppDomain.CurrentDomain.FriendlyName; }
}
public class App
{
public static int Main()
{
AppDomain ad = AppDomain.CreateDomain( "Andy's new domain" );
CAppDomainInfo adInfo = (CAppDomainInfo)ad.CreateInstanceAndUnwrap(
Assembly.GetCallingAssembly().GetName().Name, "CAppDomainInfo" );
Console.WriteLine( "Created AppDomain name = " + adInfo.GetName() );
return 0;
}
}

Can I write my own .NET host?
Yes. For an example of how to do this, take a look at the source for the
dm.net moniker developed by Jason Whittington and Don Box. There is also
a code sample in the .NET SDK called CorHost.

Garbage Collection

What is garbage collection?
Garbage collection is a heap-management strategy where a run-time
component takes responsibility for managing the lifetime of the memory used
by objects. This concept is not new to .NET - Java and many other
languages/runtimes have used garbage collection for some time.

Is it true that objects don't always get destroyed
immediately when the last reference goes away?
Yes. The garbage collector offers no guarantees about the time when an
object will be destroyed and its memory reclaimed.

There was an interesting thread on the DOTNET list, started by Chris Sells,
about the implications of non-deterministic destruction of objects in C#. In
October 2000, Microsoft's Brian Harry posted a lengthy analysis of the
problem. Chris Sells' response to Brian's posting is here.

Why doesn't the .NET runtime offer deterministic
destruction?
Because of the garbage collection algorithm. The .NET garbage collector
works by periodically running through a list of all the objects that are
currently being referenced by an application. All the objects that it doesn't
find during this search are ready to be destroyed and the memory reclaimed.
The implication of this algorithm is that the runtime doesn't get notified
immediately when the final reference on an object goes away - it only finds
out during the next 'sweep' of the heap.
Futhermore, this type of algorithm works best by performing the garbage
collection sweep as rarely as possible. Normally heap exhaustion is the
trigger for a collection sweep.

Is the lack of deterministic destruction in .NET a problem?
It's certainly an issue that affects component design. If you have objects that
maintain expensive or scarce resources (e.g. database locks), you need to
provide some way to tell the object to release the resource when it is done.
Microsoft recommend that you provide a method called Dispose() for this
purpose. However, this causes problems for distributed objects - in a
distributed system who calls the Dispose() method? Some form of referencecounting
or ownership-management mechanism is needed to handle
distributed objects - unfortunately the runtime offers no help with this.

Should I implement Finalize on my class? Should I
implement IDisposable?
This issue is a little more complex than it first appears. There are really two
categories of class that require deterministic destruction - the first category
manipulate unmanaged types directly, whereas the second category
manipulate managed types that require deterministic destruction. An
example of the first category is a class with an IntPtr member representing
an OS file handle. An example of the second category is a class with a
System.IO.FileStream member
For the first category, it makes sense to implement IDisposable and override
Finalize. This allows the object user to 'do the right thing' by calling Dispose,
but also provides a fallback of freeing the unmanaged resource in the
Finalizer, should the calling code fail in its duty. However this logic does not
apply to the second category of class, with only managed resources. In this
case implementing Finalize is pointless, as managed member objects cannot
be accessed in the Finalizer. This is because there is no guarantee about the
ordering of Finalizer execution. So only the Dispose method should be
implemented. (If you think about it, it doesn't really make sense to call
Dispose on member objects from a Finalizer anyway, as the member object's
Finalizer will do the required cleanup.)
For classes that need to implement IDisposable and override Finalize, see
Microsoft's documented pattern.
Note that some developers argue that implementing a Finalizer is always a
bad idea, as it hides a bug in your code (i.e. the lack of a Dispose call). A
less radical approach is to implement Finalize but include a Debug.Assert at
the start, thus signalling the problem in developer builds but allowing the
cleanup to occur in release builds.

Do I have any control over the garbage collection
algorithm?
A little. For example the System.GC class exposes a Collect method, which
forces the garbage collector to collect all unreferenced objects immediately.
Also there is a gcConcurrent setting that can be specified via the application
configuration file. This specifies whether or not the garbage collector
performs some of its collection activities on a separate thread. The setting
only applies on multi-processor machines, and defaults to true.

How can I find out what the garbage collector is doing?
Lots of interesting statistics are exported from the .NET runtime via the '.NET
CLR xxx' performance counters. Use Performance Monitor to view them.

What is the lapsed listener problem?
The lapsed listener problem is one of the primary causes of leaks in .NET
applications. It occurs when a subscriber (or 'listener') signs up for a
publisher's event, but fails to unsubscribe. The failure to unsubscribe means
that the publisher maintains a reference to the subscriber as long as the
publisher is alive. For some publishers, this may be the duration of the
application.

This situation causes two problems. The obvious problem is the leakage of
the subscriber object. The other problem is the performance degredation due
to the publisher sending redundant notifications to 'zombie' subscribers.
There are at least a couple of solutions to the problem. The simplest is to
make sure the subscriber is unsubscribed from the publisher, typically by
adding an Unsubscribe() method to the subscriber. Another solution,
documented here by Shawn Van Ness, is to change the publisher to use weak
references in its subscriber list.
5.9 When do I need to use GC.KeepAlive?
It's very unintuitive, but the runtime can decide that an object is garbage
much sooner than you expect. More specifically, an object can become
garbage while a method is executing on the object, which is contrary to most
developers' expectations. Chris Brumme explains the issue on his blog. I've
taken Chris's code and expanded it into a full app that you can play with if
you want to prove to yourself that this is a real problem:
using System;
using System.Runtime.InteropServices;
class Win32
{
[DllImport("kernel32.dll")]
public static extern IntPtr CreateEvent( IntPtr lpEventAttributes,
bool bManualReset,bool bInitialState, string lpName);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool CloseHandle(IntPtr hObject);
[DllImport("kernel32.dll")]
public static extern bool SetEvent(IntPtr hEvent);
}
class EventUser
{
public EventUser()
{
hEvent = Win32.CreateEvent( IntPtr.Zero, false, false, null );
}
~EventUser()
{
Win32.CloseHandle( hEvent );
Console.WriteLine("EventUser finalized");
}
public void UseEvent()
{
UseEventInStatic( this.hEvent );
}
static void UseEventInStatic( IntPtr hEvent )
{
//GC.Collect();
bool bSuccess = Win32.SetEvent( hEvent );
Console.WriteLine( "SetEvent " + (bSuccess ? "succeeded" : "FAILED!") );
}
IntPtr hEvent;
}
class App
{
static void Main(string[] args)
{
EventUser eventUser = new EventUser();
eventUser.UseEvent();
}
}
If you run this code, it'll probably work fine, and you'll get the following
output:
SetEvent succeeded
EventDemo finalized
However, if you uncomment the GC.Collect() call in the UseEventInStatic()
method, you'll get this output:
EventDemo finalized
SetEvent FAILED!
(Note that you need to use a release build to reproduce this problem.)
So what's happening here? Well, at the point where UseEvent() calls
UseEventInStatic(), a copy is taken of the hEvent field, and there are no
further references to the EventUser object anywhere in the code. So as far as
the runtime is concerned, the EventUser object is garbage and can be
collected. Normally of course the collection won't happen immediately, so
you'll get away with it, but sooner or later a collection will occur at the wrong
time, and your app will fail.
A solution to this problem is to add a call to GC.KeepAlive(this) to the end of
the UseEvent method, as Chris explains.
Your Ad Here
Your Ad Here