MegaPowerStar ALLU ARJUN - Ikkada Kot...   Independent houses near kukatpally | Apartments in Pragathi Nagar | AndhraVaani.com | Log Out | Topics | Search
Register | Edit Profile

Bewarse Talk � Archives � Cine Talk - Reviews, Gossips, Insider Info etc. � Archive through August 09, 2004 � MegaPowerStar ALLU ARJUN - Ikkada Kottuku saavandi � Previous Next �

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Andhrawala
Bewarse
Username: Andhrawala

Post Number: 779
Registered: 03-2004
Posted From: 192.58.204.226

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 11:29 am:   Edit PostDelete PostView Post/Check IP

Boss,
nee email ram@idlebrain.com or something else.

surname tho vundhemo anukunta. marchipoyaa.
ram@idlebrain ante bounce ayyindhi.

u can mail me sai@idlebrain.com and I will send then
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1482
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 11:06 am:   Edit PostDelete PostView Post/Check IP

SEND ME BOTH THE SCREEN SHOTS

1) Internet explorer bar lo Site adress type chessaka vache result and

2) VS Studio lo result

ram(kushi)
I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1481
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 10:58 am:   Edit PostDelete PostView Post/Check IP

A error screen shot naku mail cheyyi na id telusu kada neeku.. Nenu dinner ki veli vastha..

ram(kushi)
I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Andhrawala
Bewarse
Username: Andhrawala

Post Number: 778
Registered: 03-2004
Posted From: 192.58.204.226

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 10:57 am:   Edit PostDelete PostView Post/Check IP

Kushi mama,

I am seeing the webservices in the IE or browser window.

Only probelm is I am unable to refer them as they were not listed in that box and gives error at that place
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1480
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 10:51 am:   Edit PostDelete PostView Post/Check IP

AW mava okka pani cheyyi.. velli A SITE address ne Internet explorer bar lo elli type ceeyi..

it should show the list of webservices supported .. AADI Rakapothe then the link u are typing in the address bar in VS STUIDO IS wrong..

Neeku local IIS akkarledu.. if u are accessing the webservices from intranet.

A site ki neeku permissions unte challu.

Ram(Kushi)
I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Andhrawala
Bewarse
Username: Andhrawala

Post Number: 775
Registered: 03-2004
Posted From: 192.58.204.226

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 10:48 am:   Edit PostDelete PostView Post/Check IP

Webservice vachi intranet site lo vundhi.

Naa machine meedha nenu develop chesthunna website ki IIS vundhi for Dev environment
Top of pagePrevious messageNext messageBottom of page Link to this message

Andhrawala
Bewarse
Username: Andhrawala

Post Number: 774
Registered: 03-2004
Posted From: 192.58.204.226

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 10:47 am:   Edit PostDelete PostView Post/Check IP

>>Do you see the list of webservices supported by the website in the box . Select one of those then the add web references button will be enabled.

That is where the problem comes and error is displayed in that box only
Top of pagePrevious messageNext messageBottom of page Link to this message

Andhrawala
Bewarse
Username: Andhrawala

Post Number: 773
Registered: 03-2004
Posted From: 192.58.204.226

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 10:37 am:   Edit PostDelete PostView Post/Check IP

J4F mama,

Other people are able to access that webservice.

Do I need to configure IIS on my machine for this
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1479
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 10:34 am:   Edit PostDelete PostView Post/Check IP

Do you see the list of webservices supported by the website in the box . Select one of those then the add web references button will be enabled.

HEHE Intranet site antavu malli Locally IIS running antavu .. is the site hosted from your PC

ram(kushi)
I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Andhrawala
Bewarse
Username: Andhrawala

Post Number: 772
Registered: 03-2004
Posted From: 192.58.204.226

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 10:19 am:   Edit PostDelete PostView Post/Check IP

Kushi mama,

Website display avvuthunnadhi.

I get that message in the box where its says 'webservices found at this url' The Add Reference button remains disabled.

I have VS.Net and IIS installed locally.
Top of pagePrevious messageNext messageBottom of page Link to this message

Acf
Pilla Bewarse
Username: Acf

Post Number: 96
Registered: 03-2004
Posted From: 210.214.163.171

Rating: 
Votes: 2 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:55 am:   Edit PostDelete PostView Post/Check IP

OT babai aa thread lo pudingi laaga evo questions ani vellipoyaadu.
aa reply ikkada vesthunnna

OT,

enduku mama nuvvu ANTI HEROES la success ni assalu oppukovu..

ARYA SUPERDUPER HIT - aaa level ki thagge prasakthe ledu.

aina A centers lone aadindi b,c lo pedda ledu ani edava edupulu
edusthaavu enduku.

ARYA ni INDUSTRY HIT ani evaru annaaru raa babu.
konni AREAS LO ALL TIME INDUSTRY RECORD srushtinchindi kaani
ALL TIME INDUSTRY HIT ani evvvvvadu analedu(hyd lo record oka example)


jr gaadi records chooseka nee mentality ila maaripoyindaa enti.

ARYA release ayyindi 99 prints and 110+ theatres and 50 days 94 centers
lo aadindi.

indulo kooda neeku thappulu ela kanipisthunnaayo naaku ardam kaavatam
ledu.

SIMHADRI ki chesinattu 165 prints tho release chesi 160 direct and 30
BOKULATHO 191 laaga publicity chesaaama???
ledu kada.
aina ALLU ARJUN vishayaallo neeku ila anipisthundantene thelusthundi
akkada HATRED ela vundo.

malli pai paiki pattinchukonatttu SHOW

ARYA 56 centers lo 100 days aina kaneesam genuine ani oppukuntaavu
anukunna kaani enthaina mee cinemaalu ala aadinchukone sariki
anni cinemaalu laaguthunnaru ane mind set vachhesi vuntadi le neeku
anthe kada?

ARYA genuine 100s kaadante SSR kooda genuine gaa 30 jubilees aadaledu
anta nenu.

konni nijaalu aina oppukoni saavandraaaa.enduku ee EDUPU

deenemma NAGA ,AR lanti flop cinemalu 120+ centers lo 50 days
and 10 centers lo 100 days AAADISTHE avi sontha aadaayi ane rakam
nuvvu.
naaku thelda etii

ika nuvvu MEGA fans nunchi ARJUN fans ni veru cheyyadaaniki saraina
maataalu vaaduthunnaavu.

ee vishayam lo naaku JR NTR puttuka meeda oka PARAMA NAATU SAMAADHAANAM
vundi kaani cheppatam naaku ishtam ledu.


inka 2ND CINEMA record ani vesukovatam lo neeku ARJUN vishayam lo ne
enduku thappu kanapadindi.

