Thursday, January 10, 2008

Little about Windows Service

Windows service is a long-running executable that performs specific functions and which is designed not to require user intervention. They are similar in concept to a Unix daemon.

Previously called an NT service, the core function of a Windows service is to run an application in the background. There are few things that make them different from a Windows application. A Windows service starts much before any user logs in to the system (if it has been setup to start at boot up process).

Windows services have their own processes, and hence run very efficiently.In windows 2000 you can view a list of services currently running on your computer by opening Control Panel -> Administrative Tools -> Services.

Wednesday, May 09, 2007

Nivio betas hosted Windows

Visit nivio, Try for 30days free trial


What is Web Desktop?
A web desktop or webtop is a network application system for integrating web applications into a web based work space. It is a virtual desktop on the web, running in a web browser as software.

Web desktops often are characterized by an environment similar to that of Windows, Mac, or Linux, but are now considered to have much more functionality being dependent on the internet. Typical benefits include the ability to save work and settings over the internet rather than to the local desktop.

History
The term Webtop was first introduced by the Santa Cruz Operation (SCO) in 1993 for a web-based interface to their UNIX operating system. Andy Bovingdon and Ronald Record, who both explored the concepts in different directions, are often credited as the inventors.[citation needed] The concept and technology originated from early commercial use of web server technology by SCO (SCO was the first OS vendor to include a web server), their X.desktop product line (obtained when they acquired IXI Limited in the UK, which was the first to have icons for URLs and an HTML-based help system) and the later Tarantella remote desktop technology which allowed real UNIX and Windows applications to be displayed within a web browser through the use of Java to form a true web based desktop or Webtop.

Nivio then took a full windows desktop with full user ability to installs applications on demand on a monthly rental and put it online with an offline device as well if the user never had a physical machine; the Nivio Platform was the first Desktop-over-IP that allowed users to actually be able to move from the traditional PC model.

Webtop versus Desktop
Advantages
1. Access to a personalized desktop from any internet enabled device on any
platform.
2. No need to install applications.
3. Application sharing among users located at different remote locations.

Drawbacks
1. Security: Due to the fact that all data is tranferred over the internet, it might be possible that a hacker intercepts the connection and reads data. Although with the use of https 256 bit encryption, this can be easily safe-guarded.
2. High speed internet: When using a web based desktop, the whole code used for visualisation (.js/.css files, flash player files, etc.) needs to be transferred to the local computer, so that it can be displayed.

Source of above article: wikipedia

Wednesday, April 11, 2007

inChorus




Tuesday, March 06, 2007

Introduction to .NET Assemblies

by Ramakrishna jillellamudi



What is an assembly?

* An Assembly is a logical unit of code
* Assembly physically exist as DLLs or EXEs
* One assembly can contain one or more files
* The constituent files can include any file types like image files, text files
etc. along with DLLs or EXEs
* When you compile your source code by default the exe/dll generated is actually
an assembly
* Unless your code is bundled as assembly it can not be used in any other
application
* When you talk about version of a component you are actually talking about
version of the assembly to which the component belongs.
* Every assembly file contains information about itself. This information is
called as Assembly Manifest.

What is assembly manifest?

* Assembly manifest is a data structure which stores information about an
assembly
* This information is stored within the assembly file(DLL/EXE) itself
* The information includes version information, list of constituent files etc.

What is private and shared assembly?

The assembly which is used only by a single application is called as private assembly. Suppose you created a DLL which encapsulates your business logic. This DLL will be used by your client application only and not by any other application. In order to run the application properly your DLL must reside in the same folder in which the client application is installed. Thus the assembly is private to your application.

Suppose that you are creating a general purpose DLL which provides functionality which will be used by variety of applications. Now, instead of each client application having its own copy of DLL you can place the DLL in 'global assembly cache'. Such assemblies are called as shared assemblies.


What is Global Assembly Cache?

Global assembly cache is nothing but a special disk folder where all the shared assemblies will be kept. It is located under :\WinNT\Assembly folder.
How assemblies avoid DLL Hell?

As stated earlier most of the assemblies are private. Hence each client application refers assemblies from its own installation folder. So, even though there are multiple versions of same assembly they will not conflict with each other. Consider following example :

* You created assembly Assembly1
* You also created a client application which uses Assembly1 say Client1
* You installed the client in C:\MyApp1 and also placed Assembly1 in this folder
* After some days you changed Assembly1
* You now created another application Client2 which uses this changed Assembly1
* You installed Client2 in C:\MyApp2 and also placed changed Assembly1 in this
folder
* Since both the clients are referring to their own versions of Assembly1
everything goes on smoothly

