May 28, 2009

The $17.5 million hard drive

Some employers think they own you when all they’re doing is renting your time. It cost 1 company $17.5 million to learn that stealing an employee’s hard drive is really, really stupid.

It’s about time.

Wha’ happened?
An RV sales manager was hired by an RV manufacturer Forest River, told he was going to get a big raise “later,” and when he realized “later” meant “never” started looking for a new job.

The cheapskate company didn’t even provide a notebook, so the guy used his own to build an 11 state sales network, as well as software for tracking sales. When the company Prez got wind that the guy was looking - and before firing him - the Prez stole his notebook, took the hard drive and erased all the files.

The Prez thought the sales manager was going to steal company secrets and figured that was all the justification he needed. He figured wrong.

In the meantime the RV builder got bought by the v deep-pocketed Berkshire Hathaway holding company for legendary investor Warren Buffet.

Wha’ happened then?
The sales manager was a believable witness - despite popular prejudice, most good salesmen are believable - and the jury awarded him his lost sales commissions, $7 million in punitive damages against the RV company and $8 million in punitive damages against the RV company president and founder.

Ouch!

The Storage Bits take
Most companies aren’t as stupid and cheap as Forest River was. They’ll buy the notebook you use and have you sign a non-disclosure agreement.

When you use a company computer you have NO privacy and NO right to the personal data you store on it. Whether you think your job is secure or not, back up your personal data including pictures, contacts and emails.

 

E-Utilities URLs : 28 May 09

Flexcrypt

This encryption toolbox offers 5 different encryption features,
encryption of; Text, Email, Files, MSN and ICQ. It's very easy, just
copy/paste encryption of any text in any application. For automatic
email-encryption, you would need to use an email client (an email
program such as Thunderbird or Outlook or any other), webmail is not
safe say the developers. The email encryption is done according to
the ZIP-standard, so no extra software is required to be installed by
the receiver. All encryption is done with AES 256 bit encryption
algorithm and a password. Advanced users have the option of using the
OpenPGP standard. True-free version of Flexcrypt permits encrypted
communication upto three addresses.

Flexcrypt can be downloaded at
http://www.flexcrypt.com/downloads/flexcrypt_setup.exe

A user manual can be browsed at
http://www.flexcrypt.com/flexcryptmanual.html

To startwith it would be prudent to test Flexcrypt with non-critical data.

STOIK Imagic

STOIK Imagic can help amateurs organise and enhance photos. Yes,
Photoshop is a great tool but not for ordinary folks, it's too
technical and not a freeware either. STOIK Imagic 4 is a freeware
limited edition of STOIK Imagic 4.0, a integrated photo browser,
viewer, image and video editor. It has a a simple but effective
interface to import, find, organise, enhance and share your photos.
Its features include: Two modes - "Browse mode" that shows photos in
thumbnails or "View mode" that displays them one by one; organises
all photos in the disk automatically - its fast indexing algorithm
can find and grab scores of photos in a jiffy; Dark Room tool to
enhance photos using advanced tool such as linear curves, exposure
sliders, shadow modification and more; Advanced JPEG export lets
saving of JPEG photos in a size that is 1.5 times less than other
tools and more.

STOIK Imagic 4 for Windows 2000, XP and Vista can be downloaded at
http://stoikimaging.com/downloads/Imagic40freebrowser.zip

AutoVer

AutoVer is a configurable automatic or real time backup and personal
versioning system. It can monitor every change made to files and back
them up automatically. AutoVer features include: Option to select any
number of separate folders or folder trees (including sub folders) or
drive (including memory sticks); choice of straight backup or
versioning mode; Option to create an initial backup before the
automatic backup starts; Option to zip or delete old versions after a
specified period of time; choice of folder to back up all the files;
browse backups with the Backup Explorer; Open backups or file
versions directly (file extensions are preserved), Fault tolerance in
case backup folder/drive goes off line or source files are locked and
much more.

AutoVer can be downloaded at
http://beanland.net.au/AutoVer/AutoVer-setup.exe

AutoVer developers welcome small donations to continue its development.

------------------------------------

CYBER STOP: 27 MAY 09

DH reader Sanath Kumar wrote

Could you please suggest me a good download accelerator (freeware)
that can increase the download rate by around four times?

DH suggested

You could try DownThemAll, an addon to Firefox web browser.
Its developers claim that the application has an advanced
accelerator that increases download speeds up to 400% and
lets you pause and resume the process at any time!

DownThemAll at https://addons.mozilla.org/en-US/firefox/addon/201

-----------------------------------------

QUOTE TO MULL ABOUT

Confidence on the outside begins by
living with integrity on the inside.

-- Brian Tracy

May 22, 2009

DOT NET Interview Questions with Answers

When not to use Design Patterns?

Do not use design patterns in any of the following situations.

• When the software being designed would not change with time.

• When the requirements of the source code of the application are unique.

If any of the above applies in the current software design, there is no need to apply design patterns in the current design and increase unnecessary complexity in the design.

When to use Design Patterns?

Design Patterns are particularly useful in one of the following scenarios.

• When the software application would change in due course of time.

• When the application contains source code that involves object creation and event notification.

Benefits of Design Patterns:

The following are some of the major advantages of using Design Patterns in software development.

• Flexibility

• Adaptability to change

• Reusability

What are Design Patterns?

A Design Pattern essentially consists of a problem in a software design and a solution to the same. In Design Patterns each pattern is described with its name, the motivation behind the pattern and its applicability.

According to MSDN, "A design pattern is a description of a set of interacting classes that provide a framework for a solution to a generalized problem in a specific context or environment. In other words, a pattern suggests a solution to a particular problem or issue in object-oriented software development.