JR and MAHESH babu cinemaalaki vesukonevaaru gurthu leda?????
konni jilla shares all time records kaakapothe MAHESH CINEMALO RECORD
JR NTR CINEMAALLO RECORD ani VESUKUNNAARU,.

alaantappudu ARJUN ki 2nd cinema record ani chepthe thappemundi?
jr ntr fav hero kaavatti maatladaledante adi OK
malli nuvvu mahesh ki ee point enduku laagaledu."MANA" vaadana???


oka pakka HATER vi aina pariseelakudu gaa nata viswaroopam chosthunte
naaku navvu aagatam ledu.

TARUN,ALI vishayam lo ala ane hakku neeku undi.
vaari konni cinemaalu kooda PEDDA HITS ayyaayi

kaani aa tharavaatha valla RANGE ee levelo thelusu kada.

ARJUN vishayam lo kooda nuvvu tarun range lo vundi pothadu ani nuvvu
bramapaduthunnaavu kaani ARJUN future RANGE ee range lo untundo maaku
thelusu.

nee bodi opinion prasthuthaaniki ila vundi.
inka ARJUN chesindi 2 movies ne brother. mee jr gallu choodaalsina
CHUKKALU chaaala vunnaaayi.


questions annaavu kada.
answers choosuko.

nuvvu enni anukunnna
Bharatam lo Arjunudiki Eduru ledu Cine Bhartatamlo ee ARJUNudiki tiruguledu


JR to bhoomika:em parlede pai paine. my comment: ee lopala vishayam leda?
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1475
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:49 am:   Edit PostDelete PostView Post/Check IP

J4F mava aadi intranet lo hosted anta.. Link sariga ivvaledu mannodu.. AADI Correct sethe vachetadi..

IIS local pc lo ledu intranet server lo undi anukunta

ram(kushi)
I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Kurra Bewarse
Username: Just4fun

Post Number: 160
Registered: 03-2004
Posted From: 192.128.167.68

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:45 am:   Edit PostDelete PostView Post/Check IP

AW mama your webservice is not started properly or published... check that and restart your server and u'll get it...
There is nothing either good or bad, but thinking makes it so.
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1474
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:29 am:   Edit PostDelete PostView Post/Check IP

>>>The underlying connection was closed: Unable to connect to the remote server

Address correct ichava.. Try accessing the address you gave in internet explorer and see

ram(kushi)
I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1472
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:28 am:   Edit PostDelete PostView Post/Check IP

AW Mama check whether the web service extensions are installed on the IIS or not.

Tell me one thing did u install IIS after installing .Net framework or the other way.

ram(kushi)
I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Andhrawala
Bewarse
Username: Andhrawala

Post Number: 770
Registered: 03-2004
Posted From: 192.58.204.226

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:27 am:   Edit PostDelete PostView Post/Check IP

Kushi mama,

Trying to use a webservice. When I add a webreference in Visual Studio I am getting this error.

There was an error downloading [url path].
The url is from one of the intranet site in the company

The underlying connection was closed: Unable to connect to the remote server

What do u think is the reason
Top of pagePrevious messageNext messageBottom of page Link to this message

Naidubawa
Pilla Bewarse
Username: Naidubawa

Post Number: 50
Registered: 07-2004
Posted From: 24.6.212.198

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:22 am:   Edit PostDelete PostView Post/Check IP

deeni parent thread lo posts egiripothunnai. thondaraga sadukondi. :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Naidubawa
Pilla Bewarse
Username: Naidubawa

Post Number: 48
Registered: 07-2004
Posted From: 24.6.212.198

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:11 am:   Edit PostDelete PostView Post/Check IP

Story

Ajay (Siva) is a spoilt brat and is the son of local MP Avataram (Rajan P Dev). He likes Geeta (Anuradha Mehta) and proposes her. When she refuses, he threatens that he would jump from the college top. Being a meek girl, Geeta accepts the proposal and starts dating him.

Arya (Allu Arjun) is a carefree guy with positive attitude. He falls in love with Geeta at the first sight. He proposes her in front of her boyfriend. She bluntly refuses. The rest of the film is all about how he wins Geeta with his attitude and positive outlook.

Artists Performance

Allu Arjun: If you attribute the success of Gangotri to K Raghavendra Rao and write off Allu Arjun as a hero, you are in a soup. With his exceptionally great performance in 'Arya', hero Allu Arjun announces that he is here to stay and to leave a mark of his own. All those guys who admire Chiranjeevi's dancing skills would end up thinking like how great it would have been if Chiranjeevi ever get someone compose dances like Allu Arjun has done in 'Takadhinatom' song. Allu Arjun is simply awesome in dances. He is natural in his histrionics. He is amazing in stunt sequences. However, he looks like imitating Pawan Kalyan (of Kushi) in few college scenes. He also needs to get his dialogues modulated in the right way. He has a cool dressing sense.

Anuradha Mehta: Anuradha Mehta is OK. She looks good in half sarees towards the climax of the film. She did well with in her limits. She has a broader frame and has certain similarities to Katrina Kaif. Savita's dubbing has become monotonous these days. They should have tried a fresh dubbing artist for Anuradha.

Others: Siva is good as adamant, at times confused, lover. He generated comedy in few scenes where he shows his frustration. Subbaraju is terrific as henchman to villain. Vidya is natural and lovable as the friend of heroine. Venu Madhav and Devi Charan got good footage and generated neat comedy. Babloo did the roll of hero's buddy. Sunil did a guest role of a TT called 'Punch Falaknama'. The kids in the film also have done well.

Technical Departments:

Story - Screenplay - dialogues - direction: Story of the film is wafer-thin. It is absolutely impossible to direct a flick with such a frail story line. But the debutant Sukumar handled this film with terrific characterizations and an extraordinary screenplay. The director Sukumar has exhibited great sensibility while executing few shots in the film. He fails you to guess the next scene most of the times. I do often wonder while looking at a few Tamil films that why our Telugu directors cannot execute such creative shots. Here is an answer in the form of Sukumar. Dialogues by Sukumar are apt and are sprinkled with sensible humor. Simple and effective like 'Repu morning - Arya ki warning'! Here are few scenes that leave a lasting impression -

1. The heroine asks Arya in the beginning of the film: 'Enduku extralu chestunnav'
The same heroine says to Arya in the climax: Kasepu nenu Arya laga, nuvvu nenu laaga anukundama?' That is the beauty of Arya's characterization. In the beginning of the film, you end up thinking why hero is doing extras. And as the film progresses, you fall in love with that character.

2. The love letter written by Arya. The following scene of girls reading it out in a classical song mode. The subsequent hate letter to the heroine's friend.

3. The scene in which Arya cracks his whip up on surroundings of baddies instead of attacking them in order to show what he is capable of doing.

4. The birthday gift Arya gives to Geeta.