Now consider the case when you develop assembly that is shared one. In this case it is important to know how assemblies are versioned. All assemblies has a version number in the form:

major.minor.build.revision

If you change the original assembly the changed version will be considered compatible with existing one if the major and minor versions of both the assemblies match.

When the client application requests assembly the requested version number is matched against available versions and the version matching major and minor version numbers and having most latest build and revision number are supplied.
How do I create shared assemblies?

Following steps are involved in creating shared assemblies :

* Create your DLL/EXE source code
* Generate unique assembly name using SN utility
* Sign your DLL/EXE with the private key by modifying AssemblyInfo file
* Compile your DLL/EXE
* Place the resultant DLL/EXE in global assembly cache using AL utility


How do I create unique assembly name?

Microsoft now uses a public-private key pair to uniquely identify an assembly. These keys are generated using a utility called SN.exe (SN stands for shared name). The most common syntax of is :

sn -k mykeyfile.key

Where k represents that we want to generate a key and the file name followed is the file in which the keys will be stored.
How do I sign my DLL/EXE?

Before placing the assembly into shared cache you need to sign it using the keys we just generated. You mention the signing information in a special file called AssemblyInfo. Open the file from VS.NET solution explorer and change it to include following lines :

[assembly:AssemblyKeyFile("file_path")]

Now recompile the project and the assembly will be signed for you.

Note : You can also supply the key file information during command line compilation via /a.keyfile switch.
How do I place the assembly in shared cache?

Microsoft has provided a utility called AL.exe to actually place your assembly in shared cache.

AL /i:my_dll.dll

Now your dll will be placed at proper location by the utility.
Hands On...

Now, that we have understood the basics of assemblies let us apply our knowledge by developing a simple shared assembly.

In this example we will create a VB.NET component called SampleGAC ( GAC stands for Global Assembly Cache). We will also create a key file named sample.key. We will sign our component with this key file and place it in Global Assembly Cache.


* Step 1 : Creating our sample component

Here is the code for the component. It just includes one method which returns a string.

imports system

namespace BAJComponents
public class Sample
public function GetData() as string
return "hello world"
end function
end class
end namespace

* Step 2 : Generate a key file

To generate the key file issue following command at command prompt.

sn -k sample.key

This will generate the key file in the same folder

* Step 3 : Sign your component with the key

Now, wee will sign the assembly with the key file we just created.

vbc sampleGAC.vb /t:library /a.keyfile:sample.key

* Step 4 : Host the signed assembly in Global Assembly Cache

We will use AL utility to place the assembly in Global Assembly Cache.

AL /i:sampleGAC.dll

After hosting the assembly just go to WINNT\Assembly folder and you will find your assembly listed there. Note how the assembly folder is treated differently that normal folders.



* Step 5 : Test that our assembly works

Now, we will create a sample client application which uses our shared assembly. Just create a sample code as listed below :

imports system
imports BAJComponents
public class SampleTest
shared sub main()
dim x as new sample
dim s as string="x".getdata()
console.writeline(s)
end sub
end class

Compile above code using :

vbc sampletest.vb /t:exe /r:

Now, copy the resulting EXE in any other folder and run it. It will display "Hello World" indicating that it is using our shared assembly.

Friday, February 23, 2007

Explaining 'The Binding Handle Is Invalid'

Published Wednesday, January 04, 2006 8:57 AM by greggm

source link: http://blogs.msdn.com/greggm/archive/2006/01/04/509243.aspx



Explaining 'The Binding Handle Is Invalid'

Today I want to try to give more insight into the 'Binding Handle Is Invalid' problem that a number of people have reported with the VS 2005 debugger.

First, if all you care about is how to solve the problem: Enable the 'Terminal Services' service and reboot. If you want to know more, read on.

The Terminal Services service

I have seen many users say something like "I don't want to enable the Terminal Services service because it’s a security risk". While I certainly understand this fear, this stems from a misunderstanding of what the Terminal Services service provides.

Enabling the Terminal Services service does NOT automatically enable Remote Desktop. If you want Remote Desktop disabled, then uncheck the remote desktop checkbox on the Remote tab of the properties dialog for My Computer. By default, Remote Desktop is disabled on Window XP, so unless you have gone and enabled it, it should already be disabled on your computer.

So, why is this service enabled by default? The Terminal Services service is enabled by default because in addition to the Remote Desktop functionality, it also provides for Remote Assistance, Fast User Switching, process listing, DCOM support, and probably lots of other stuff that I don't know about because I don't work on the TS team. If you are running with the Terminal Services service disabled, then you are running in a strange and not recommended configuration. You also have a broken Task Manager, and probably a bunch of other things that directly or indirectly rely on this service.