What is Com Marshler and its importance in .NET ?

Com Marshler is one of useful component of CLR. Its Task is to marshal data between Managed and Unmanaged environment .It helps in representation of data accross diffrenet execution enviroment.It performs the conversion of data format between manage and unmanaged code.By the helps of Com Marshlar CLR allows manage code to interoperate with unmanaged code.

Can you define what is SharePoint and some overview about this ?

SharePoint helps workers for  creating  powerful personalized interfaces only by dragging and drop pre-defined Web Part Components. And these Web Parts components also helps non programmers to get information which care  and customize the appearance of Web pages. To under stand it we take an example  one Web Part might display a user's information another might create a graph showing current employee status  and a third might show a list of Employees Salary. This is also possible that each functions has a link to a video or audio presentation.So now  Developers are unable to  create these Web Part components and make them available to SharePoint users.

What you thing about the WebPortal ?

Web portal is nothing but a page that allows a user to customize his/her homepage. We can use Widgets to create that portal we have only to drag and drop widgets on the page. The user can set his Widgets on any where on the page where he has to get them. Widgets are nothing but a page area that helps particular function to response. Widgets example are address books, contact lists, RSS feeds, clocks, calendars, play lists, stock tickers, weather reports, traffic reports, dictionaries, games and another such beautiful things that we can not imagine. We can also say Web Parts in Share Point Portal. These are one of Ajax-Powered.

Define SMTPclient class in DotNet framework class libarary?

Each classes in dotnet framework inclue some properties,method and events.These properties ,methods and events are member of a class.SMTPclient class mainly concern with sending mail.This class contain the folling member.
Properties:-
Host:-The name or IP address of email server.

Port:-Port that is use when sending mail.

Methods:-
Send:-Enables us to send email synchronously.

SendAsynchronous:-Enables us to send an email asynchronously.

Event:-
SendCompleted:-This event raised when an asynchronous send opertion completes.

What do you mean by three-tier architecture?

The three-tier architecture was comes into existence to improve management of code and contents and to improve the performance of the web based applications.There are mainly three layers in three-tier architecture.the are define as follows
(1)Presentation
(2)Business Logic

(3)Database

(1)First layer Presentation contains mainly the interface code, and this is shown to user. This code could contain any technology that can be used on the client side like HTML, JavaScript or VBScript etc.
(2)Second layer is Business Logic which contains all the code of the server-side .This layer have code to interact with database database and to query, manipulate, pass data to user interface and handle any input from the UI as well.

(3)Third layer Data represents the data store like MS Access, SQL Server, an XML file, an Excel file or even a text file containing data also some addtional databases are also added to those layers.

What is the Website Administrative Tool in ASP.NET 2.0?

In ASP.NET 2.0, while using Visual Studio 2005 Express Edition or above, the development IDE provides an interface for editing the web.config rather than manually editing the web.config.

In the IDE, click on "Website" and then on "ASP.NET Configuration". This shall open the Website configuration tool. Note that the Web Site Administration Tool is a set of prebuilt ASP.NET 2.0 webpages and resources that are located within the C:\Inetpub\wwwroot\aspnet_webadmin\2_0_40607 directory.

Before in my VB app I would just load the icons from DLL. How can I load the icons provided by .NET dynamically?

By using System.Drawing.SystemIcons class' for example

System.Drawing.SystemIcons.Warning produces an Icon with a warning sign in it. 

What are three test cases you should go through in unit testing?

1.Positive test cases (correct data, correct output).

2. Negative test cases (broken or missing data, proper handling).

3. Exception test cases (exceptions are thrown and caught properly).

Using COM components in .NET and How to add a reference to a COM component?

The .NET does not encourage the use of COM component directly inside the managed application! Although, the .NET framework contains utilities that enable COM components to be used inside the .Net applications seamlessly. How it is done? The .NET utilities like TlbImp generates the wrapper .NET assembly for the COM component which provides the same calling interface to the client as exposed by the COM component. Inside the wrapper methods, it calls the actual methods of the COM component and returns the result back to the caller. The generated wrapper .NET assembly is called the ‘Runtime Callable Wrapper’ or RCW.
To use a COM component in your Visual Studio.NET project, you need to add a reference of the COM component in the Reference node of the project node of the solution inside the solution explorer window. The great thing about Visual Studio.Net is that it allows you to add a reference to the COM component in exactly the similar way as you add the reference to the .NET assembly. The Visual Studio.NET automatically creates the runtime callable wrapper assembly for the referenced COM component.
To add a reference to a COM component, right click the ‘Reference’ node under the project node inside the solution explorer and select the ‘Add Reference…’ option. It will show you a user interface screen where you browse for the target COM component. When you have selected the component, press the ‘Select’ button and then press OK. This will add a new reference node in the Reference sub tree of the project. By selecting the added reference node, you can edit its properties from the properties window.
Note: The process of importing a COM component into .NET is called ‘COM interoperability with .NET’

