|
I'm working with PerformanceCounter and I'm noticing very strange behaviour.
I can't add any instances to my counters once instances have been removed?
For example our application creates and destroys 'things' at runtime that I
want to add and remove from the perfmon instance list. The first instances
appear but I'm unable to get the new instances (same name & different names)
to appear! Even if I restart my process (Windows Service) I'm unable to even
add the first instances back. I'm forced to reboot the server!
Does anyone have any suggestions? Anything to do with object references?
|
|
|
|
|
Why does dotnet add the instances to performance counter all in lower case?
Other counters on the system seem to use mixed case.
Also simple changing the InstanceName and setting its value does not seem to
be enough to create a new instance under perfmon. It appears as though you
must create new PerformanceCounter objects for each instance. Not what the
documentation states though!
|
|
|
|
|
solidstore wrote:
Also simple changing the InstanceName and setting its value does not seem to
be enough to create a new instance under perfmon. It appears as though you
must create new PerformanceCounter objects for each instance. Not what the
documentation states though!
Wrong! If you look at the IL, you will see the last 2 instructions:
L_003e: call PerformanceCounter.Close
L_0043: ret
Now look at the NextValue call tree (thanks to Reflector). You will notice that PerfomanceCounter.Initialize() is called everytime, hence being closed, it will re-initialize.
MyDUMeter: a .NET DUMeter clone
|
|
|
|
|
I'm working with PerformanceCounter and I'm noticing very strange behaviour.
I can't add any instances to my counters? I used to have a single _Total
instance but now I change my code so that there is meant to be several
instances. I've followed all the examples etc... but no joy. I understand
the instance is meant to be created when you first set the counters value
and that you can reuse the PerformanceCounter object for multiple instances
by just changing the InstanceName before setting the RawValue. Does anyone
have any suggestions?
|
|
|
|
|
Is it possible to write .NET applets similar to java applets?
--
Ignorant people upsets me.
|
|
|
|
|
With the previous version of Visual Basic, it was possible write ActiveX Controls that are functionally equivalent (and quite more powerful too!) to Java Applets.
With the current .NET framework, I think it should be possible to develop a control and host it from within Internet Explorer. A search over CodeProject or Google should give some results. It should be possible, since if you query the useragent of Microsoft Internet Explorer after installation of .NET framework, it reports as:
Mozilla/4.0(compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Deepak Kumar Vasudevan wrote:
since if you query the useragent of Microsoft Internet Explorer after installation of .NET framework
That's what triggered my question in the first place. I haven't found anything on the subject yet, but I must admit I didn't go out of my way to find anything either.
--
Ignorant people upsets me.
|
|
|
|
|
|
Thanks! I found an example somewhere on how to do it, but it was much more complicated than this and it had some major tradeoffs (can't remember what it was). This looks sweet and simple. I think I'll try it right away..
--
"It is amazing how f-ing crazy I really am."
|
|
|
|
|
Google for "SimpleControl".
Then google for "Chris Sells", because he's written a few articles on this subject (MSDN and MSDN magazine) Also look at http://www.sellsbrothers.com/wahoo[^],
Make sure you know something about .Net code access security, permissions and codegroups, because you're gonna see security permission exceptions...
VictorV
|
|
|
|
|
I am not too sure if this is the right place for this post but..
I am developing a desktop application.
It is using JET as it's backend database. The mdb file typically resides on the local machine. I wanted to implement funcationaility where the mdb file could be shared. I tried to put a UNC (\\computer\my.mdb) as my path but it will not work. I know that the permissions are right on the other computer and all of that suff. I can open it no problem. Is the .NET Framework Security stuff restricting the files that I can access over the intranet? I know it does it with assemblies.
Any ideas?
Thanks,
Jonathan
|
|
|
|
|
make sure the user/pwd you use for connectoin authentication have privelages.
you might want to use a UDL (Universal Data Link) instead of UNC.
copy and save this to a .reg file then run, to install UDL in your shell
REGEDIT4
[HKEY_CLASSES_ROOT\.UDL]
@="MSDASC"
[HKEY_CLASSES_ROOT\.UDL\ShellNew]
@="MSDASC"
"Data"=hex:ff,fe,5b,00,6f,00,6c,00,65,00,64,00,62,00,5d,00,0d,00,0a,00,3b,00,\
20,00,45,00,76,00,65,00,72,00,79,00,74,00,68,00,69,00,6e,00,67,00,20,00,61,\
00,66,00,74,00,65,00,72,00,20,00,74,00,68,00,69,00,73,00,20,00,6c,00,69,00,\
6e,00,65,00,20,00,69,00,73,00,20,00,61,00,6e,00,20,00,4f,00,4c,00,45,00,20,\
00,44,00,42,00,20,00,69,00,6e,00,69,00,74,00,73,00,74,00,72,00,69,00,6e,00,\
67,00,0d,00,0a,00,50,00,52,00,4f,00,56,00,49,00,44,00,45,00,52,00,3d,00,6d,\
00,73,00,64,00,61,00,73,00,71,00,6c,00,3b,00,0d,00,0a,00
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Hi All,
I am working on a C# based Windows application.Using the following code
to
create an Excel object.
Excel.Application ExcelObj = new Excel.Application();
Its workin fine for me, the problem is that i want to destroy this
object
when i exit form my method.
I am not able to delete this object.
Calling GC.Collect() Or MArshal.ReleaseComObject() waz not of any help.
Pls help.
Regards
Vitesh
|
|
|
|
|
Well, what is your need to destroy the object. CLR has garbage collection built-in, unless you have good reason you shouldn't explicitly try to delete/destroy. By calling dispose(), you can mark object for garbage collecting.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Excel is a funny beast.
When you say you cannot delete it, you mean the process does nto shut down.
You may find that if you set the Excel.Application to visible and someone clicked on it, its goes under 'usercontrol', in which case it starts behaving like a naughty com object.
Set the Usercontrol = false, Visible = false, and then try Application.Quit, and see if the process shuts down.
I think the property is usercontrol anyway. Been a while since I last looked at it.
Quote from a clever bloke :
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
|
|
|
|
|
Hi,
Does anyone know of a way of getting any scolling events from a ListView control ? I want to be able to fill a ListView control on demand (paging) as it can display very large amounts of data. So as the user scrolls down i access and load rows.
Can this be done with the standard .Net Control ? Or is there a 3rd party control that can do this ?
Thanks ... Andy
|
|
|
|
|
It sounds like you want the behaviour of a virtual ListView, where the data to draw each item, is asked for as items are scrolled into view. This is no problem in Win32/MFC, but the stock .Net ListView does not do this.
Even if you could monitor the scrolling events and try anticipating when certain items need full data, the LV's item collection would need to be filled with correct number of items first, else the scroll thumb and behaviour would be somewhat strange. My own experience suggests that adding items, even if they have blank data, is somewhat expensive in itself, unlike with a straight Win32 LV. The .Net LV tracks its own cache of at least certain data for each item, in its own collection.
There might be a 3rd party solution, but unfortunately I do not know of one. Implementing it would have to be largely from scratch, except for inheriting from Control, using delegates to retrieve data to be loaded into the rows. There are some articles on this site about custom drawing LVs, which might be of interest to you. Sorry I couldn't be more helpful.
Cheers
|
|
|
|
|
Is it possible to make submenus when you are adding designer verbs?
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
Hello CPians
I have a VS.NET project that creates an exe file.
I also have a Deployment project that creates an MSI for the exe.
What I need is to sign the exe before it goes into the MSI. how can that be done?
(I know how to sign it with signcode.exe, but when I build the deployment project it compiles the primary project and rewrite the exe)
thanks
Noam
Noam Ben Haim
Web Developer
Intel
noam.ben.chaim@intel.com
|
|
|
|
|
Hi,
I am developing a project in .NET (C#). I am trying to embed the email sending service in my project. I am able to send both plain and html formatted emails. But i m stuck in trying to get my style sheets and other flashy stuff appear in my html email. Can anyone tell me why my stylesheets and user controls just dont show up in the mail.
I would appreciate if anyone can come up with some suggestions,
Thanx.
Moinuddin
|
|
|
|
|
Am I blind, or did they leave out all the style and extended style flags so that you could set things like numeric only?
What, do I have to write an event handler?
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka
|
|
|
|
|
Guess they thought one would use NumericUpDown for numerics, so Case & PasswordChar were sufficient...
Some ideas are so stupid that only an intellectual could have thought of them - George Orwell
|
|
|
|
|
HI, i've been exploring the net framework classes for a while and i didn't find a email class to send mails (pop3) . I'm missing or .NET does not owns a class like that? i think, Python brigs one in its class library, the NET framework, very much bigger, should do too
Thanks in Advance
Marcos
|
|
|
|
|
You can send email with SMTP.
Take a look at System.Web.Mail[^]. Then take a look at this article[^] to see an example usage.
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
Hi Marcos,
Do you want to Send Mails or Recieve Mails.
When you send mails, you use SMTP. POP3 is used for recieving emails. This clears and solves your first sentence of your posting.
Regarding your doubt regarding .NET Framework classes to send mails, check out
System.Web.Mail
(It has an exhaustive collection of classes and methods to send mail)
Check out http://www.c-sharpcorner.com/ for some code snippets in checking mails using POP3.)
deepak
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|