|
Like Wesner said, the 2003 version of Visual Studio will contain a community version of "Dotfuscator", but you can already download it now.
I, too, am very worried about decompilation of my work. Anakrino makes it very easy to decompile any .net assembly function/type. With a little work, source code for an entire assembly can be reproduced from the DLLs and EXEs! Obfuscators will only slow down this process, but not disable it.
Any solutions appreciated...
VictorV
|
|
|
|
|
|
Well, I know several 'software engineers' who already do this... Damn, they are ahead in the game!
VictorV
|
|
|
|
|
Does anyone know if it is possible to get to the raw socket for the connection associated with an HttpRequest when writing an HttpHandler ?
|
|
|
|
|
The internal Socket connection is managed by the System.Net.Connection class. Unfortunately, there is no way to get this connection from the public properties of a current HttpWebRequest instance. You have to derive from this class.
|
|
|
|
|
hi,
beside a listbox,I put two buttons, one with up arrow icon, and one with down arrow icon.
I wish the selected item can be move up or down by pressing one of two buttons, for example,
there are 4 items in listbox, item1,item2,item3,item4, after selected item2, and press the up arrow button a time,the order become item2,item1,item3,item4, and if press the down arrow button three times,the order is
item1,item3,item4,item2.
and how can I do that?
thanks for any idea.
|
|
|
|
|
i have a clock function going . it is started by a seperate thread at the application startup
it works like this
while(myThread.IsAlive==true)
{StatusBarPanel.Text = DateTime.Now.ToString();}
it works but i want a more effientway (it eats too many cpu cycles) i tryed using timers.. i tryed reading the documentation but i cant seem to figure it out .. can someone PLEASE help me ? i dont understand i can import dll's all kinds of stuff.. but something as simple as this haunt's me. its got me up nights !!
Additional my program launches a recursive search agian with a new thread but set to the ThreadPriority.Highest Level i would like too disable this(clock) during that search.
|
|
|
|
|
|
I guess that would be the stack size limit.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
|
Well, you could increase the size of the stack, don't know what the limit is with .NET, on the other hand, I never came across a recursive function *that* recursive
And remember that there is always a perfomance hit on each function call.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
|
leppie wrote:
What do you mean by that? I have seen no difference between running it in a while(true) loop vs a recursive function.
Yes, the difference is very small, you should measure it in millisecons.
Every recursion makes a call to a function, there's a small penalty there. If you are using a virtual method is a little bit bigger (big as in really small )
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
Problem:
I can't seem to catch any file or directory activity events for IIS's log files.
I have seen this problem behavior before with both NT Shell Hooks and .Net FileSystemWatcher code (which I assume is basically hooking into the same NT event mechanisum)
Basically, I want to "scan" IIS logfile activity whenever a website is browsed.
I could use ISAPI filters but really wanted to just be "alerted" each time someone
hit's the site using FileSystemWatcher code.
But it don't work. How can one "watch" an (I assume) in memory file ???
Any ideas ???
|
|
|
|
|
This isn't the right way to do this for so many reasons.
First, because IIS writes logs to memory and batches a write operation from time to time (for which the actual file doesn't often change because enough space is allocated for several batch writes).
Second, you're right: ISAPI is a better solution; however, if you are interested in ASP.NET pages (after all, do you really want to know each request for an image, "robots.txt", "favicon.ico", etc.?), you can easily write an IHttpHandler that will write a custom log for you somewhere or use remoting to update a chart in a different application.
There is yet another option that already exists and one which you could extend: performance counters. If you look in your Computer Management MMC snap-in (right-click on "My Computer" and select "Manage..." for easy access), you'll see an extension for logs. You could start by creating your own log file there for this specific purpose. You can also see this in "perfmon.exe" for which you can setup new counters. The .NET Framework has good support for counters, too, so you can take advantage of the file in many ways.
Third, as I touched upon before, you don't want to be notified for requests to things like "robots.txt", "favicon.ico", and all the various spiders do you? If you're interested in legitimate hits to your *pages*, the IIS log will never tell you that unless you plan on parsing a very large file yourself every time it changes.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
Thanks for your input.
I didn't think of the PerfMon approach which seems to be as un-intrusive as one could
get which is what I was shooting for.
I will try out your suggestion.
Thanks again for your time.
Steve Cox
|
|
|
|
|
Problem:
I can't seem to catch any file or directory activity events for IIS's log files.
I have seen this problem behavior before with both NT Shell Hooks and .Net FileSystemWatcher code (which I assume is basically hooking into the same NT event mechanisum)
Basically, I want to "scan" IIS logfile activity whenever a website is browsed.
I could use ISAPI filters but really wanted to just be "alerted" each time someone
hit's the site using FileSystemWatcher code.
But it don't work. How can one "watch" an (I assume) in memory file ???
Any ideas ???
|
|
|
|
|
In Java, you can say:
if (obj instanceof java.lang.String)
{
}
What is the C# equivalent, if any?
|
|
|
|
|
if (obj is String)
|
|
|
|
|
(o.GetType().Equals(typeof(System.String))) for exact type equality.
(o is System.String) will also return true if o can be explicitly cast to String ...
Some ideas are so stupid that only an intellectual could have thought of them - George Orwell
|
|
|
|
|
As Nnamdi said, use the is keyword; but if you are just going to turn around and cast it, you should use as instead. as will do the cast and if it isn't of the correct type it will return null and you can check for that instead.
string str = obj as string;
if( str != null )
{
}
else
{
} HTH,
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
|
I put internet Exporer in a UserControl derived class and added this control to a form. When the form initializes at startup I get the following exception:
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dll
When a similar standalone application is created,the code runs fine.WHat might be the problem..Can anyone provide a solution?
Mani
|
|
|
|
|
Hi , any idea how to make a toolwindow not steal focus from the parent form?
what i mean is , when i show my window , i dont want it to gray-out the parents wnds caption.
ive tried to simple reset focus to the parent when i click something on the tooltip , but that makes the parent flicker.
ive tried to just dispose the wm_activate message in the wndproc , no luck there either (for some reason the parents caption dissappeared (??))
ive also tried to apply various styles to the window , like:
this.CreateParams.ClassName ="tooltips_class32";
this.CreateParams.Style=TTS_ALWAYSTIP | TTS_NOPREFIX | WS_POPUP;
this.CreateParams.Parent =ParentControl.Handle;
no luck there either...
any ideas??
//Roger
|
|
|
|
|
I admit I haven't done my homework here, but I need to have my application process files after they show up in a directory. The FileSystemWatcher seems like the perfect object to use. When I plug this guy in and add handlers for the FileCreated and FileChanged events, I catch 4 events for every file I copy into my directory; 1 file created and 3 file changed events (this is XP Pro). Is there a simple way to make this object give me 1 notification that a file has been copied and fully written to my directory? I really don't want to have to keep track of waiting for the 4th event. Thanks.
Ron
|
|
|
|