5. The driving scene where Arya shows variation in the pitch of his voice as per the visibility of Geeta in the mirror.

6. The scene in which Arya leads Siva and Geeta to railway station and coolly says - 'vallu vaste appudu parigette badulu. Mundu parigetti vallaku chikkakunda vundadam manchidi kada'.

7. The entire thread of Arya trying to score goal by putting a stone into a cup placed at a distance.

8. The scene in which they do the role play and she proposes to Arya that she loves him. And the subsequent scene where Geeta leaves crying. (Actually the director has shown it effectively how other people get hurt when you refuse the proposal).

9. The scene in which the kids come up with a farewell gift to Geeta.

Music: Music by Devi Sri Prasad is extraordinary. Be it songs or background score. Devi Sri Prasad has exhibited his command over all departments of music and came up with a complete musical. It is nice to see Devi Sri Prasad reaching great heights at a young age. His music is full of energy and verve. Here is the description of six songs as per the order in the film

1. Takadhimithom: It is the introduction song for hero. Allu Arjun proves that he is the best among the youth heroes when it comes to dancing. He has got grace. He is at home as he makes the most difficult steps appear casually done on the screen. Choreographer Harish Pai came up with some awesome stuff.

2. Feel My Love: It is a melody song picturized on hero about how much he loves heroine. It is a montage song. Nixon choreographed this song. There is so much of rhythm in the body language of Allu Arjun. He improvised few steps of Michael Jackson and performed with a great élan. Chandra Bose's lyrics for this song depict the exact state of mind of Arya.

3. You Rock My World: This is the song before interval. It's a pub song where Allu Arjun breaks into song to entertain crowds. Raju Sundaram has done a fantastic job for this song. It's a hip and happening song.

4. Oh My brotheru: It's an entertaining situational song where hero expresses the luxuries and comforts of being a one-sided lover. There is so much of philosophical (with simple words) meaning in the lyrics of Sirivennela. Ashok choreographed for this cool song.

5. Aa ante Amalapuram: This is the fifth song in the film. It's a complete mass item number picturized atop of a moving train (like Chayya Chayya of Dil Se film) on Allu Arjun and Abhinaya Sri. Shankar choreographed it. It falls little short of what we expect after listening to the song in audio player.

6. Nuvvante: This is the best song in the film as far as the content is concerned. It's situational song which provides some privacy to Arya and Geeta so that they can explore the feelings of each other.

Photography: The photography by Ratnavelu is amazing. The first shot of the film itself shows the class of this new cinematographer. You find the visual richness that can only be found in the films that are directed by Mani Ratnam. Ratnavelu is extremely creative, immensely talented and has got a great future ahead.

Other departments: Stunts by Ram Lakshman are very powerful. The fights are measured ones, efficient and are very believable. Editing by Marthand K Venkatesh is crisp. I liked the editing cuts during the titles part a lot. Art work is trendy. Locations chosen are rare and they ooze freshness. Production values of this film are lavish. Producer Raju should be commended for selecting such a sensible storyline and employing the perfect cast and crew.

Inspirations: Here are certain inspirations we notice in this film

1. The crucial dialogue of Nuvvu Kavali (Naaku vaadikanna mundu I Love You enduku cheppaledu) is re-used in this film for a vital scene as it is.

2. The climax of the film is a typical Trivikramish one. Hero - being a too good to believe guy - doing arrangements at the heroines marriage ala Nuvvu Naaku Nachav.

Analysis: First half of the film is full of fun. The second half is good. The last half an hour of the film (especially after the last song) is great. You feel like you are watching a Mani Rathnam film. Thanks to majestic visuals (Rathnevelu - cinematographer), splendid music (Devi Sri Prasad - music director) and marvelous framing (Sukumar - director)! There is a soul in the film and you end up having a thin layer of tears in your eyes while leaving the theater. This film announces the arrival of Sukumar - director - a class apart. 'Arya' is a must watch film for all Telugu film lovers. Don't miss it!!

Trade Talk: This film has generated unanimous super hit talk all over. This film was bought for 42 lakhs for Krishna territory. If we add the cost of print and publicity it would go up to 50 lakhs. This film is expected to amass a share of 80 lakhs to 1 crores in long run in Krishna territory. The range of success of 'Arya' would depend on how other films fare relatively in this summer season. This film has got typical urban look. Hence it may find less success in B and C centers.
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1471
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:11 am:   Edit PostDelete PostView Post/Check IP

3 4

Benefits of Assemblies
Assemblies afford the developer numerous benefits, including packaging, deployment, and versioning.

Assembly Packaging
One advantage of the ability to package multiple modules in a single physical file is performance improvement. When you create an application and deploy it using a multifile assembly, the .NET runtime needs to load only the required modules. This has the effect of reducing the working set of the application.

Assembly Deployment
The smallest unit of deployment in .NET is the assembly. As I mentioned previously, you can create a .netmodule with the /t:module switch, but you must include that module in an assembly if you wish to deploy it. In addition, although it's tempting to say that assemblies are a means of application deployment, this is not technically true. It's more accurate to view assemblies in .NET as a form of class deployment (much like a DLL in Win32), in which a single application can be made up of many assemblies.

Because assemblies are self-describing, the easiest method of deploying them is copying the assembly to the desired destination folder. Then when you attempt to run an application contained in the assembly, the manifest will instruct the .NET runtime as to the modules that are contained in the assembly. In addition, the assembly also contains references to any external assemblies that are needed by the application.

The most common means of deployment is though private assemblies-that is, assemblies that are copied to a folder and that are not shared. How do you specify a private assembly? This is the default and occurs automatically unless you explicitly make the assembly a shared assembly. Sharing assemblies takes a bit more work and is covered later in the section "Creating Shared Assemblies."

Assembly Versioning
Another great advantage to using assemblies is built-in versioning—specifically, the end of "DLL hell." "DLL hell" refers to the situation in which one application overwrites a DLL needed by another application, usually with an earlier version of the same DLL, breaking the first application. Although the Win32 resource file format does allow for a versioning resource type, the operating system doesn't enforce any versioning rules so that dependant applications will continue to function. This is solely the responsibility of application programmers.

As a means of addressing this issue, the manifest includes versioning information for the assembly as well as a list of all referenced assemblies and the versioning information for those assemblies. Because of this architecture, the .NET runtime can ensure that versioning policies are upheld and applications will continue to function even when newer, incompatible versions of shared DLLs are installed on the system. Because versioning is one of the biggest benefits of assemblies, it's covered in depth, including several examples, in "Versioning Assemblies."
3 4

Building Assemblies
If you create a DLL with the /t:library switch, you won't be able to add it to another assembly. This is because the compiler automatically generated a manifest for the DLL, and therefore the DLL itself is an assembly. To see this in action, look at the following example. We have a DLL (Module1Server.cs) that has a dummy type called Module1Server.