What are XML Doc comments (comments start with three slashes ///)?

The XML Doc comments are special kind of comments that can be recognized by Document utility to automatically generate the documentation of your methods, types and regions.

How true it is that .NET and Java programs are quite in-efficient when compared to C++?

The startup of managed .NET and Java programs is definitely slower than the traditional C++ programs as it involves the hosting of CLR into managed application process in .NET and starting the JVM in a new process in case of Java. The execution also is a bit slower during the initial period of program execution as the intermediate code is translated to the machine code on the fly at runtime. But as the program runs various parts repeatedly, the execution gets pace too. Since, the CLR and JVM optimizes the code more efficiently than the static C++ compilers, the execution speed of the program may actually be faster after sometime of the program startup when most of the code is translated. Hence, in the longer run, the .Net and Java based programs should not be in-efficient when compared to C++. We used ‘should’ here as the actual performance depends on the particular implementation and implementation strategy.

What are the shortcomings of MS.NET platform?

The foremost short coming of .NET platform is that it is still the propriety of Microsoft. It is more coupled with the Microsoft Windows operating system and is implemented only on Microsoft Windows successfully. MS.NET desktop applications can run only on Microsoft Windows, Web based applications and web services can only be deployed on Microsoft Internet Information Server (IIS). Since, dot net framework contains a lot of utilities, components, and framework class libraries, the size of downloadable framework is quite large (25MB compared to 5MB size of JVM). Not all types of applications can be written in .NET managed applications, for example, you can’t write CLR or Operating System in your managed applications. The managed .Net applications are somewhat slower to start and run than the traditional Win32 applications. The compiled code of .Net managed applications is easier to de-compile back to the source code.

Why should one use MS.NET for software development?

Well, most of the software development all over the world is done on and for Microsoft Windows Operating System. Dot Net is now the standard software development environment for the Microsoft Windows operating system. It dramatically simplifies the development of windows, web based, data access applications, components, controls and web services. Dot net comes with amazing features like XML configuration, reflection, and attributes to ease the overall software development life cycle. Finally, the dot net is supported by the Microsoft Visual Studio Integrated Development Environment; the best IDE available for any software development environment. Visual Studio .NET (VS.NET) supports all the areas of software development from project creation to debugging and installation.

What does one need to build or execute .NET applications?

To execute a standalone .NET application (Windows or Console application), one needs to first compile all its constituent assemblies and modules including the executable assembly. Once, the constituent assemblies are compiled, one needs to make sure that the target system contains the .NET framework. The application can now be executed by running its executable assembly (the .exe file). The executable assembly (.exe) is a Win32 executable that hosts the .Net CLR (Common Language Runtime), which exists as a COM component, in its process space and initializes it. Once the CLR is hosted and initialized, the starting point of the .NET executable assembly is passed to the hosted CLR which starts the execution of the program by translating and executing the parts of the program code.

What is the difference between an executable assembly and a class library?

An executable assembly exists as the .exe file while a class library exists as the .dll file. Executable assembly represent executable applications having some entry (e.g., Main() method in C#). A class library, on the other hand, contains components and libraries to be used inside various applications. A Class library can not be executed and thus it does not have any entry point.

What are the differences between a .NET Assembly, a Windows DLL and a COM Component?

A Windows DLL contains library code to be used by any program running on Windows. A DLL may contain either structured or object oriented libraries.

COM (Component Object Model) is the component model based on the object oriented design, which means that the components represented by the COM component exists in the form of classes and objects implementing a standard specification defined by COM. COM components can be used by any program running on Windows Operating System; be it is written with VB, C++, Java or even some .NET compliant language like C# and VB.NET.

Dot NET assembly is the component standard specified by the .NET. Hence, dot net assemblies are understandable to only Microsoft.NET and can be used only in .NET managed applications.

What is the difference between traditional development and .NET development?

In traditional programming languages, the source code of a program is compiled to a specific platform’s assembly language and then machine language code. Later the library code required by the program is linked to it. Finally the operating system executes the program when desired by the user. The complete process is depicted in the following figure



In the presence of dot net framework, a program is not compiled to the native machine executable code; rather it gets compiled to an intermediate language code called Microsoft Intermediate Language (MSIL) or Common Intermediate Language (CIL). The Dot Net Common Language Runtime (CLR) then converts this intermediate code at runtime to the machine executable code. The optimization is carried out at runtime. A program also does not call the operating system APIs directly; rather it delegates this task to the CLR which performs the desired operations on behalf of the program and returns the results of the operations back to the program. The CLR also performs the memory management, garbage collection, security and thread management on behalf of the program. Dot NET framework is shipped with the supporting object oriented framework of common code libraries, called the .NET Framework Class Library (FCL), to facilitate the common operations. Hence the .Net manages the overall execution of an application. This is the reason why the code running on .Net framework is sometimes called the managed code. The complete process is depicted in the following Figure. Note that only the CLR (and thus the .Net framework and not the user application) is interacting and coupled with the platform and operating system.

What about the MS.NET standardization?

Microsoft has secured certification for both C# and CLI from ECMA and ISO/IEC as Industry standards. This is a very important step for Microsoft and .Net platform because this enhances the credibility of the newer .Net platform and allures a larger portion of technology industry into adopting .Net as their development platform. Several companies and government organizations only utilize ISO certified technologies; for example, in Australia anything ISO certified is also considered Australian standard according to the rules of the Australian government. Several academic institutions will now be interested in teaching standard C#. Another major outcome of having an open industry standard specification is .Net platform could be getting ported to other platforms like Linux and UNIX; best example is the Mono Project by Ximian- it is an open source implementation of .Net platform for UNIX and Linux based on ECMA approved Public Domain Specification of C# and CLI.

Microsoft submitted the specifications to ECMA, which in turn fast-tracked them through ISO. In doing so, Microsoft released all intellectual property in the core C#/CLI platform to the public domain. No one needs a license to implement C#/CLI. This will also help everybody in better understanding the implementations of C# and CLI which are at the core of .Net platform. However, the whole of .Net platform is not a Public domain standard- Microsoft still owns complete Intellectual property rights to several class libraries and API within the .Net platform.

Are old projects created in Visual Studio .NET 2002 or 2003 supported in Visual Studio 2005?

Old projects will continue to run without change. In Visual Studio 2005, if you open a project created in Visual Studio .NET 2002 or 2003, the project is converted to the new project layout used in Visual Studio 2005. As part of the conversion, pages that use the old code-behind model are converted to use the new code-behind model. You cannot create pages using the old code-behind model in Visual Studio 2005.

Can I have VS.NET and the Visual Studio 6.0 installed on the same machine?

Yes! VS.Net works with the .Net framework, while VS6.0 works with MFC or the Windows API directly, for the most part. They can be installed and run on the same machine without any considerations.

Why are Server control tags shown in the browser instead of the controls it represents?

This is because the server control tags were not converted into their respecting HTML element tags by ASP.Net. This happens when ASP.Net is not properly registered with IIS. .Net framework provides an Administration utility that manages the installation and uninstallation of multiple versions of ASP.NET on a single machine. You can find the file in C:\WINNT\Microsoft.NET\Framework\v**\aspnet_regiis.exe use the command: aspnet_regiis.exe -u ---> to uninstall current asp.net version. Use the command: aspnet_regiis.exe -i ---> to install current asp.net version

DOT NET - FAQ

DOT NET - Frequently Asked Question


1. What is the .NET Framework?


.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. An extensive class library is included, featuring all the functionality one might expect from a contempory development platform - windows GUI development (Windows Forms), database access (ADO.NET), web development (ASP.NET), web services, XML etc.

2. Explain why tracing helps with exception handling.

Tracing allows you to record unusual events while your application is running, without users being aware of it. If an unanticipated exception occurs, your application can write a message to the trace log, which helps you diagnose problems during testing and after deployment.


3. What is the common language runtime (CLR)?


The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime

 

The runtime also accelerates developer productivity.

The runtime is designed to enhance performance.

The runtime can be hosted by high-performance, server-side applications, such as Microsoft® SQL Server™ and Internet Information Services (IIS).

 

4. What is the Microsoft Intermediate Language (MSIL)?


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. MSIL allows for true cross-language integration.

 

5. 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.

 

6. What are private assemblies and shared assemblies?


Location and visibility: A private assembly is normally used by a single application, and is stored in the application's directory, or a sub-directory 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.

7. How can I produce an assembly?


The simplest way to produce an assembly is directly from a .NET compiler. 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.

 

8. What is managed code and managed data?

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.
Managed code is code that is written to target the services of the common language runtime. In order to target these services, the code must provide a minimum level of information (metadata) to the runtime. All C#, Visual Basic .NET, and JScript .NET code is managed by default. Visual Studio .NET C++ code is not managed by default, but the compiler can produce managed code by specifying a command-line switch (/CLR).
Closely related to managed code is managed data—data that is allocated and de-allocated by the common language runtime's garbage collector. C#, Visual Basic, and JScript .NET data is managed by default. C# data can, however, be marked as unmanaged through the use of special keywords. Visual Studio .NET C++ data is unmanaged by default (even when using the /CLR switch), but when using Managed Extensions for C++, a class can be marked as managed by using the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector. In addition, the class becomes a full participating member of the .NET Framework community, with the benefits and restrictions that brings. An example of a benefit is proper interoperability with classes written in other languages (for example, a managed C++ class can inherit from a Visual Basic class). An example of a restriction is that a managed class can only inherit from one base class.

 

9. 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.


10. What is garbage collection?

Garbage collection is a mechanism that allows the computer to detect when an object can no longer be accessed. It then automatically releases the memory used by that object (as well as calling a clean-up routine, called a "finalizer," which is written by the user). Some garbage collectors like the one used by .NET, compact memory and therefore decrease your program's working set.


11. 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.

12. What is Namespace?

It gives you a way to organize your classes, so that related classes are bound together in a namespace.
It helps in large applications where different classes may be provided by different people, different teams, or even different organizations. Avoiding name clashes in large applications can be quite a headache, and in the past, developers have resorted to arcane naming conventions to ensure uniqueness for their class names.


13. Explain why exception handling is important to a completed application.

When an unhandled exception occurs in an application, the application stops—the user can't proceed, and any work he or she did immediately prior to the exception is lost. Exception handling provides a way to intercept and correct unusual occurrences that would otherwise cause these problems.

14. Describe the purpose of error pages and why they are needed.


Because Web applications run over the Internet, some exceptions occur outside the scope of the application. This means that your application can't respond directly to these exceptions. These types of exceptions are identified by HTTP response codes, which IIS can respond to by displaying custom error pages listed in your application's Web.config file.


15. Explain why tracing helps with exception handling.

Tracing allows you to record unusual events while your application is running, without users being aware of it. If an unanticipated exception occurs, your application can write a message to the trace log, which helps you diagnose problems during testing and after deployment.


16. What is a Repeater control?

Repeater control is a data-bound list control that allows custom layout by repeating a specified template for each item displayed in the list. It does not have built-in layout or styles, developers are required to explicitly declare HTML layout, formatting and style tags within the control's templates.

Frequently Asked Question - DOT NET Interview Top Questions

1.      So can a COM object talk to a .NET object?

Yes, through Runtime Callable Wrapper (RCW) or PInvoke.

2.      Describe the advantages of writing a managed code application instead of unmanaged one. What's involved in certain piece of code being managed?

The advantages include automatic garbage collection, memory management, support for versioning and security. These advantages are provided through .NET FCL and CLR, while with the unmanaged code similar capabilities had to be implemented through third-party libraries or as a part of the application itself.

3.      Are COM objects managed or unmanaged?

Since COM objects were written before .NET, apparently they are unmanaged. Any code not written in the Microsoft .NET framework environment is UNMANAGED. So naturally COM+ is unmanaged because it is written in Visual Basic 6

4.      How do you generate an RCW from a COM object?

Use the Type Library Import utility shipped with SDK. tlbimp COMobject.dll /out:.NETobject.dll or reference the COM library from Visual Studio in your project.

5.      I can't import the COM object that I have on my machine.

Did you write that object? You can only import your own objects. If you need to use a COM component from another developer, you should obtain a Primary Interop Assembly (PIA) from whoever authored the original object.

6.      How do you call unmanaged methods from your .NET code through PInvoke?

Supply a DllImport attribute. Declare the methods in your .NET code as static extern. Do not implement the methods as they are implemented in your unmanaged code, you're just providing declarations for method signatures.

7.      Can you retrieve complex data types like structs from the PInvoke calls?

Yes, just make sure you re-declare that struct, so that managed code knows what to do with it.

8.      I want to expose my .NET objects to COM objects. Is that possible?

Yes, but few things should be considered first. Classes should implement interfaces explicitly. Managed types must be public. Methods, properties, fields, and events that are exposed to COM must be public. Types must have a public default constructor with no arguments to be activated from COM. Types cannot be abstract.

9.      Suppose I call a COM object from a .NET application, but COM object throws an error. What happens on the .NET end?

COM methods report errors by returning HRESULTs; .NET methods report them by throwing exceptions. The runtime handles the transition between the two. Each exception class in the .NET Framework maps to an HRESULT.

10. Can you inherit a COM class in a .NET application?

The .NET Framework extends the COM model for reusability by adding implementation inheritance. Managed types can derive directly or indirectly from a COM class; more specifically, they can derive from the runtime callable wrapper generated by the runtime. The derived type can expose all the method and properties of the COM object as well as methods and properties implemented in managed code. The resulting object is partly implemented in managed code and partly implemented in unmanaged code.

11. Suppose I call a COM object from a .NET application, but COM object throws an error. What happens on the .NET end?

COM methods report errors by returning HRESULTs; .NET methods report them by throwing exceptions. The runtime handles the transition between the two. Each exception class in the .NET Framework maps to an HRESULT.

12. What is RCW (Run time Callable Wrappers)?

The common language runtime exposes COM objects through a proxy called the runtime callable wrapper (RCW). Although the RCW appears to be an ordinary object to .NET clients, its primary function is to marshal calls between a .NET client and a COM object.

13. What is CCW (COM Callable Wrapper)

A proxy object generated by the common language runtime so that existing COM applications can use managed classes, including .NET Framework classes, transparently.

 

 

Insert new row in a table using JavaScript

This Javascript gives you to insert a new row in a table at required location. You can insert multiple rows at a time with cell values. It’s very simple.

 

Just Visit the site below for Preview and The script:

 

Insert New Row

 

Just copy and paste the script in Head tab of your source. By this script you can insert any number of rows, with different name tags. You can have different cell values as well. Just try it!!

 

Please give us Comments about it…

 

Thank you for your comments!!!

May 20, 2009

Update on Site4Sites Toolbar


A new feature in the Site4sites toolbar.

http://sn.im/toolbar


We have added 100’s of TV channels in the toolbar. You can just access it by a single click.

We have added lots of radio stations - Telugu radio, tamil radio, punjabi radio, malayalam radio, bengali radio, hindi radio, english radio etc.


Online TVs for India, UK, USA, Germany, France, Spain, Italy Etc.,


Free Online watching TVs for India like 9XM,Sony TV, IBN 7, SUN TV, Star Plus TV, Star One TV, Zee Tv, Set Max, B4U Movies, CNBC Awaaz, Sun TV, Star Vijay, Raj TV, CNBC TV 18, CNN IBN, IBN Lokmat, Star Gold, Indus Vision, Star Utsav, Zoom TV India, Zee Cinema, Zee Gujarati, NDTV Profit, Zee Punjabi, Zee Marathi, Zee Bangla, NDTV 24X7, NDTV India, NDTV Profit, NDTV Imagine, Geo TV, Geo News, News X, Times Now, Star News, TV Asia, Aastha TV, MTV Music India, Sanskar TV etc

To add any weblinks or add any stations just mail us @ contactme@site4sites.co.in

or give in comments

Visual Studio 2008 - Interview Questions with answers

New Features of Visual Studio 2008 for .NET Professionals

1. LINQ Support

LINQ essentially is the composition of many standard query operators that allow you to work with data in a more intuitive way regardless.

The benefits of using LINQ are significant – Compile time checking C# language queries, and the ability to debug step by step through queries.

2. Expression Blend Support


Expression blend is XAML generator tool for silverlight applications. You can install Expression blend as an embedded plug-in to Visual Studio 2008. By this you can get extensive web designer and JavaScript tool.

3. Windows Presentation Foundation

WPF provides you an extensive graphic functionality you never seen these before. Visual Studio 2008 contains plenty of WPF Windows Presentation Foundation Library templates. By this a visual developer who is new to .NET, C# and VB.NET can easily develop the 2D and 3D graphic applications.

Visual Studio 2008 provides free game development library kits for games developers. currently this game development kits are available for C++ and also 2D/3D Dark Matter one image and sounds sets.

4. VS 2008 Multi-Targeting Support

Earlier you were not able to working with .NET 1.1 applications directly in visual studio 2005. Now in Visual studio 2008 you are able to create, run, debug the .NET 2.0, .NET 3.0 and .NET 3.5 applications. You can also deploy .NET 2.0 applications in the machines which contains only .NET 2.0 not .NET 3.x.

5. AJAX support for ASP.NET

Previously developer has to install AJAX control library separately that does not come from VS, but now if you install Visual Studio 2008, you can built-in AJAX control library. This Ajax Library contains plenty of rich AJAX controls like Menu, TreeView, webparts and also these components support JSON and VS 2008 contains in built ASP.NET AJAX Control Extenders.

6. JavaScript Debugging Support

Since starting of web development all the developers got frustration with solving javascript errors. Debugging the error in javascript is very difficult. Now Visual Studio 2008 makes it is simpler with javascript debugging. You can set break points and run the javaScript step by step and you can watch the local variables when you were debugging the javascript and solution explorer provides javascript document navigation support.

7. Nested Master Page Support

Already Visual Studio 2005 supports nested master pages concept with .NET 2.0, but the problem with this Visual Studio 2005 that pages based on nested masters can't be edited using WYSIWYG web designer. But now in VS 2008 you can even edit the nested master pages.

8. LINQ Intellisense and Javascript Intellisense support for silverlight applications

Most happy part for .NET developers is Visual Studio 2008 contains intellisense support for javascript. Javascript Intellisense makes developers life easy when writing client side validation, AJAX applications and also when writing Silverlight applications

Intellisense Support: When we are writing the LINQ Query VS provides LINQ query syntax as tool tips.

9. Organize Imports or Usings: We have Organize Imports feature already in Eclipse. SInce many days I have been waiting for this feature even in VS. Now VS contains Organize Imports feature which removes unnecessary namespaces which you have imported. You can select all the namespaces and right click on it, then you can get context menu with Organize imports options like "Remove Unused Usings", "Sort Usings", "Remove and Sort". Refactoring support for new .NET 3.x features like Anonymous types, Extension Methods, Lambda Expressions.

10. Intellisense Filtering: Earlier in VS 2005 when we were typing with intellisense box all the items were being displayed. For example If we type the letter 'K' then intellisense takes you to the items starts with 'K' but also all other items will be presented in intellisense box. Now in VS 2008 if you press 'K' only the items starts with 'K' will be filtered and displayed.

11. Intellisense Box display position

Earlier in some cases when you were typing the an object name and pressing . (period) then intellisense was being displayed in the position of the object which you have typed. Here the code which we type will go back to the dropdown, in this case sometimes programmer may disturb to what he was typing. Now in VS 2008 If you hold the Ctrl key while the intellisense is dropping down then intellisense box will become semi-transparent mode.

12. Visual Studio 2008 Split View

VS 205 has a feature show both design and source code in single window. but both the windows tiles horizontally. In VS 2008 we can configure this split view feature to vertically, this allows developers to use maximum screen on laptops and wide-screen monitors.

Here one of the good feature is if you select any HTML or ASP markup text in source window automatically corresponding item will be selected in design window.

13. HTML JavaScript warnings, not as errors: VS 2005 mixes HTML errors and C# and VB.NET errors and shows in one window. Now VS 2008 separates this and shows javascript and HTML errors as warnings. But this is configurable feature.

14. Debugging .NET Framework Library Source Code:

Now in VS 2008 you can debug the source code of .NET Framework Library methods. Lets say If you want to debug the DataBind() method of DataGrid control you can place a debugging point over there and continue with debug the source code of DataBind() method.

15. In built Silverlight Library

Earlier we used to install silverlight SDK separately, Now in VS 2008 it is inbuilt, with this you can create, debug and deploy the silverlight applications.

16. Visual Studio LINQ Designer

Already you know in VS 2005 we have inbuilt SQL Server IDE feature. by this you no need to use any other tools like SQL Server Query Analyzer and SQL Server Enterprise Manger. You have directly database explorer by this you can create connections to your database and you can view the tables and stored procedures in VS IDE itself. But now in VS 2008 it has View Designer window capability with LINQ-to-SQL.

17. Inbuilt C++ SDK

Earlier It was so difficult to download and configure the C++ SDK Libraries and tools for developing windows based applications. Now it is inbuilt with VS 2008 and configurable

18. Multilingual User Interface Architecture - MUI


MUI is an architecture contains packages from Microsoft Windows and Microsoft Office libraries. This supports the user to change the text language display as he wish.

Visual Studio is now in English, Spanish, French, German, Italian, Chinese Simplified, Chinese Traditional, Japanese, and Korean. Over the next couple of months. Microsoft is reengineering the MUI which supports nine local languages then you can even view Visual studio in other 9 local languages.

19. Microsoft Popfly Support


Microsoft Popfly explorer is an add-on to VS 2008, by this directly you can deploy or hosting the Silverlight applications and Marshup objects

SMTP and POP3 Mail server Setting

Yahoo! Mail Settings

Yahoo Incoming Mail Server (POP3) - pop.mail.yahoo.com (port 110)
Yahoo Outgoing Mail Server (SMTP) - smtp.mail.yahoo.com (port 25)

Yahoo Incoming Mail Server (POP3) - plus.pop.mail.yahoo.com (SSL enabled, port 995)
Yahoo Outgoing Mail Server (SMTP) - plus.smtp.mail.yahoo.com (SSL enabled, port 465)

Google GMail Settings

Google Gmail Incoming Mail Server (POP3) - pop.gmail.com (SSL enabled, port 995)
Google Gmail Outgoing Mail Server - use the SMTP mail server address provided by your local ISP or smtp.gmail.com (SSL enabled, port 465)

Lycos Mail Settings

Lycos Mail Incoming Mail Server (POP3) - pop.mail.lycos.com (port 110)
Lycos MailOutgoing Mail Server - smtp.mail.lycos.com or use your local ISP SMTP mail server

AOL Mail Settings

AOL Incoming Mail Server (IMAP) - imap.aol.com (port 143)
AOL Outgoing Mail Server - smtp.aol.com or use your local ISP SMTP mail server

Mail.com Mail Settings

Mail.com Mail Incoming Mail Server (POP3) - pop1.mail.com (port 110)
Outgoing Mail Server - use your local ISP SMTP mail server

Netscape Internet Service Mail Settings

Netscape Internet Service Incoming Mail Server (POP3) - pop.3.isp.netscape.com (port 110)
Netscape Internet Service Outgoing Mail Server - smtp.isp.netscape.com (port 25, using a secure SSL connection)

Tiscali Mail Settings

Tiscali Incoming Mail Server (POP3) - pop.tiscali.com (port 110)
Outgoing Mail Server - use your local ISP SMTP mail server

Freeserve Mail Settings

Freeserve Incoming Mail Server (POP3) - pop.freeserve.com (port 110)
Outgoing Mail Server - use your local ISP SMTP mail server

Supanet Mail Settings

Supanet Incoming Mail Server (POP3) - pop.supanet.com (port 110)
Outgoing Mail Server - use your local ISP SMTP mail server

What is ASP.NET Futures?

ASP.NET AJAX Futures

The new release includes support for managing browser history (Back button support), selecting elements by CSS selectors or classes, and information on accessing “Astoria” Web data services. The Futures (July 2007) release adds:

History support for the Safari browser, inclusion of “titles”, encoding and encrypting of server-side history state and the ability to handle history in the client without a server requirement.

CSS Selectors APIs have been modified to be applicable to W3C recommendations.

A script resource extraction tool that allows you to create script files on disk that originate from embedded resources in assemblies. Important: this version of the browser history feature is now outdated and should not be used. Instead, please download the ASP.NET 3.5 Extensions Preview, which contains the new version.

Where can I get help and support for Visual C++ 2008 Express Edition?

The Express Editions include forum support. Please go to the Visual C++ 2008 Express Forum to post your question.

Does Visual C++ 2008 Express include the "optimizing compiler"?

Yes, Visual C++ 2008 Express Edition includes the same core optimizing compiler that will be included with all other Visual Studio 2008 editions. Some new expanded optimization features, including Profile Guided Optimizations, will be available only in the Standard and above editions of Visual Studio 2008.

What types of application can I build with Visual C++ 2008 Express?

With Visual C++ 2008 Express you can build both native and managed applications. Included is the Windows Platform SDK which you can build applications that take full advantage of the Win32 API.

For whom is Visual C++ 2008 Express intended?

Visual C++ 2008 Express is designed for hobbyists, first-time developers, and students looking for a fun and easy way to build Windows applications.

If I create a Web site with Visual Web Developer 2008 Express, will I be able to continue editing the project if I upgrade to VS 2008 Standard Edition

Absolutely. The Web site layout and file formats are 100% compatible between Visual Web Developer 2008 Express and Visual Studio 2008 Standard Edition.

Can I use Visual Web Developer 2008 Express to edit Web projects I created with Visual Web Developer 2005 Express?

When you open a Visual Web Developer 2005 Web project in Visual Web Developer 2008 Express, the project is converted to the new, simpler project layout used with Visual Web Developer 2008 Express. The conversion process also converts existing .aspx pages, .ascx files and other files into a new format. Note that the conversion process creates a backup of your project before the conversion begins.

Do I need IIS to build applications with Visual Web Developer 2008 Express?

No. Visual Web Developer 2008 Express comes with a built-in Web development server that enables you to build and test applications without a dependency on IIS. The server only accepts local requests and is only for build and test. Web applications built with Visual Web Developer can easily be deployed to IIS or your favorite hoster using the built-in copy Web tool.

What programming languages are supported by Visual Web Developer 2008 Express?

Visual Web Developer 2008 Express supports development with Visual Basic and Visual C#. Visual Web Developer 2008 Express also includes rich editors for HTML, XML, JavaScript and Cascade Style Sheets (CSS).

Can I have Web sites using ASP.NET 2.0 and ASP.NET 3.5 on the same machine?

Yes. ASP.NET 20 and ASP.NET 3.5 can be run side-by-side on the same machine. You can easily control which applications and virtual roots target a certain version of the framework.

Does Visual Web Developer 2008 Express support ASP.NET 2.0?

Yes. The ability to target different versions of the .NET framework (i.e. multi-targeting) is available in Visual Web Developer 2008 through the Project Properties menu.

For whom is Visual Web Developer 2008 Express intended?

Visual Web Developer 2008 Express is intended for non-professional, hobbyists, students and beginning Web developers who want to learn how to build ASP.NET 3.5 Web applications.

What is Visual Web Developer 2008 Express?

Visual Web Developer 2008 Express is a stand-alone, lightweight, easy-to-use Web-focused tool for building ASP.NET 3.5 applications. It includes everything you need to begin building Web applications, including a built-in development/test Web server.

Can I have Web sites using ASP.NET 2.0 and ASP.NET 3.5 on the same machine?

Yes. ASP.NET 20 and ASP.NET 3.5 can be run side-by-side on the same machine. You can easily control which applications and virtual roots target a certain version of the framework.

Does Visual Web Developer 2008 Express support ASP.NET 2.0?

Yes. The ability to target different versions of the .NET framework (i.e. multi-targeting) is available in Visual Web Developer 2008 through the Project Properties menu.

Will code from Visual Basic 2005 Express work in Visual Basic 2008 Express?

Visual Basic 2008 Express includes a migration wizard that will help import existing Visual Basic 2005 Express projects. You may need to make some manual adjustments to the code you port over, but the migration wizard is a good first step towards moving your code forward.

Will code from Visual Basic 6.0 work in Visual Basic 2008 Express?

Visual Basic 2008 Express includes a migration wizard that will help import existing Visual Basic 6.0 projects. You may need to make some manual adjustments to the code you port over, but the migration wizard is a good first step towards moving your code forward.

What types of applications can I build with Visual Basic 2008 Express?

Visual Basic 2008 Express can be used to build Windows applications, Windows Presentation Foundation (WPF) applications, console and reusable components and controls. If you want to create interactive Web sites, you should use Visual Web Developer 2008 Express Edition which fully supports the Visual Basic language.

I'm having problems installing my Visual Studio 2008 Express Edition.

If the automated installer doesn't work for you, visit the Express Installation and Setup forum or if you want to download an Express Edition to burn to a DVD for installation on another machine, visit the Express Editions Download page.

Where can I find a list of any backwards breaking changes between the .NET Framework 2.0 and the .NET Framework 3.5?

From .NET 2.0 to .NET 3.0 we have 100% binary compatibility. This is because none of the .NET 2.0 binaries were changed for that update.

From .NET 3.0 to .NET 3.5 we an extremely high level of compatibility with existing applications. This is an estimated 95% binary compatibility without a recompile being required. The last estimated 5% is recommended to be found by testing and the incompatibilities are a result of bug fixes, performance improvements, geo political fixes and security fixes introduced in services packs .NET 2.0 SP1 and .NET 3.0 SP1 as part of the .NET 3.5 upgrade.

Will programs I build with Visual Studio Express work with other versions of Visual Studio 2008, like the Standard Edition?

Absolutely. Visual Studio Express is a great entry point to professional software development, and Microsoft is committed to helping you "graduate" to higher-end products should you need them. Projects you create with an Express Edition will easily migrate to higher-end Visual Studio 2008 projects.

Will the Visual Studio Express Editions install side-by-side with the versions of Visual Studio 2005 Express Editions?

Yes, side-by-side compatibility with other versions of Visual Studio 2005 including Visual Studio 2005 Express Editions and Visual Studio 2008.

Do applications built for Visual Studio 2008 Express Beta 2 work in the official released version?

Generally speaking, yes. Please note that there have been some changes between the betas and the official release, so you make to make some updates to your code accordingly.

How do I make Visual Studio 2008 Express work with .NET 2.0 and .NET 3.0?

The ability to target a version of the .NET Framework other than 3.5 (i.e. multi-targeting) is included in all the Visual Studio Express Edition products. Multi-targeting is available under the Project Properties menu which can be selected by going to Project-> Properties.

New Features of Visual Studio 2008 and .NET 3.5

VS 2008 Multi-Targeting Support

VS 2008 enables you to build applications that target multiple versions of the .NET Framework. This means you can use VS 2008 to open, edit and build existing .NET 2.0 and ASP.NET 2.0 applications (including ASP.NET 2.0 applications using ASP.NET AJAX 1.0), and continue to deploy these application on .NET 2.0 machines.

ASP.NET AJAX and JavaScript Support

.NET 3.5 has ASP.NET AJAX built-in (no separate download required). In addition to including all of the features in ASP.NET AJAX 1.0, ASP.NET 3.5 also now includes richer support for UpdatePanels integrating with WebParts, ASP.NET AJAX integration with controls like and , WCF support for JSON, and many other AJAX improvements.
VS 2008 and Visual Web Developer 2008 also now have great support for integrating JavaScript and AJAX into your applications.

VS 2008 Web Designer and CSS Support

VS 2008 and Visual Web Developer 2008 Express includes a significantly improved HTML web designer (the same one that ships with Expression Web). This delivers support for split-view editing, nested master pages, and great CSS integration.
ASP.NET 3.5 also has a new control that provides the ability to perform rich data scenarios with total control over the markup. It works nicely with the new CSS support in VS 2008.

Language Improvements and LINQ

The new VB and C# compilers in VS 2008 deliver significant improvements to the languages. Both add functional programming concepts that enable you to write cleaner, terser, and more expressive code. These features also enable a new programming model we call LINQ (language integrated query) that makes querying and working with data a first-class programming concept with .NET.

Data Access Improvements with LINQ to SQL

LINQ to SQL is a built-in OR/M (object relational mapper) in .NET 3.5. It enables you to model relational databases using a .NET object model. You can then query the database using LINQ, as well as update/insert/delete data from it. LINQ to SQL fully supports transactions, views, and stored procedures. It also provides an easy way to integrate business logic and validation rules into your data model.
I think you'll find that LINQ and LINQ to SQL makes it much easier to build much cleaner data models, and write much cleaner data code. I'll be adding more posts to my LINQ to SQL series in the weeks and months ahead (sorry for the delay in finishing them earlier - so much to-do and so little time to-do it all!).

Browsing the .NET Framework Library Source using Visual Studio

Visual Studio 2008 has built-in debugger support to automatically step-into and debug this code on demand (VS 2008 can pull down the source for the appropriate .NET Framework library file automatically for you).

Lots of other improvements

The list above is only a small set of the improvements coming. For client development VS 2008 includes WPF designer and project support. ClickOnce and WPF XBAPs now work with FireFox. WinForms and WPF projects can also now use the ASP.NET Application Services (Membership, Roles, Profile) for roaming user data.
Office development is much richer - including support for integrating with the Office 2007 ribbon, and with Outlook. Visual Studio Tools for Office support is also now built-into Visual Studio (you no longer need to buy a separate product).
New WCF and Workflow projects and designers are now included in VS 2008. Unit testing support is now much faster and included in VS Professional (and no longer just VSTS). Continuous Integration support is now built-in with TFS. AJAX web testing (unit and load) is now supported in the VS Test SKU. And there is much, much more...