|
karanba wrote:
Does a user need dotnetfx.exe to see pages that writen in ASP.NET?
The end-user doesn't need the .NET framework installed to view an ASP.NET page. The server that is producing ASP.NET content needs to have the .NET framework installed.
karanba wrote:
And for big programs doesn't it slow the copile time with JIT.
S.Rod was misleading in his answer. What he said is true if you run the ngen tool on the assemblies that make up the big program. It also doesn't apply if the assemblies are used in an ASP.NET application.
In all other cases, methods are JITted when they are first run, then the native code is kept around until the application (maybe even the AppDomain) unloads or the underlying IL is marked as dirty. The next time the application is loaded all the methods need to be JITted again.
If you don't understand this right away; don't worry, its a confusing topic.
karanba wrote:
On a coputer does a C# program need to be copile just only for first time or every time with JIT.
This ties in above, but to re-answer. In most cases the program will be JITted every time it is run. Only ngen can change that, and it has no effect on ASP.NET applications.
James
"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
.thanx for all answers but I am not sure that get the subject. Please confirm me tha tif I understand truely.
(what is ngen?)
---------------------------------------------------
1. I wrote a program with some methods. Then when I built it with Visual studio.NET (or csc) all the things I wrote and other methods (like Console.write...) turned to MSIL. MSIL like something assembly (also this IL language could write directly by developer), so I get an .exe file.
2. When I clicked this .exe file anywhere (if .NET Framework is installed on the system) turned to native code by JIT (specific for the systems and for CPU) and runs. And this may done every time.
3. Only ngen can change that! what is ngen. How to use it.
4. One more... Doesn't it get security problems that MSIL can seen by using disassembler.
karanba
|
|
|
|
|
You must install .NET framework on a computer to run
.NET based applications on it. You can download .Net
Framework from Microsoft
|
|
|
|
|
Hi there,
I have a smart client that uses remoting via http channel and binary formatter. It is hosted in IIS.
Sending and receiving data works fine, except if a large amount of data is involved. Then I get the following error:
An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
Additional information: BinaryFormatter Version incompatibility. Expected Version 1.0. Received Version 1008738336.1684104552.
In web.config and client configuration file I specified the following:
<channels>
<channel ref="http">
<clientProviders>
<formatter ref="binary" />
</clientProviders>
<serverProviders>
<formatter ref="binary" />
<provider ref="wsdl"/>
</serverProviders>
</channel>
</channels>
Does anyone know why this error occurs and how I can solve it in order to be able to work with larger amounts of data?
Thanks!
Ludwig
|
|
|
|
|
I'm not sure how you're transfering the data. If your sending a huge array of bytes, try sending a reference to the stream instead. Just have your remoted object return a stream object instead of the bytes.
Hope this helps
-Steve
|
|
|
|
|
I'm attaching the dataset to a container object, that is sent to the client. At the client, it then becomes the datasource of a datagrid. I need the data to be at client side completely, because data can be grouped and if not all data is present, inaccurate results are shown.
So I think a reference to the data is not an option here?
Anyway, I changed the configuration files. The web.config now looks like this:
<channels>
<channel ref="http">
<serverProviders>
<formatter ref="binary" />
<provider ref="wsdl"/>
</serverProviders>
</channel>
</channels>
and the client configuration file looks like this:
<channels>
<channel ref="http">
<clientProviders>
<formatter ref="binary" /> </clientProviders>
</channel>
</channels>
No I don't get the error anymore, instead I now get an 'out-of-memory' error!
Ludwig
|
|
|
|
|
Well, I probably found out the reason for this behaviour. In the event log I found the message:
"aspnet_wp.exe (PID: 1836) was recycled because memory consumption exceeded the 153 MB (60 percent of available RAM)."
The question is... how can I avoid my dataset being filled with too much data?
|
|
|
|
|
Sorry, I don't know. I'd really need a closer look at your code to understand what you're doing. Hopefully, someone else can give it a shot.
|
|
|
|
|
|
We ran into a similar issue with remoting large datasets, and came to the conclusion that if the dataset was large enough there were either memory leaks or at least garbage that was not reclaimed by GC in a timely fasion. There is an MSDN Mag article[^] that sheds some additional light on the issues. We ended up serializing the datasets ourselves, (basically into a collection of arraylists) and then reconstructing the dataset at the client from our custom object. This resulted in 30% less network bandwidth usage and a 100% speed increase. The fundamental problem seems to be that the contents of the dataset (datatables and datarelations) get seialized to XML even if the containing dataset is using a binary serializer, and in some cases this fails and some memory seems not to get reclaimed. Also, if the datasets are large, they get allocated on the large object heap which is not GC'd with the same frequency as other garbage (large objects are 'presumed' to have a longer lifetime... .
Some ideas are so stupid that only an intellectual could have thought of them - George Orwell
|
|
|
|
|
I am writing POP3 client in C#, i dont know how to get attchments from a mail. i am using Sockets to connect to a POP server. Any one know a generic way of seperating attachments from Mail contents. Any pointer?
Cheers,
Venkatraman Kalyanam
Chennai - India
"Being Excellent is not a skill, it is an attitude"
|
|
|
|
|
E-mail attachments are encoded using MIME, which is convoluted and ugly. I don't know of any free sources for decoding it. If your app will be GPL'd then you could gank some code from some *nix pop3 clients
I believe, the MIME 'standard' is documented as an RFC document.
FWIW, this is where I stopped writing my POP3 client as well
James
"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
|
Hey guys
Are any of you famaliar with how to dock windows to the side of the screen, like the Taskbar does and programs such as ICQ and AOL Instant Messenger. If anyone has done this or knows where I can find information I'd appreciate it if you could send me in the right direction
I'm using C# / .NET, by the way.
Thanks
Dan
|
|
|
|
|
CP Clickety[^]
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
|
What I want is a remoting host that keeps one copy of the remoted object for each of the clients. I need my host to act this way because each client will request and decode a message. If the message is correctly decoded, a private boolean variable in the remoted object is set to true. This is the only way I could think of to authenticate clients without going through a login process.
If my host uses Singleton mode: once one client authenticates itself, all the clients will be authenticated. In other words, authentication can be bypassed if a legitemate user is already in.
If my host uses SingleCall mode: once a client authenticates itself, the remoted object will be destroyed, and the client won't be able to call any subsequent functions.
I hope this makes sense. Any suggestions would be greatly appreciated.
Thanks,
Steve
|
|
|
|
|
|
It seems to be flavour of the month atm, but I'm trying to develop a generic plugin architecture for extending application functionality. To achieve this I have a dll that contains interfaces for a base addin (IBaseAddin) and an addin manager (IAddinManager).
I have an application in mind that is already written, I just need to move some of it's functionality out into addins, which will be tab pages. I also want other people to be able to produce addins for the application, so I am producing and SDK too. Essentially the SDK just extends the generic dll described above, so we have MyAddin which inherits from TabPage and implements IBaseAddin and I also have IMyAddinManager, which extends IAddinManager. This SDK is also a separate dll and any addins will be implemented in their own dll exporting a single type that inherits from MyAddin.
The main form in the application implements IMyAddinManager (i.e. it is the addin manager itself) and has a LoadAddins method which is responsible for loading all addins in the \addins\ folder and addin each one to the tab control of the main form. The code to achieve this looks something like this atm:
public void LoadAddins()
{
IAddinManager manager = this;
DirectoryInfo dirInfo = new DirectoryInfo(Environment.CurrentDirectory + @"\addins\");
FileInfo[] fileInfo = dirInfo.GetFiles("*.dll");
foreach(FileInfo fileInfo in Files)
{
Assembly assembly = Assembly.LoadFrom(fileInfo.FullName);
try
{
Type[] types = assembly.GetExportedTypes();
object addin = assembly.CreateInstance(types[0].FullName);
if((null != addin) && (addin is TabPage))
{
((MyAddin)addin).Manager = manager;
this.tabControl.Controls.Add(addin as TabPage);
this.addins.Add(addin as IBaseAddin);
}
}
catch(Exception exc)
{
System.Diagnostics.Debug.WriteLine(exc.Message);
}
}
}
The line that tries to set the Manager property throws a System.InvalidCastException even though the debugger allows me to browse all of the relevant properties, etc. and shows the correct type. Any ideas why this isn't working?
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
|
Hi!
There is a main form with a set of child controls (buttons, labels, editboxes, etc). I need to paint some graphics OVER these controls. Overriding MainForm.OnPaint does not help -- all graphics is overshadowed by the controls. Any ideas?
Regards,
dur_kart
|
|
|
|
|
i have a simple network of two computer (xp prof installed on both).i have created a user on both machine with same name and password and both are members of admin.. group.
i have created a service in c# i am running it in local system account.
but i could not access any file on the network of another computer in my service of c#?
could any body help me in this regard?
r00d0034@yahoo.com
|
|
|
|
|
The problem you're running into is that while the "local system" account has virtually unlimited power on one machine, it's got no authority whatsoever across the network.
With Windows XP, a new built-in account "Network Service" was added that can access resources on remote machines authenticated as the machine account. I think however that this requires your machines to be part of a domain. If so, running your service as Network Service is probably a good approach.
If your machines aren't part of a domain, then you'll need to configure the service to run under a local account with a matching account on the machine you want to access. The username and password must match, and I think the workgroup name may have to match as well, though I'm not sure about that. If you configure your service to run under this account, it should be able to access remote files on any other machine with a matching account.
Hope that helps
Burt Harris
|
|
|
|
|
1. Say I have Project A, which references Project B and Project B then references Project C. Why must I add a reference to Projects B AND C in Project A?
2. What can I do to resolve a circular dependency? I have an application that references a class library (separate dll), but that class library requries access to a class in the main application. Hey presto circular dependency
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
If you have 3 DLLs and the referencing works like this:
A refs B which refs C, then A doesn't need to reference C at all.
Unless, there B exposes parameters that exist in C or something like that.
This doesn't make much sense.
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
my svg article
|
|
|
|