// Module1Server.cs
// build with the following command line switches
// csc /t:library Module1Server.cs
public class Module1Server
{
}

This DLL is then referenced by the client code (Module1Client.cs):


// Module1ClientApp.cs
// build with the following command line switches
// csc Module1ClientApp.cs /r:Module1Server.dll
using System;
using System.Diagnostics;
using System.Reflection;

class Module1ClientApp
{
public static void Main()
{
Assembly DLLAssembly = Assembly.GetAssembly(typeof(Module1Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.exe Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

Now let's say you built these two modules by using these switches:

csc /t:library Module1Server.cs
csc Module1ClientApp.cs /r:Module1Server.dll

Running the code at this point results in the following output and proves that both the EXE and the DLL exist in their own distinct assemblies:

Module1Server.dll Assembly Information
Module1Server, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Module1Client.dll Assembly Information
Module1Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null


In fact, if you were to change the access modifier of the Module1Server class from public to internal, the client code wouldn't compile because by definition the internal access modifier specifies that the type being modified is accessible only to other code in the same assembly.

Creating Assemblies that Have Multiple Modules
You can place both of the modules in our example into the same assembly in two ways. The first way is to change the switches used with the compiler. Here's an example:

// Module2Server.cs
// build with the following command line switches
// csc /t:module Module2Server.cs
internal class Module2Server
{
}

Notice that we can now use the internal access modifier so that the class is only accessible to code within the assembly.


// Module2ClientApp.cs
// build with the following command line switches
// csc /addmodule:Module2Server.netmodule Module2ClientApp.cs
using System;
using System.Diagnostics;
using System.Reflection;

class Module2ClientApp
{
public static void Main()
{
Assembly DLLAssembly =
Assembly.GetAssembly(typeof(Module2Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.dll Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

Notice how Module2Server.cs and Module2Client.exe are built:

csc /t:module Module2Server.cs
csc /addmodule:Module2Server.netmodule Module2Client.cs

First you must remove the /r switch because that switch is used only to reference assemblies and now both modules will reside in the same assembly. Then you must insert the /addmodule switch, which is used to tell the compiler which modules to add to the assembly that's being created.

Building and running the application now yields these results:

Module1Server.dll Assembly Information
Module2Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Module1Client.dll Assembly Information
Module2Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

Another way to create an assembly is with the Assembly Generation tool. This tool will take as its input one or more files that are either .NET modules (containing MSIL) or resource files and image files. The output is a file with an assembly manifest. For example, you would use the Assembly Generation tool if you had several DLLs and you wanted to distribute and version them as a single unit. Assuming that your DLLs were named A.DLL, B.DLL and C.DLL, you would use the al.exe application to create the composite assembly as follows:


al /out:COMPOSITE.DLL A.DLL B.DLL C.DLL

3 4

Creating Shared Assemblies
Sharing assemblies is done when an assembly is to be used with multiple applications and versioning is important. (We'll get to versioning in the next section.) To share an assembly, you must create a shared name (also known as a strong name) for the assembly by using the Strong Name tool that accompanies the .NET SDK. The four main four benefits derived from using strong names are the following:

It's the mechanism in .NET for generating a globally unique name.
Because the generated key pair (explained shortly) includes a signature, you can tell whether it's been tampered with after its original creation.
Strong names guarantee that a third party can't release a subsequent version of an assembly you built. Once again, this is because of signatures—the third party won't have your private key.
When .NET loads an assembly, the runtime can verify that the assembly came from the publisher that the caller is expecting.
The first step to creating a strong name is to use the Strong Name tool to create a key file for the assembly. This is done by specifying the -k switch with the name of the output file that will contain the key. Here we'll just make something up—InsideCSharp.key—and create the file as follows:

sn -k InsideCSharp.key

Upon running this, you should get a confirmation message like the following:

Key pair written to InsideCSharp.key

Now add the assembly:AssemblyKeyFile attribute to the source file. Here, I've created another simple set of files to illustrate how this is done:


// Module3Server.cs
// build with the following command line switches
// csc /t:module Module3Server.cs
internal class Module3Server
{
}

// Module3ClientApp.cs
// build with the following command line switches
// csc /addmodule:Module3Server.netmodule Module3ClientApp.cs
using System;
using System.Diagnostics;
using System.Reflection;

[assembly:AssemblyKeyFile("InsideCSharp.key")]

class Module3ClientApp
{
public static void Main()
{
Assembly DLLAssembly =
Assembly.GetAssembly(typeof(Module3Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.dll Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

As you can see, the assembly:AssemblyKeyFile attribute's constructor takes the name of the key file that was generated with the Strong Name utility and is the means by which you specify a key pair to be used to give your assembly a strong name. One more important point to understand is that this attribute is an assembly-level attribute. Therefore, technically, it can be placed in any file in the assembly and isn't attached to a specific class. However, it's customary to place this attribute just below the using statements and before any class definitions.

Now when you run the application, take note of the PublicKeyToken value of the assembly. This value was null in the previous two examples because those assemblies were considered to be private assemblies. However, now the assembly has been defined as a shared assembly, and so the assembly has an associated public key token.

Module3Server.dll Assembly Information
Module3Client, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=6ed7cef0c0065911
Module3Client.dll Assembly Information
Module3Client, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=6ed7cef0c0065911


According to the Assembly object that we instantiated for this demo assembly, it is shared. However, how do we know which assemblies in our .NET system are shared? The answer is the global assembly cache. In the next section, I'll cover this part of .NET and explain the role it plays in shared assemblies.

3 4

Working with the Global Assembly Cache
Every .NET installation has a code cache called the global assembly cache. This area serves three primary purposes:

It is used to store code downloaded from the Internet or other servers (both http and file servers). Note that code downloaded for a particular application is stored in the private portion of the cache—this prevents it from being accessed by others.
It is a data store for components shared by multiple .NET applications. Assemblies that are installed into the cache by using the Global Assembly Cache tool are stored in the global portion of the cache and are accessible by all applications on the machine.
One question I hear frequently is, "Where does the jitted code get stored such that my C# code is only jitted the first time it is executed?" Now you know the answer: native code versions of assemblies that have been prejitted are stored in the cache.
Viewing the Cache
Let's take a look at the cache to see the currently installed and shared assemblies. Using Microsoft Explorer, open the c:\winnt\assembly folder. To aid in viewing pertinent information about assemblies, .NET features a shell extension called the Assembly Cache Viewer (shfusion.dll). This tool enables you to view assembly information, such as the version number, culture, public key token, and even whether the assembly has been prejitted.

Another means of viewing the cache is by using the Global Assembly Cache tool. This tool enables you to perform several basic tasks by specifying any of the following (mutually exclusive) command-line switches.

-i This flag installs an assembly to the global assembly cache. An example would be the following:
gacutil -i HelloWorld.DLL
Shortly, you'll see how to add the Module3Client assembly to the cache by using this switch.

-u This flag uninstalls an assembly, including any version information, from the global assembly cache. If you don't specify the version information, all assemblies with the specified name are removed. Therefore, the first example here uninstalls all HelloWorld assemblies regardless of version number, and the second example uninstalls the specified version:
gacutil -u HelloWorld gacutil -u HelloWorld, ver=1,0,0,0
-l This flag lists the contents of the global assembly cache, including the assembly name, its version number, its location, and its shared name.
NOTE
-------------------------------------------------- ------------------------------
In some of the earlier .NET betas, one problem I noticed was that when exploring the c:\winnt\assembly folder, the shell extension did not execute. This was caused by the fact that the shfusion.dll extension did not register properly. If this happens on your system, open a command prompt and enter the following from the c:\winnt\Microsoft.net\framework\v XXX folder, where XXX represents the version number of the .NET Framework that you're running. Obviously, because I'm working with a beta, the folder name will change before .NET ships. Search for the shfusion.dll file, and use that folder. Here I've used the folder representing my current .NET build: c:\winnt\microsoft.net\framework\v1.0.2615>regsvr3 2 shfusion.dll

Now that you've created a public key file and assigned it to an assembly, let's add that assembly to the cache. To do that, type the following at the command prompt:

gacutil -i Module3ClientApp.exe

If all goes well, you should receive the following confirmation:

Assembly successfully added to the cache

At this point, you can use the gacutil -l command to view the assemblies listed in the cache and find the Module3Client, or you can use the Assembly Cache Viewer. Let's use the latter. If you open the cache in Windows Explorer (C:\Winnt\Assembly or C:\Windows\Assembly), you should now see the Module3Client assembly listed along with the other assemblies. Right-click that and select Properties, and you'll see things such as the public key value, version number, and physical location of the assembly on your hard disk. One point of reference is that your public key will be different than mine, but the main point is that it will be the same as that displayed by executing the Module3ClientApp application.

I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Naidubawa
Pilla Bewarse
Username: Naidubawa

Post Number: 47
Registered: 07-2004
Posted From: 24.6.212.198

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:10 am:   Edit PostDelete PostView Post/Check IP

Aishwarya Rai and Vivek Oberoi promoted their first film together, Kyun! Ho Gaya Na..., in the suburban Inorbit Mall in Mumbai.

Though the stars were running late by an hour, thousands of fans waited patiently to catch a glimpse. To keep the audience entertained, [singer] Kunal Ganjawala sang No no from Kyun! Ho Gaya Na... while some dancers joined him.

As soon as the lead couple arrived on the podium, Ash and Vivek said they were happy to see the huge response to their film. "You guys are just amazing. You have seen us together today. Now I hope you all will see us in theatres on August 13," Vivek yelled.

"This is an amazing experience," Ash cried after the event. "The crowd is very enthusiastic about Kyun! Ho Gaya Na... We had to cut short our function because we feared a stampede."
Top of pagePrevious messageNext messageBottom of page Link to this message

Azad
Vooriki Bewarse
Username: Azad

Post Number: 1471
Registered: 03-2004
Posted From: 80.143.177.246

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:10 am:   Edit PostDelete PostView Post/Check IP

kikiki
Want Canada Immigration??? change your sex as Mapleleafs
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1470
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:10 am:   Edit PostDelete PostView Post/Check IP

sdfdsf

Benefits of Assemblies
Assemblies afford the developer numerous benefits, including packaging, deployment, and versioning.

Assembly Packaging
One advantage of the ability to package multiple modules in a single physical file is performance improvement. When you create an application and deploy it using a multifile assembly, the .NET runtime needs to load only the required modules. This has the effect of reducing the working set of the application.

Assembly Deployment
The smallest unit of deployment in .NET is the assembly. As I mentioned previously, you can create a .netmodule with the /t:module switch, but you must include that module in an assembly if you wish to deploy it. In addition, although it's tempting to say that assemblies are a means of application deployment, this is not technically true. It's more accurate to view assemblies in .NET as a form of class deployment (much like a DLL in Win32), in which a single application can be made up of many assemblies.

Because assemblies are self-describing, the easiest method of deploying them is copying the assembly to the desired destination folder. Then when you attempt to run an application contained in the assembly, the manifest will instruct the .NET runtime as to the modules that are contained in the assembly. In addition, the assembly also contains references to any external assemblies that are needed by the application.

The most common means of deployment is though private assemblies-that is, assemblies that are copied to a folder and that are not shared. How do you specify a private assembly? This is the default and occurs automatically unless you explicitly make the assembly a shared assembly. Sharing assemblies takes a bit more work and is covered later in the section "Creating Shared Assemblies."

Assembly Versioning
Another great advantage to using assemblies is built-in versioning—specifically, the end of "DLL hell." "DLL hell" refers to the situation in which one application overwrites a DLL needed by another application, usually with an earlier version of the same DLL, breaking the first application. Although the Win32 resource file format does allow for a versioning resource type, the operating system doesn't enforce any versioning rules so that dependant applications will continue to function. This is solely the responsibility of application programmers.

As a means of addressing this issue, the manifest includes versioning information for the assembly as well as a list of all referenced assemblies and the versioning information for those assemblies. Because of this architecture, the .NET runtime can ensure that versioning policies are upheld and applications will continue to function even when newer, incompatible versions of shared DLLs are installed on the system. Because versioning is one of the biggest benefits of assemblies, it's covered in depth, including several examples, in "Versioning Assemblies."
3 4

Building Assemblies
If you create a DLL with the /t:library switch, you won't be able to add it to another assembly. This is because the compiler automatically generated a manifest for the DLL, and therefore the DLL itself is an assembly. To see this in action, look at the following example. We have a DLL (Module1Server.cs) that has a dummy type called Module1Server.

// Module1Server.cs
// build with the following command line switches
// csc /t:library Module1Server.cs
public class Module1Server
{
}

This DLL is then referenced by the client code (Module1Client.cs):


// Module1ClientApp.cs
// build with the following command line switches
// csc Module1ClientApp.cs /r:Module1Server.dll
using System;
using System.Diagnostics;
using System.Reflection;

class Module1ClientApp
{
public static void Main()
{
Assembly DLLAssembly = Assembly.GetAssembly(typeof(Module1Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.exe Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

Now let's say you built these two modules by using these switches:

csc /t:library Module1Server.cs
csc Module1ClientApp.cs /r:Module1Server.dll

Running the code at this point results in the following output and proves that both the EXE and the DLL exist in their own distinct assemblies:

Module1Server.dll Assembly Information
Module1Server, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Module1Client.dll Assembly Information
Module1Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null


In fact, if you were to change the access modifier of the Module1Server class from public to internal, the client code wouldn't compile because by definition the internal access modifier specifies that the type being modified is accessible only to other code in the same assembly.

Creating Assemblies that Have Multiple Modules
You can place both of the modules in our example into the same assembly in two ways. The first way is to change the switches used with the compiler. Here's an example:

// Module2Server.cs
// build with the following command line switches
// csc /t:module Module2Server.cs
internal class Module2Server
{
}

Notice that we can now use the internal access modifier so that the class is only accessible to code within the assembly.


// Module2ClientApp.cs
// build with the following command line switches
// csc /addmodule:Module2Server.netmodule Module2ClientApp.cs
using System;
using System.Diagnostics;
using System.Reflection;

class Module2ClientApp
{
public static void Main()
{
Assembly DLLAssembly =
Assembly.GetAssembly(typeof(Module2Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.dll Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

Notice how Module2Server.cs and Module2Client.exe are built:

csc /t:module Module2Server.cs
csc /addmodule:Module2Server.netmodule Module2Client.cs

First you must remove the /r switch because that switch is used only to reference assemblies and now both modules will reside in the same assembly. Then you must insert the /addmodule switch, which is used to tell the compiler which modules to add to the assembly that's being created.

Building and running the application now yields these results:

Module1Server.dll Assembly Information
Module2Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Module1Client.dll Assembly Information
Module2Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

Another way to create an assembly is with the Assembly Generation tool. This tool will take as its input one or more files that are either .NET modules (containing MSIL) or resource files and image files. The output is a file with an assembly manifest. For example, you would use the Assembly Generation tool if you had several DLLs and you wanted to distribute and version them as a single unit. Assuming that your DLLs were named A.DLL, B.DLL and C.DLL, you would use the al.exe application to create the composite assembly as follows:


al /out:COMPOSITE.DLL A.DLL B.DLL C.DLL

3 4

Creating Shared Assemblies
Sharing assemblies is done when an assembly is to be used with multiple applications and versioning is important. (We'll get to versioning in the next section.) To share an assembly, you must create a shared name (also known as a strong name) for the assembly by using the Strong Name tool that accompanies the .NET SDK. The four main four benefits derived from using strong names are the following:

It's the mechanism in .NET for generating a globally unique name.
Because the generated key pair (explained shortly) includes a signature, you can tell whether it's been tampered with after its original creation.
Strong names guarantee that a third party can't release a subsequent version of an assembly you built. Once again, this is because of signatures—the third party won't have your private key.
When .NET loads an assembly, the runtime can verify that the assembly came from the publisher that the caller is expecting.
The first step to creating a strong name is to use the Strong Name tool to create a key file for the assembly. This is done by specifying the -k switch with the name of the output file that will contain the key. Here we'll just make something up—InsideCSharp.key—and create the file as follows:

sn -k InsideCSharp.key

Upon running this, you should get a confirmation message like the following:

Key pair written to InsideCSharp.key

Now add the assembly:AssemblyKeyFile attribute to the source file. Here, I've created another simple set of files to illustrate how this is done:


// Module3Server.cs
// build with the following command line switches
// csc /t:module Module3Server.cs
internal class Module3Server
{
}

// Module3ClientApp.cs
// build with the following command line switches
// csc /addmodule:Module3Server.netmodule Module3ClientApp.cs
using System;
using System.Diagnostics;
using System.Reflection;

[assembly:AssemblyKeyFile("InsideCSharp.key")]

class Module3ClientApp
{
public static void Main()
{
Assembly DLLAssembly =
Assembly.GetAssembly(typeof(Module3Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.dll Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

As you can see, the assembly:AssemblyKeyFile attribute's constructor takes the name of the key file that was generated with the Strong Name utility and is the means by which you specify a key pair to be used to give your assembly a strong name. One more important point to understand is that this attribute is an assembly-level attribute. Therefore, technically, it can be placed in any file in the assembly and isn't attached to a specific class. However, it's customary to place this attribute just below the using statements and before any class definitions.

Now when you run the application, take note of the PublicKeyToken value of the assembly. This value was null in the previous two examples because those assemblies were considered to be private assemblies. However, now the assembly has been defined as a shared assembly, and so the assembly has an associated public key token.

Module3Server.dll Assembly Information
Module3Client, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=6ed7cef0c0065911
Module3Client.dll Assembly Information
Module3Client, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=6ed7cef0c0065911


According to the Assembly object that we instantiated for this demo assembly, it is shared. However, how do we know which assemblies in our .NET system are shared? The answer is the global assembly cache. In the next section, I'll cover this part of .NET and explain the role it plays in shared assemblies.

3 4

Working with the Global Assembly Cache
Every .NET installation has a code cache called the global assembly cache. This area serves three primary purposes:

It is used to store code downloaded from the Internet or other servers (both http and file servers). Note that code downloaded for a particular application is stored in the private portion of the cache—this prevents it from being accessed by others.
It is a data store for components shared by multiple .NET applications. Assemblies that are installed into the cache by using the Global Assembly Cache tool are stored in the global portion of the cache and are accessible by all applications on the machine.
One question I hear frequently is, "Where does the jitted code get stored such that my C# code is only jitted the first time it is executed?" Now you know the answer: native code versions of assemblies that have been prejitted are stored in the cache.
Viewing the Cache
Let's take a look at the cache to see the currently installed and shared assemblies. Using Microsoft Explorer, open the c:\winnt\assembly folder. To aid in viewing pertinent information about assemblies, .NET features a shell extension called the Assembly Cache Viewer (shfusion.dll). This tool enables you to view assembly information, such as the version number, culture, public key token, and even whether the assembly has been prejitted.

Another means of viewing the cache is by using the Global Assembly Cache tool. This tool enables you to perform several basic tasks by specifying any of the following (mutually exclusive) command-line switches.

-i This flag installs an assembly to the global assembly cache. An example would be the following:
gacutil -i HelloWorld.DLL
Shortly, you'll see how to add the Module3Client assembly to the cache by using this switch.

-u This flag uninstalls an assembly, including any version information, from the global assembly cache. If you don't specify the version information, all assemblies with the specified name are removed. Therefore, the first example here uninstalls all HelloWorld assemblies regardless of version number, and the second example uninstalls the specified version:
gacutil -u HelloWorld gacutil -u HelloWorld, ver=1,0,0,0
-l This flag lists the contents of the global assembly cache, including the assembly name, its version number, its location, and its shared name.
NOTE
-------------------------------------------------- ------------------------------
In some of the earlier .NET betas, one problem I noticed was that when exploring the c:\winnt\assembly folder, the shell extension did not execute. This was caused by the fact that the shfusion.dll extension did not register properly. If this happens on your system, open a command prompt and enter the following from the c:\winnt\Microsoft.net\framework\v XXX folder, where XXX represents the version number of the .NET Framework that you're running. Obviously, because I'm working with a beta, the folder name will change before .NET ships. Search for the shfusion.dll file, and use that folder. Here I've used the folder representing my current .NET build: c:\winnt\microsoft.net\framework\v1.0.2615>regsvr3 2 shfusion.dll

Now that you've created a public key file and assigned it to an assembly, let's add that assembly to the cache. To do that, type the following at the command prompt:

gacutil -i Module3ClientApp.exe

If all goes well, you should receive the following confirmation:

Assembly successfully added to the cache

At this point, you can use the gacutil -l command to view the assemblies listed in the cache and find the Module3Client, or you can use the Assembly Cache Viewer. Let's use the latter. If you open the cache in Windows Explorer (C:\Winnt\Assembly or C:\Windows\Assembly), you should now see the Module3Client assembly listed along with the other assemblies. Right-click that and select Properties, and you'll see things such as the public key value, version number, and physical location of the assembly on your hard disk. One point of reference is that your public key will be different than mine, but the main point is that it will be the same as that displayed by executing the Module3ClientApp application.

I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Kushi_ram
Vooriki Bewarse
Username: Kushi_ram

Post Number: 1469
Registered: 04-2004
Posted From: 203.200.38.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:08 am:   Edit PostDelete PostView Post/Check IP

3 4

Benefits of Assemblies
Assemblies afford the developer numerous benefits, including packaging, deployment, and versioning.

Assembly Packaging
One advantage of the ability to package multiple modules in a single physical file is performance improvement. When you create an application and deploy it using a multifile assembly, the .NET runtime needs to load only the required modules. This has the effect of reducing the working set of the application.

Assembly Deployment
The smallest unit of deployment in .NET is the assembly. As I mentioned previously, you can create a .netmodule with the /t:module switch, but you must include that module in an assembly if you wish to deploy it. In addition, although it's tempting to say that assemblies are a means of application deployment, this is not technically true. It's more accurate to view assemblies in .NET as a form of class deployment (much like a DLL in Win32), in which a single application can be made up of many assemblies.

Because assemblies are self-describing, the easiest method of deploying them is copying the assembly to the desired destination folder. Then when you attempt to run an application contained in the assembly, the manifest will instruct the .NET runtime as to the modules that are contained in the assembly. In addition, the assembly also contains references to any external assemblies that are needed by the application.

The most common means of deployment is though private assemblies-that is, assemblies that are copied to a folder and that are not shared. How do you specify a private assembly? This is the default and occurs automatically unless you explicitly make the assembly a shared assembly. Sharing assemblies takes a bit more work and is covered later in the section "Creating Shared Assemblies."

Assembly Versioning
Another great advantage to using assemblies is built-in versioning—specifically, the end of "DLL hell." "DLL hell" refers to the situation in which one application overwrites a DLL needed by another application, usually with an earlier version of the same DLL, breaking the first application. Although the Win32 resource file format does allow for a versioning resource type, the operating system doesn't enforce any versioning rules so that dependant applications will continue to function. This is solely the responsibility of application programmers.

As a means of addressing this issue, the manifest includes versioning information for the assembly as well as a list of all referenced assemblies and the versioning information for those assemblies. Because of this architecture, the .NET runtime can ensure that versioning policies are upheld and applications will continue to function even when newer, incompatible versions of shared DLLs are installed on the system. Because versioning is one of the biggest benefits of assemblies, it's covered in depth, including several examples, in "Versioning Assemblies."
3 4

Building Assemblies
If you create a DLL with the /t:library switch, you won't be able to add it to another assembly. This is because the compiler automatically generated a manifest for the DLL, and therefore the DLL itself is an assembly. To see this in action, look at the following example. We have a DLL (Module1Server.cs) that has a dummy type called Module1Server.

// Module1Server.cs
// build with the following command line switches
// csc /t:library Module1Server.cs
public class Module1Server
{
}

This DLL is then referenced by the client code (Module1Client.cs):


// Module1ClientApp.cs
// build with the following command line switches
// csc Module1ClientApp.cs /r:Module1Server.dll
using System;
using System.Diagnostics;
using System.Reflection;

class Module1ClientApp
{
public static void Main()
{
Assembly DLLAssembly = Assembly.GetAssembly(typeof(Module1Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.exe Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

Now let's say you built these two modules by using these switches:

csc /t:library Module1Server.cs
csc Module1ClientApp.cs /r:Module1Server.dll

Running the code at this point results in the following output and proves that both the EXE and the DLL exist in their own distinct assemblies:

Module1Server.dll Assembly Information
Module1Server, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Module1Client.dll Assembly Information
Module1Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null


In fact, if you were to change the access modifier of the Module1Server class from public to internal, the client code wouldn't compile because by definition the internal access modifier specifies that the type being modified is accessible only to other code in the same assembly.

Creating Assemblies that Have Multiple Modules
You can place both of the modules in our example into the same assembly in two ways. The first way is to change the switches used with the compiler. Here's an example:

// Module2Server.cs
// build with the following command line switches
// csc /t:module Module2Server.cs
internal class Module2Server
{
}

Notice that we can now use the internal access modifier so that the class is only accessible to code within the assembly.


// Module2ClientApp.cs
// build with the following command line switches
// csc /addmodule:Module2Server.netmodule Module2ClientApp.cs
using System;
using System.Diagnostics;
using System.Reflection;

class Module2ClientApp
{
public static void Main()
{
Assembly DLLAssembly =
Assembly.GetAssembly(typeof(Module2Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.dll Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

Notice how Module2Server.cs and Module2Client.exe are built:

csc /t:module Module2Server.cs
csc /addmodule:Module2Server.netmodule Module2Client.cs

First you must remove the /r switch because that switch is used only to reference assemblies and now both modules will reside in the same assembly. Then you must insert the /addmodule switch, which is used to tell the compiler which modules to add to the assembly that's being created.

Building and running the application now yields these results:

Module1Server.dll Assembly Information
Module2Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Module1Client.dll Assembly Information
Module2Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

Another way to create an assembly is with the Assembly Generation tool. This tool will take as its input one or more files that are either .NET modules (containing MSIL) or resource files and image files. The output is a file with an assembly manifest. For example, you would use the Assembly Generation tool if you had several DLLs and you wanted to distribute and version them as a single unit. Assuming that your DLLs were named A.DLL, B.DLL and C.DLL, you would use the al.exe application to create the composite assembly as follows:


al /out:COMPOSITE.DLL A.DLL B.DLL C.DLL

3 4

Creating Shared Assemblies
Sharing assemblies is done when an assembly is to be used with multiple applications and versioning is important. (We'll get to versioning in the next section.) To share an assembly, you must create a shared name (also known as a strong name) for the assembly by using the Strong Name tool that accompanies the .NET SDK. The four main four benefits derived from using strong names are the following:

It's the mechanism in .NET for generating a globally unique name.
Because the generated key pair (explained shortly) includes a signature, you can tell whether it's been tampered with after its original creation.
Strong names guarantee that a third party can't release a subsequent version of an assembly you built. Once again, this is because of signatures—the third party won't have your private key.
When .NET loads an assembly, the runtime can verify that the assembly came from the publisher that the caller is expecting.
The first step to creating a strong name is to use the Strong Name tool to create a key file for the assembly. This is done by specifying the -k switch with the name of the output file that will contain the key. Here we'll just make something up—InsideCSharp.key—and create the file as follows:

sn -k InsideCSharp.key

Upon running this, you should get a confirmation message like the following:

Key pair written to InsideCSharp.key

Now add the assembly:AssemblyKeyFile attribute to the source file. Here, I've created another simple set of files to illustrate how this is done:


// Module3Server.cs
// build with the following command line switches
// csc /t:module Module3Server.cs
internal class Module3Server
{
}

// Module3ClientApp.cs
// build with the following command line switches
// csc /addmodule:Module3Server.netmodule Module3ClientApp.cs
using System;
using System.Diagnostics;
using System.Reflection;

[assembly:AssemblyKeyFile("InsideCSharp.key")]

class Module3ClientApp
{
public static void Main()
{
Assembly DLLAssembly =
Assembly.GetAssembly(typeof(Module3Server));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);

Process p = Process.GetCurrentProcess();
string AssemblyName = p.ProcessName + ".exe";
Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName);
Console.WriteLine("Module1Client.dll Assembly Information");
Console.WriteLine("\t" + ThisAssembly);
}
}

As you can see, the assembly:AssemblyKeyFile attribute's constructor takes the name of the key file that was generated with the Strong Name utility and is the means by which you specify a key pair to be used to give your assembly a strong name. One more important point to understand is that this attribute is an assembly-level attribute. Therefore, technically, it can be placed in any file in the assembly and isn't attached to a specific class. However, it's customary to place this attribute just below the using statements and before any class definitions.

Now when you run the application, take note of the PublicKeyToken value of the assembly. This value was null in the previous two examples because those assemblies were considered to be private assemblies. However, now the assembly has been defined as a shared assembly, and so the assembly has an associated public key token.

Module3Server.dll Assembly Information
Module3Client, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=6ed7cef0c0065911
Module3Client.dll Assembly Information
Module3Client, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=6ed7cef0c0065911


According to the Assembly object that we instantiated for this demo assembly, it is shared. However, how do we know which assemblies in our .NET system are shared? The answer is the global assembly cache. In the next section, I'll cover this part of .NET and explain the role it plays in shared assemblies.

3 4

Working with the Global Assembly Cache
Every .NET installation has a code cache called the global assembly cache. This area serves three primary purposes:

It is used to store code downloaded from the Internet or other servers (both http and file servers). Note that code downloaded for a particular application is stored in the private portion of the cache—this prevents it from being accessed by others.
It is a data store for components shared by multiple .NET applications. Assemblies that are installed into the cache by using the Global Assembly Cache tool are stored in the global portion of the cache and are accessible by all applications on the machine.
One question I hear frequently is, "Where does the jitted code get stored such that my C# code is only jitted the first time it is executed?" Now you know the answer: native code versions of assemblies that have been prejitted are stored in the cache.
Viewing the Cache
Let's take a look at the cache to see the currently installed and shared assemblies. Using Microsoft Explorer, open the c:\winnt\assembly folder. To aid in viewing pertinent information about assemblies, .NET features a shell extension called the Assembly Cache Viewer (shfusion.dll). This tool enables you to view assembly information, such as the version number, culture, public key token, and even whether the assembly has been prejitted.

Another means of viewing the cache is by using the Global Assembly Cache tool. This tool enables you to perform several basic tasks by specifying any of the following (mutually exclusive) command-line switches.

-i This flag installs an assembly to the global assembly cache. An example would be the following:
gacutil -i HelloWorld.DLL
Shortly, you'll see how to add the Module3Client assembly to the cache by using this switch.

-u This flag uninstalls an assembly, including any version information, from the global assembly cache. If you don't specify the version information, all assemblies with the specified name are removed. Therefore, the first example here uninstalls all HelloWorld assemblies regardless of version number, and the second example uninstalls the specified version:
gacutil -u HelloWorld gacutil -u HelloWorld, ver=1,0,0,0
-l This flag lists the contents of the global assembly cache, including the assembly name, its version number, its location, and its shared name.
NOTE
-------------------------------------------------- ------------------------------
In some of the earlier .NET betas, one problem I noticed was that when exploring the c:\winnt\assembly folder, the shell extension did not execute. This was caused by the fact that the shfusion.dll extension did not register properly. If this happens on your system, open a command prompt and enter the following from the c:\winnt\Microsoft.net\framework\v XXX folder, where XXX represents the version number of the .NET Framework that you're running. Obviously, because I'm working with a beta, the folder name will change before .NET ships. Search for the shfusion.dll file, and use that folder. Here I've used the folder representing my current .NET build: c:\winnt\microsoft.net\framework\v1.0.2615>regsvr3 2 shfusion.dll

Now that you've created a public key file and assigned it to an assembly, let's add that assembly to the cache. To do that, type the following at the command prompt:

gacutil -i Module3ClientApp.exe

If all goes well, you should receive the following confirmation:

Assembly successfully added to the cache

At this point, you can use the gacutil -l command to view the assemblies listed in the cache and find the Module3Client, or you can use the Assembly Cache Viewer. Let's use the latter. If you open the cache in Windows Explorer (C:\Winnt\Assembly or C:\Windows\Assembly), you should now see the Module3Client assembly listed along with the other assemblies. Right-click that and select Properties, and you'll see things such as the public key value, version number, and physical location of the assembly on your hard disk. One point of reference is that your public key will be different than mine, but the main point is that it will be the same as that displayed by executing the Module3ClientApp application.

I have not failed. I have found 10000 ways that wont work.
Top of pagePrevious messageNext messageBottom of page Link to this message

Cinejeevi
Vooriki Bewarse
Username: Cinejeevi

Post Number: 1166
Registered: 03-2004
Posted From: 64.51.51.214

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, July 21, 2004 - 9:06 am:   Edit PostDelete PostView Post/Check IP

aa arya 75 days thread load avadam ledu.

ikkada dobbinchukondi. That thread is closed
nannu GANDHI antunnaru