|
Hi all,
When i Run my Asp.net project.So, Aspnet_wp consume 100 % of CPU,I m using Win XP with SP2, VS 2003 and IIS 5.0,
i m also uninstall and then installl VS 2003 and IIS. but problem remain same.
plz advice
Thanx in advance
Sajjad Rizvi
|
|
|
|
|
|
imshally81 wrote:
m also uninstall and then installl VS 2003 and IIS. but problem remain same.
Sorry, but that is funny.
Your code is obviously stuck somewhere. Try running in debug and breaking to see where the problem is.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
We (previous company) had something similar at one stage.
Turned out that the "lead developer" was logging database errors to the database - including db not found type errors - so the error handling was recursing itself until the memory fell over.
Under some conditions some times the webserver would spike just like yours.
Maybe run Profiler and sp_who when this happens and see what's causing the damage.
Cheers,
Simon
sig :: "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG blog:: brokenkeyboards "Most of us are programmers, but a few use VB", Christian Graus
|
|
|
|
|
Thanx for all,
I solve the also,
it is Programing BUG......
a loop enter in the Infinite state, so this Problem occur,
I think it is not a DotNET bug....
Any Discussion or Comments are highly appreciated.....
Sajjad
|
|
|
|
|
imshally81 wrote:
I think it is not a DotNET bug....
That was immediately obvious to almost everyone, I think.
Never assume the bug is not yours, until you've established that it cannot possibly be. Even then, don't be too sure.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi.
I have to create some kind of event tracker class, which should register hooking handlers to events. I need a method
RegisterEvent (object target, Delegate handler)
in which I add handler to event (target). Target is probalby System.MulticastDelegate. Is it possible to do that, even when I don't know the event name? I want to avoid changing this method to
RegisterEvent(object target, Delegate handler, string eventName).
All examples that I've found use GetEvent(name) from reflection, and than EventInfo.AddHandler(..)
Pszat
|
|
|
|
|
I'm not sure what exactly you want. How can you subscribe to an event without having anything to identify it?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
No idea how to do it if target is a delegate, but here is a way to add a handler to all the events in an object that are the same type as the handler:
public void RegisterEvents(object eventSource, Delegate handler)<br />
{<br />
if (eventSource == null || handler == null)<br />
{<br />
return;<br />
}<br />
<br />
EventInfo[] events = eventSource.GetType().GetEvents();<br />
<br />
if (events.Length > 0)<br />
{<br />
foreach (EventInfo eventInfo in events)<br />
{<br />
if (eventInfo.EventHandlerType == handler.GetType())<br />
{<br />
eventInfo.AddEventHandler(eventSource, handler);<br />
}<br />
}<br />
}<br />
}
"I think I speak on behalf of everyone here when I say huh?" - Buffy
|
|
|
|
|
when i want to handle the event from a remote object there is an error telling me Can Not find ... assembply.
the object can be referenced but not events.
i really appreciate any help since i couldnt understand how to solve it.
|
|
|
|
|
show me your codes , maybe i can help you
you can mail to gavin@m165.com
|
|
|
|
|
A new version of Portable.NET, the Free implementation of Common Language Infrastructure, is finally available. The new version features numerous performance improvements, fixes for WinForms and Xml, and many other changes - read the full list of changes. The new release also brings a new runtime package (at this stage for Windows systems only) - at just under 2MB its goal is to solve the problem of redistributing large runtimes. More details.
Full Portable.NET SDK for Windows will be available by the end of the week, so check back for updates
|
|
|
|
|
Subject says it all...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can anyone tell me how to schedule a nightly team build on VS 2005 foundation build server? Also, what should a release build do besides copying the compiled files to production server?
|
|
|
|
|
|
Hi,
i got a (kind of graphic editor) c#.NET application where i needed to implement double buffering (using a memory bitmap).
now i got a real problem in my MouseMove handler when moving objects cause i gotta copy the whole bitmap to screen (using Graphics.DrawImage(...) ) on every MouseMove event (~ 1280 * 1024 px).
the problem is that GDI+ is soo f***in slow and takes about 50 millisec to render one memory bitmap to screen (i tried the same using c++, mfc and thus GDI32 and it takes about 6 to 8 msec / to copy a bitmap to screen [BitBlt(...) ]; and both times i've been using the QueryPerformanceCounter API to get an accurate execution time interval)
so am i missing anything or is GDI+ + c#.NET REALLY soooo slow?
is there ANY other way than porting the whole code to use imported GDI32 APIs ?
thanks alot!
daniel.
|
|
|
|
|
Are you using DrawImageUnscaled ? That's faster.
Other than that, why on earth do you need to copy the whole bitmap to screen every time you move the mouse ? Sounds like you need to optimise your code ( for example, just invalidate the area you're changing ). I've written paint programs in C# that refresh the screen on mouse move, and they work just fine.
Of course, it is still true that if you want speed, you should be using C++.
Christian Graus - Microsoft MVP - C++
P.S. It's also true that you can pinvoke GDI if you really want to.
|
|
|
|
|
i'm not using DrawImageUnscaled, yet. thanks for the hint, i'll try this!
>Other than that, why on earth do you need to copy the whole bitmap to screen every time you move the
>mouse ? Sounds like you need to optimise your code ( for example, just invalidate the area you're
>changing ). I've written paint programs in C# that refresh the screen on mouse move, and they work
>just fine.
well...you're right, i dont need to copy the whole bitmap on every MouseMove, but what if the user
creates an object that fills quite the whole screen and wants to move it? or when he scrolls the
working area? the graphics should be displayed smoothly regardless of the object's size...
no question that only invalidating the area i'm changing would be nice optimization, but it should
also work without, cause it is still possible that i'm required to copy (quite) the whole screen...
|
|
|
|
|
I'm doing code that shows an image on the full screen and lets the user click and drag it. It's not as smooth as I would like, but it's acceptable. At the core, C# is indeed slower thant C++, that's a part of the decision to use it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
that's a part of the decision to use it.
...if it only would have been MY decision...
anyways, thanks for your help!
|
|
|
|
|
Christian Graus wrote:
At the core, C# is indeed slower thant C++
I don't want to start a big discussion but that's not true. Surely GDI+ is slower than GDI32 but you can improve the performance by calling the APIs directly. The speed will then be equally to C++ but you pay this off by having to use unmanaged stuff (which is not so nice in C# compared to C++).
|
|
|
|
|
Robert Rohde wrote:
you can improve the performance by calling the APIs directly.
Robert Rohde wrote:
by having to use unmanaged stuff
So, to recap - C# is as fast as C++ if you use it to call C++ APIs, so the work is done by C++ code ? That sounds like the 'VB6 is as good as C++' argument all over again.
Don't let the C++ MVP fool you, I use C# almost exclusively nowadays. But I would maintain that C++ is the faster language, for now. Making C# faster by getting it to call native methods kind of defeats the purpose, why not just use C++ ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
So, to recap - C# is as fast as C++ if you use it to call C++ APIs, so the work is done by C++ code ?
Now that's an real unfair statement. Unless we have some real innovative processors at some point managed code HAS to call unmanaged code - or how do you think a processor should understand it. If it is within the framwork or directly in your app by API calls does not make much difference (besides the matter of personal taste - I prefer MS doing this stuff ). This is true for every .NET class. The problem with GDI+ (like many other things in .NET) is that it doesn't reveal the power of the whole underlying windows APIs.
|
|
|
|
|
ok, i heard that often before. nearly everybody tells me c# isnt (much) slower. but WHY is it really a lot slower when i check this myself?
as i really wanted to know now, i tried it myself (and feel free to do so, too) and took both (c++ of VS 6.0 and c# of VS.Net 2003) and let them calculate fibonacci numbers up to n=40.
MY results are:
VS6.0 & c++: 2.580 seconds
VS.Net 2003 & c#: 5.019 seconds
(results should be accurate down to less than 1 msec)
so why does c# require almost 2 times the time c++ does?
PLEASE check this yourself, let me know if i'm right and also tell me if i'm not correct...
i'd really like to know the truth and not just rely on some weird microsoft benchmarks.
both tests were build in "Release" configuration, without debug information and with code
optimization a.s.o.
the code was (both times called in first constructor and immediatly after each other, so u can't say it depends on any other circumstances like free RAM or things like that....)
c#:
private long fib(long n)
{
if (n < 2)
return n;
return fib(n-1) + fib(n-2);
}
c++:
long fib(long n) {
if (n < 2)
return n;
return fib(n-1) + fib(n-2);
}
both times the result was 102334155. so what am i doing wrong? why is c# so much slower for me than c++? just because of the excessive recursion and stack usage? should i try an example concerning
"only" function calls or memory access? or check the speed of _dynamic_ array operations?
second thing i don't understand is (and thx for the hint; i really need any solution and thus try this): you're saying c# and calling GDI+ APIs directly is as fast as c++; ok, but the GDI+ code remains the same wheather u call it directly or not. so if it's not GDI+ it has to be c# (what else?)... so isn't this in conflict with your first statement???
this should really be no offense, i only wanna know for sure how things are...
daniel.
|
|
|
|
|
l3st4rd wrote:
so why does c# require almost 2 times the time c++ does?
PLEASE check this yourself, let me know if i'm right and also tell me if i'm not correct...
Any .NET code gets compiled from MSIL the first time it is called. To do a proper benchmark, you need to generate the sequence twice, and time the second pass. Every function is compiled when it is first called.
l3st4rd wrote:
you're saying c# and calling GDI+ APIs directly is as fast as c++;
No, I said GDI. GDI is the way things are handled under the hood. HBITMAPs and BitBlt to HDCs.
l3st4rd wrote:
this should really be no offense, i only wanna know for sure how things are...
Not at all offended, glad to help.
Christian Graus - Microsoft MVP - C++
|
|
|
|