So please, regardless of what you want to do with Visual Studio, don't disable this service.

The Debugger

So why does the debugger rely on the Terminal Services service? The answer: Process listing. It turns out that the TS team provides the best task list API in Windows. Both tasklist.exe and taskmgr.exe use the TS service for this, and so it was natural for the debugger to follow their lead. Previous versions of Visual Studio got their task list through other task list APIs, but it turns out that this only works well if you run your code as LocalSystem. This was fine at the time because we had a service. However, for improved security and stability, the debugger got rid of their service for the 2005 release, so we needed to switch to the TS process listing API.

Why do you have such a lousy error message? Unfortunately, we didn't understand this problem until the very last days of the VS 2005 product cycle, and we didn't understand how many people run this way until after we shipped. At this point, it was too late to do anything about it. As the dev who wrote this code, I can only say that I am sorry that this has been such a hassle for you.

Are you guys going to fix this issue? We won't be able to completely fix the problem because the WTSEnumerateProcess API provides information that we can't get anywhere else. However, we can work around the problem in most of the common scenarios. I hope to see us ship this workaround in the next service pack. Furthermore, I expect to see us ship this work around in the next version of Visual Studio. However, I don't expect us to release this work around as a QFE because at this point at least, we don't think that this action would be in our customer's interest. QFEs are expensive to deploy for both Microsoft and our customers and generally, carry higher risk of potentially breaking other scenarios. The TS team has recommended that the Terminal Services service be enabled, so we believe that this is the right solution to address this issue.

What is affected? Any scenario where the debugger is told to attach to a process that is already running. This includes all ASP.NET scenarios, launching a C#/VB/J# project (unless the Visual Studio hosting process has been disabled), or manually trying to attach via the Attach To Processes dialog.



Related Links:

(good link)
http://kenno.wordpress.com/2006/06/25/the-binding-handle-is-invalid-error-in-visual-studio-2005/

http://grave.redirectme.net/devb/2006/04/22/the-binding-handle-is-invalid/

http://odalet.wordpress.com/2006/09/01/impossible-de-lancer-le-debugger-de-visual-studio-2005/

https://blogs.msdn.com/habibh/archive/2005/11/10/491572.aspx

Wednesday, February 14, 2007

EBooks Websites Free

Some Websites where you get lots of ebooks:

http://ebookslink.50g.com





http://www.freizeit.co.in

ftp://194.44.214.3/pub/e-books/

http://ebookslib.com

http://www.programmerworld.net/dotnet/books.htm

http://www.freebooksource.com/

www.programmingebooks.tk

www.free-itebooks.com

www.ebooks.com

www.intelligentedu.com/free_computer_books.html

www.click-now.net

www.developersbooks.com

www.techbooksforfree.com

www.freetechbooks.com

www.apress.com/free/index.html

www.itquestionbank.com

www.canonicalbooks.com/free-ebooks.shtml

www.diesel-ebooks.com/cgi-bin/category/COM051230/Programming-Software-Development.html

www.e-dsp.com/free-ebooks

http://e-library.net/Programming.htm

www.ebookmall.com

www.blogmarks.net/marks/tag/programming,ebooks

www.computer-books.us

http://cooldogebooks.blogspot.com

www.onlinecomputerbooks.com

www.ebooklobby.com/35/Programming

www.ebookexplorer.com/Computing/Programming.html

www.ebookslibrary.com/Computers_and_Internet_EBooks/Programming

www.goldenstarebooks.com/ebooks/2/programming-ebook.htm

www.digitalbookindex.com

www.csebooks.com

www.free-ebooks.net

www.freebookzone.com

www.ereader.com

www.ebooksportal.org

www.linux-tutorial.info

www.ebooks-download.com

www.info4java.com/free_ebooks

www.fictionwise.com/ebooks

www.techtoolblog.com/archives/195-free-online-programming-books

www.it-ebook.com/booklist.html

Monday, February 12, 2007

What's the difference between string and String?

In C# the type keywords actually are synonyms for the types. So int = System.Int32 short = System.Int16 and string = System.String.

They have the keywords because they are easier to remember and programmers coming from other languages like c/c++ would also be familiar with these types

Anyway, look at the C# keyword reference and you can find these things out. This was taken from the string keyword reference.

The string type represents a string of Unicode characters. string is an alias for String in the .NET Framework. Strings are immutable--the contents of a string object cannot be changed after the object is created.