... on software development, architecture and more
What kinda engine? I'm assuming that it will be the 1.6HDI with 110bhp?
Now that would be nice when developing internet applications :)
Yup, it's gonna be the 1.6 , but not the HDI! Because I can drive a petrol car, I picked the 1.6 16V petrol engine. It's going to be in black metallic... I can hardly wait!
It can be, yes. But think about the benefits it can give you when you're developing one application for different platforms. This way, you can completely leave out platform dependent code by changing one directive. Sweet!
Cool car. I self have driven a Citroen C4 Coupe! Its a beautiful car but don't drive like a DS or a CX which are the best Citroens ever!
Shame you solt your bike. What kind of bike are you looking for now?
Marcel! I'm probably going to buy a Honda FireBlade. I'm looking around to see if I can find a nice one anywhere... But there's no rush.
I use it for compiling with cach options or not for example. It is a great way to develop all kind of options in the application and only by recompile it make the application cach stuff or not. You even can get the CPU type that is used while compiling, so you can specifie code for that CPU. Just loving it.
Bah... patsert!
BloggingAbout.net
How to use delegates when creating events for user controls.
//if eventhandler is implemented, trigger it if (ltcDelegate != null) { ltcDelegate(this, EventArgs.Empty); } Here you forgot one this, if the Target is a Control it meybe needs a Invoke. So a better code will be (wrote it out of my head): //if eventhandler is implemented, trigger it if (ltcDelegate != null) { Control c = ltcDelegate.Target as Control; if(c != null && c.InvokeRequired) { c.Invoke(ltcDelegate, new object[] {this, EventArgs.Empty}); } else ltcDelegate(this, EventArgs.Empty); }
You should see the amount of websites which are vulnerable for SQL-injection attacks, it sometimes makes me laugh. To illustrate, use google to search for pages like '.aspx?' and choose one! Another common mistake is the so called Cross Site Scripting. A technique in which it's posible to add extra tags to the page which is being called, a vulnerability which hotmail coped with several years ago (add tags to email, send to user and (by example) the tags will mail all the session information). It's all based on input- and output-validation.
Using Parameterized queries is also handy when inserting Date values, because you don't have to worry about the Date Format. And when inserting floating value's you don't have to worry about the decimal-seperator.
I don't like SP's for the simple fact that developers will ALWAYS put business logic in there. I know it's simple and sometimes, performance wise, a good solution, but I'd like to be on a project once where we try to solve problems outside the database. :)
ParamQuery
Well if you would use dOOdad all your queries are parametherized NEVER build a Datalayer again.. use one that works out of the BOX... MyGeneration with dOOdad
It is a nice guide and a must read. The most of the code will past the test against the guidlines. Only i never use space before flow control statemens and the guide says that is wrong. I write a if statement as follow: if(x == y) And the guidline says i must write it as follow: if (x == y) But i can't get used to it. Sorry Brad Abrams :)
This is great, we just banged our heads to this problem 3 weeks ago. But now there is a solution, thanks Gump for the notice!
No problem ;) I ran into this problem when I installed Office 2003 (as soon as it was out), at my former employer... A few months earlier we had updated a big Access project for a customer. We wanted to put it in SourceSafe, but to no avail. Now they can do it, because I'm working elsewhere now...
Hasn't notist the signature change of Curry, he is indeed funny, but all his signatures are.
Hmm, I think we have the same former employer :) And...don't worry, "they" are not going to use it...their busy enough figuring out how to retrieve/edit and putting back existing ASP.NET projects that are in Source Safe, without losing data :)
Sure looks great. Too bad about the $149 you need to pay
[quote]Too bad about the $149 you need to pay[/quote] So true... That's why I've registered for an evaluation copy and am using that one now. Good thing about that: I'm getting used to the refactoring stuff. bad thing about that: I want it!!!
Hi Guys: Is 149 USD really that much for a professional developer spend? Especially with all of the powerful features that save you loads of time (and pain)? Plus, if you pay for ReSharper now, you'll upgrade to ReSharper 2.0 for FREE (yes, FREE). Check out the plan for ReSharper 2.0: http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+2.0+Plan I mean, come on now, how cool is that .... ??? Best, David Stennett JetBrains, Inc.
I like it! But didn't buy it because i am waiting for VS.NET 2005 that is comming. But it is a nice tool, that really is. $149,- is not much, but to much for a tool i will shortly use.
So it is ReSharper afteral, can you give us some more info about the method that causes it?
To be sure ReSharper is to blame, I should try once without ReSharper. But not right now because of deadlines ;) The method that causes the error is a 'to be implemented' (meaning empty :p) method with the name CorrespondentieWorkflow.MediumRaadplegenByApplicatieId taking an integer parameter and returning a simple dataset. But as I said, I haven't come around to implementing that. So it's just a simple, empty method! Weird...
Haven't tried ReSharper yet and think i'll wait with it. The IntelliSense in VS has some bugs also but doesn't hang.
Hope to get some responce about Visual Studio .NET 2005 beta 2 soon. I've only tried the Express version and don't got the time to try the other version to.
questa, you don't need to wait to use ReSharper. The upgrade to VS.NET 2005 is free. You buy ReSharper 1.5 now, get the benefits now, and when 2.0 comes out (which supports VS.NET 2005), you get to upgrade for free. See http://www.jetbrains.com/resharper/buy/
Rick, have you sent a bug report? http://www.jetbrains.com/support/resharper/
You deserve it. You allways post i opening posts and hope to read some more in the future. Keep going!
Check out this link: http://www.microsoft.com/netherlands/msdn/betaexperience.aspx Next monday you should be able to order the Beta 2 dvd there (in case you don't want to download 4GB and can wait for a couple of days). And a lot of interesting example stuff will be included on the disc(s?).
@Rob: I haven't sent a bug report yet. I'm having the same problem today, and I think it has something to do with the fact one of my local properties has the same name as a class I'm using (because the local class only passes through method calls). I'll look into it further, and then I'll send my findings to jetbrains.
What forum is that and is that from Adam? :) Very funny indeed
Well, my guess is that only IE 7 will be released this summer. I expect the release of VS.NET 2005 at the end of this year.
I'm pretty optimistic about VS .Net 2005 for this summer. ;) For Internet Explorer 7, I would like Microsoft to introduce tabbed browsing. But I'm not sure if this will be happening....
IE 7 will have tab's as we can read on tweakers.net. With the new MSN Toolbar you can give IE6 the future of tabbrowsing. You can read the details here: http://www.tweakers.net/nieuws/37045
Simple and handy tool! I have added it to the tool menu of Visual Studio. I must say it is comes handy when working with RegEx. Thanks for the notice.
I have take look at Regulator, but it is to much overhead. The GUI is to complex for just a tool. But i must say it got some nice future's as the regexlib.com search.
Liked your explanation. It's simple and to the point. I am a VB 6.0 person and this was what I was looking for. Please keep them coming.
Rick, Although lots of people might find sympathy for www.one.org, I don't think this is the correct website for messages like these. I expect to find .Net related articles here. If we all start posting articles like this one, we might endup with lots of (spam like) non-.Net related articles. Regards, Alexander
Alexander, I sympathize with one.org. I posted this in the category 'personal' and am treating it as such. I've posted about my car (in the personal category) earlier and nobody complained. The only thing I might have done differently is not let that post be included in the aggregated site. I changed that for this post now, so it's fully personal. And some initiatives deserve a little attention, even on a .Net blog... Kind regards, Rick
In my humble opinion it is just good to post things like this. Gump's blog is a blog that contains some quality posts about .NET. If we can support organisations such as one.org, we must do. Rick's post about one.org has made me sign the declaration. As long as this blog will not become a 'how can i help the word' blog it doesn't harm anyone. But the next post i expect is a nice .NET post from you rick :)
It is from http://gatering.tweakers.net
Rob Harwood, VS.NET 2005 will have a lot of refactoring futures so imho you don't nee Resharper anymore. That is why i didn't buy it.
Is the quality so bad, can you add an example?
I am glad to hear it is solved now. Give Paint.NET some feedback about it and hope it gets solved.
Yes you indeed need some errorhandling. Atleast use using() statements for the disposable objects. Using this on website will kill your webserver performance. Better to use some kind of caching mechanism. But.. good commented code although I wouldn't go for a aspx page. Better to use a http handler that listens at some location for .jpg .jpeg .gif .png requests. Then this will happen automatically for any image file.
Looking forward to trying this code...
Victor, will you let me know how it turned out?
Dear Rick, With all respect, I think you confuse a few commenting issues here. First of all, a software developer declaring string s; should be covered in tar and feathers! (hmm... maybe I should check my own code before making that statement) Every professional developer knows he should use clear and descriptive names for the variables and objects. And with the developertools today with intellisense/code completion it isn't that much work either... Second: Placing comment on the same line as the code, or placing it before the code really doesn't make a difference. It all depends on tast. (However, I can imagine that some developers place comments before a section of code to state what they're about to do. And placing comment on the same line to explain a certain action. But still... it's all up to the developer (and the appropriate coding standards)) Third: "My thoughts about commenting are: don’t" My dear Rick, There is no way you can make this point stick. Even with the XML comments (what you call ‘three-slashes-comment-block’) in front of methods, there's no way you can explain everything that goes on in a complex method. Of course it's no use commenting the following code: string contactName; //name of contact but as soon as you do some more or less complex operation, you MUST comment the code. If not for yourself, then for the other developers that weill maintain the code after you left the project. So, my dear professional developer: please, please, please use commenting in your code!!!
Hehehehe, I love Ernst! I wish Patrick Wellink would come in and comment on XML Documentation in VB.NET But anyhow, don't use comments!!! But... I'm not finished. A lot of times I don't use comments that technically explain what is happening, but rather what that technical implentation does functionally. So no "I'm going into a loop here", but rather a "Here we loop through all rows to discover what records have a ..." etc. Something like that.
@Dennis, Of course you're right, but that's what I meant... Don't say: // if recordCount = 0, then go here if (recordCount == 0) { ...} but // if there are no records, then we'll delete the user from the database if (recordCount == 0) { ...} Something like that. :)
Dear Ernst, as I said in my post: I do use comments in code when there is some complex stuff going on, but I strongly believe comprehensive naming of classes, objects, methods and so on can limit code-commenting to an absolute minimum. As for my rather blunt statment: "don't comment": of course you should comment, but not because it's easier than naming things right. And as you probably know: exaggeration makes clear. And at least it draws attention. :p By the way: I've dug up my buckets of tar and feathers for some of my team members... ;) (...that's the reason I posted this...)
Hehehehe, I love Ernst! I wish Patrick Wellink would come in and comment on XML Documentation in VB.NET Even I as a crummy VB programmer docuemnt my code.. And yes Dennis... VB Code as well..... Just use VBCommenter and you are done with it... Run some nice NDOC shit and you have EXACTLY the same as what all the c# adepts are so keen about. But setting that aside.... I think you should comment your code. A lot of people are dumber then you... and as you know you NEVER docuemnt for yourself but for others.... So to help the 'dumber' people that will audit your code ..... use comments
@Ernst, I would disagree that you don't document for yourself. Eg. regular expressions, if I haven't worked with them for a while I simply forget what they do. And please don't get me started on VBCommenter+/Ndoc+Nant. It's an important reason not to use VB but C#. Back on topic. I agree that you shouldn't comment everything, only the things that aren't clear from code. So don't comment on every if statement to realize that you're just paraphrasing the if statement itself. And the problem with comments is that the comments are always greener on the other side... ;)
I agree with Rick, naming thing right it is much more readable. Because here on the team the are some people new with .NET so i comment a little bit more, but not every line of code. When you write something like this: FileInfo[] outdateFiles = GetOutdateFileInformations(); I think that is clearly enough and doesn't need a comment. But: if( File.Exists( fileName )) { [lot of code] } else { // The file was not found locally, so mark it as outdate. outdateFileInformations.Add( serverFileInfo ); } I explane things only when needed. Only the else keyword doesn't make much sense, so I drop a comment. Only comment when needed, sometime I see code like this: // Set the error string string s = caught.Message; // When it is empty, set default text if(s == string.Empty) // Set default text s = "Default text" That is over the top! And makes it even harder to read. Commenting is just a taste imho...
Rick is right in giving your methods and variables a meaningful name. Ernst and Dennis are right in commenting only stuff that is not immediately clear from the code. And the language is not the issue here. I want to know what happens in the code. Comments are always helpful, as long as they explain something. I still see code where the comments are something like: // P.rogrammer: Start change ... ... some code ... // P.rogrammer: End change So my 2 cents: comment if you think that someone else (or even you after some years) may get confused when they read the code.
Good grief, we opened a can of worms here! @Saber Karmous I'm not saying you shouldn't comment for yourself. The sentence: "If not for yourself, then for the other developers that weill maintain the code after you left the project." means "Even if you don't need to comment for your own sake, you should always do it in case someone else reads your code" (but of course every experienced programmer knows he needs his own comments when reading the code after a couple of months...) @some others I DON'T disagree with Rick on meaningfull names, please read my post more carefully! It's just that I mentioned that the way you use variable/object names, where you put your comments, and what you comment on are separate issues... I admit, I responded quite strongly on Rick's statement: "don't comment", just because I feel strongly about programmers documenting their code! Fortunately, Rick said that he exaggerated, because I almost felt ashamed for a collegue like that... ;) BTW: talking about variable names; you might like this post and the article I mention: http://bloggingabout.net/ernst/archive/2005/05/17/4085.aspx @Rick If you tar and feather some of your collegues, please take some picture and post 'm!
Fowler mentions in his refactoring book that code that requires comments to be understood is highly likely in need of extraction to a new method. The method name should describe the intent of the code sufficiently well to take away the need to comment... Since reading this (and feeling challenged) I have applied this principle and indeed significantly reduced the amount of comments in my code.
If only the people that write incomprehensible code would comment. A lot of times, these so-called developers (usually selfproclaimed guru's) never write any comments, because they think the code speaks for itself. Don't get me wrong. I agree entirely with you, Rick, code should be self-explanatory by using useful names for classes, methods, etc. I get the feeling this post, and the previous, was from the same frustration that I sometimes have when you look at code that is barely understandable, and uncommented. And code where it is obvious what is going on, and which is buried in comments. I think senior developers sould play a role here. They should regularly check other peoples code, and point them to these 'mistakes'. At my previous employer, we did this (Yes Dennis, here I go again) as part of the code-inspection process. And coding standards can provide guidelines to this.
Document behavior, not code.
Document behavior, not code
That's an excellent saying Paul! I will remember that! Document behavvior, not code!
Isn't it a lot easier to use the HashPasswordForStoringInConfigFile method of the FormsAuthentication class?
I agree with Gerke's observation about code needing refactoring instead of comments. In the coding guidelines for the .NET team at the customer I work for, I have included the "rule" that methods should not contain more than 5-10 lines (not counting whitespace, comment lines and lines with just { or }). Short methods are less complex, thus easier to understand without needing comments and can be tested better than complex methods. There is a more scientific way of expressing this: there is a number called the cyclomatic complexity of a method. Roughly it's the number of possible flows through your method. Every if statement, loop etc. increases the cyclomatic complexity. This number should be low. For more details see http://www.visibleprogress.com/vb_cyclomatic_complexity_metrics.htm. The VS add-in C# Refactory can calculate the cyclomatic complexity for every method for you and show other metrics about a project as well. Check out http://www.xtreme-simplicity.net/CSharpRefactory.htm Unfortunately, when I do code reviews (without C# Refactory because the client has no licenses) I see that my team members like writing methods with high cyclomatic complexity and ignore the guideline on minimizing this ;(
Rick, thank you! I've been searching for a way of doing this for a while, and if not for you (and Scott Swigart, who pointed me your way), I had given up. This is yet another great example of how the people really using .NET know more than the product team (who told me it wasn't possible). Thank you!
Hey Kent, I'm glad my blog could be of service. I think the people of the product team mean it's not possible with GDI+ by saying: these are the GIF's, now make me an animated one! But when you know the file format, why not make it yourself?? ;)
That method does do the same, so it seems...
Congratulations with your girlfriend! 40 people is crowded in a apartment :) Can't wait for your next post!
Our GIF saving is better looking in Paint.NET v2.1, but our GIF support will be more comprehensive in v2.2 with a preview showing what the saved image will look like. Maybe even quantization options. We'll see what we've got time for.
I have used the bootstrapper, but the newest InstallShield has giving us the solution. But installshield will not install .NET sillent, this is a bug, hope they will fix it :)
I have the same problem, strange that it isn't public yet. Have contact Microsoft about it and waiting for response.
The toolbar got out friday third of june. At least, that's what the VeriSign signature on the package says. Oh, by the way, I'm not updating this post because there seemes to be something wrong with the blogging software...
Have installed it now. Looks great! But you can't close the tabs by pressing the tab buttons with your middle mouse buttons. But that doesn't kill the pleasure :)
i strongly support the one.org it benefits a great cause and i think many people need to speak out and show their opion.
i simphaty with www.one.org because it is can help children in the world. i think this is can make all of children feel if they have shoulder to cry on and they're not alone in the world. i hope we can do better for all of children in the world everytime.
WSE's a different stack, so there's your problem.
kami inginkan agar aids ter cegah hanya dengan satu cara nyaitu perangi vcd porno thak for all
Paul, when it's a different stack, how's my problem there? Or do you mean the stack has changed? (By the way, we'll be examining the problem this week)
To me I am really glad that there is such a organization I always wanted to help in some way but really not having enough to help but knowing that a simple voice or opinon can help I think that is really great because there are people out there that need our help/the worlds
I tried the code, and it compiles, but does not make an animated GIF that IE can display. One issue is this line: if (stringCollection.Count == stringCollection.Count - 1) I think it should be if (picCount == stringCollection.Count - 1) since the Count will never = Count - 1 My test was with 7 images of about 20K each. Still trying to figure out why the image won't display.
HOLA CIAO
Ciao Jocelyn. Care to explain who you are?
Goeie tip :-)
One voice at a time.... let's get rid of all the hunger in the World. Thank you guys!!!!!!!!!!!!!!.
One minute, one hour, one day and many voices can help! Lets do it together! Cheers! Lizzi
6 19 2005 HBJr To whom it may concern: I might have heard some years ago that some of those living in poverty can be given some assistance. Some of the questions of helping those who need help are, Who's going to give the help to those in need, What's is the help going to be, and if, when is the real help going to be given to those in need. I might have a good thought for trying and giving help to those in need. hbjr
Geweldig! Werkt prima :)
I really think it would help alot if they got away with all the goverment in Africa that is keeping those people down and when the money is there then what will it really go to help the people in need? all the money in Africa from gems where is there money from that, all the slavery still going on ........child labor ..one big mess give them back all that was stolen from them
I believe this line is wrong //only write this one the last time.... binaryWriter.Write(";"); //Image terminator it should be binaryWriter.Write(0x3B); //Image terminator otherwise it writes out a 2 byte unicode version of ";" ie 003B
Sorry, it should be binaryWriter.Write((Byte)0x3B); //Image terminator otherwise it writes a 4 byte int out ;o)
I agree with helping the poor. I agree Africa is in need of urgent help. I do not feel www.one.org is the best way this help can be brought to Africa. An increase in one percent to foreign aid in this way would be a major impact on United States government spending. Moreover, I feel I can give my own money to private charities in a much more efficient and cost-effective manner than first giving it to the government. The ONE campaign is essentially asking for your money, through increased taxes. If you support the ONE campaign you should also support cutting government spending in many other different areas or increased taxes. If everyone, ONE by ONE, gave as much money as they could to a charitable organization of their choice, much more could be given to charity and it would be used much more effeciently. Daniel Kellogg
Keyword Expansion is something to be careful with as it encourages duplication of information that is already available within the source control system and bloat of source files. Most source control systems (I currently am a happy Subversion user) provide easy access to this historical information. I am currently working with sources that have contain several pages of historical comments that have no value whatsoever and make browsing the code a lot more hassle. For that reason I tend to strip out the keyword expansion code.
Hi all! Somebody knows how to get the frame delay of an existing gif? I tried this :"PropertyItem prop= img.GetPropertyItem(0x5100);" but how to get the exact value? The Value property of this object returns me a bitArray and i don't know how to get the value. Thanks
Hi Rick, good tip! But note that the correct registry root is HKLM not HKCU! bye, Fabio
Hey Fabio, according to Microsoft both roots are good: HKCU only adds it to the 'add reference' window of the current user, where HKLM will add it for all users. More info: http://support.microsoft.com/default.aspx?scid=kb;en-us;306149 //Greetz, Gump
I think that it is a sin before God, that the children of Africa as well with the grown ups to are suffering from properity and starvation as well as aids and and sickness,people should really think about all of the wasted food that we throw away from the dinner tables.fast food services and etc,my heart is sadden from all of the waist that I see, I remind my grandchildren of all the people in the United States that dosent have food to eat, that are digging from the garbage cans to find food, and that it is a sin to waist food like that. I only pray that God forgives mankind for the destruction that he has caused to other human beings, and that the suffering of Africa,and all other states ends. May God Keep Us All
Due to the wealthest coutries horrid indiffence toward the diseased and destitute plight of the concontinent of Africa,millions of young and old have been left to die slow and painful deaths as a cause of Aids,war, and starvation. Let's repent of are sins and humble areselfs so that we may bring hope and even salavation to Africa. As proprietor's of the worlds monetary wealth we must lend a empathic hand to protect the most vulnerable in society, whither they reside on the streets of your home town or in the most forgotten hell holes of Africa. PLEASE DO WHAT YOU CAN. P.S. GOD IS WATCHING US!
let's do now!! let's stop it now!! '-How long do 'you' want to wait for 'your' bread? mr.Blair, USA, Canada, France, Germany, Italy, Japan and Russia.
I am having a hard time with this whole one.org campaign. Why is that all of these RICH celebs are asking us to sign a petition that will in effect raise OUR taxes to help countries that DO NOT like us? If these celebs really wanted to end poverty in other countries they would start by dipping into their own savings and future earnings and donating them to worthwhile charities and other organizations. I don't understand why so many people here in the U.S. are so gung-ho about this one.org. Are they really so stupid as to realize that everyone's taxes will be raised to fund this endeavor? Who says this is even going to work? I think we should concentrate on helping the poverty and disease stricken people in our own country before we worry about everyone else in the world. One.org is a noble idea that if the celebs really want to happen they should fund it on their own. They have ample enough money to donate a couple of million a piece without pleading to the average joe to jump on the band wagon. I have a hard enough time feeding my own family of 5 and am not at all inclined to help out people who consider us power hungry war mongers. I say fix all the problems in our country before jumping to other countries to try and fix theirs. Let them deal with their own problems for once.
great idea, hope it will get the power it needs. love m.
let's think about it. that's the beginning.
Here's a quote from Wayne Dyer "If you change the way you look at things , the things you look change". Think about it. Let's all practice being positive as much as we can and let's see what happens. Love, Cindy
Here's a quote from Wayne Dyer, "If you change the way you look at things , the things you look at change". Think about it. Let's all practice being positive, as much as, we can and let's see what happens. Love, Cindy
I would rather raise my taxes to see that people are given the chance to live then not do anything and see them die. Thank you to all the people who care enough to see things change.
We are our brothers keeper. You can not be placed or created for this planet and not realize the need to take care of one another. Thank you for those who give their time and use their talent to enlighten those who no longer see the reasons for change and the need to help others.
great!!!!,very great intention,noble also of all involved and the billion of sympathisers all over the world but,we need to ask ourselves one big question.What have the africans done to help their situation. They still join their corrupt leaders in rigging them into office. They also surfer and watch those same corrupt leaders cat away the little resources left. They do all this and no body challenges them or even bother to impeach them. These same corrupt leaders never come home from their assemblies to meet with the people who have elected the into office to help discuss thier needs. All these leaders do is go to the assemly to fight for what they will gain for themselves,fight for contracts. Is it not a shame that these elected member do not care about their people. I will be suprised if atleast 20 congressmen and women in africa even know that we are out here today world wide fighting their course. It is even worst that the Africans leaving outside africa fell less concerned about the whole issue back on the big continent. I pray the effort works.
I am so elated that this organization is going to do so much for these countries! And so many people are supporting it , which is great. One voice , one person , one day ! IT ONLY TAKES ONE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thank you one.org
Its about time the US and other nations take meaningful steps to help African. Too long the powerful nations had have let the third world people of the world needless suffer.
I hope that this campaign to end poverty in poor countries will be effective. There has been benefit concerts in the past and what changes have occurred in these poor countries?. I want this campaign to enable the people of these poor countries to get the support they need in order for them to become strong and take charge of their countries.
I want to thank those responsibile for taking action to help people in need. It is nice to see that there are people who care about others.
espero que esta campaña logre el objetivo que se trazo y se hiciera llegar alos mandatarios del grupo de lois 8
i may only be 12 but i totally get this stuff!! i really want to do something about it! so i hope we will all do something about it!!!!!!!!!!!!!!
Hi Rick, my note is referred only to your post, where the first path you indicate is referred to HKCU, while the image is referred to HKLM. ;-) HKCU, as HKLM, works fine. However, on my pc, the registry key ".NETFramework - AssemblyFolders" in "HKCU - SOFTWARE - Microsoft" does not exist by default. :-( Bye, Fabio
i couldn't get this to work either, though Firefox showed a missing image box with a little better information - "...because image contains errors." so there was definitely something wrong in the basic structure of the file. a quick change from this: binaryWriter.Write(buf1, 789, buf1.Length - 790); //Image data to binaryWriter.Write(buf1, 781, buf1.Length - 782); //Image data not sure if this is correct per the file format, but it does now work in IE and Firefox. also, changing the delay time high byte from "3" to "0" makes it way more apparent if the animated part is working ;-) and there was no visible difference in using the semicolon (";") or the 0x3B, though the byte method makes it more apparent what's being written. cheers g.
forget everything i just said... :-) after working with things a bit more, it seems to be okay now... WTF, mate?
I don't know, I haven't seen your code ;) It worked for me the first time, but there are some people who it hasn't worked for. Maybe I'll create a component for this ...
I like the new look, but some comments I post two day ago are gone now.
Hey, you are right, some of the comments which were posted before we switched to Community Server have been lost. I even lost some complete posts! Long live cache ;) From now on this won't happen again (I hope!).
Nice article, based on the news this week! Way to go!
Yep you are completely right, that's why I think unit testing is over appreceated.... I know setting a bitmap in the copy buffer and trying to paste it into every entry field (at least try to) I could find in the application was producing a steady flow of bug reports. Hell, I was about 100 bugs further and only then I started with reading the functional design and started testing functionally... Those bugs could have never been found with unit testing. And my first objective in testing is always to show where the programmer failed. So I don't try to make it work, I try to break it first, if the program survives the 'Monkey test' you can see if you can break it on a functional level..... A couple of months ago I found an article about MS testing on whidbey... I belive they had about 500.000 Test cases and about 20.000 people testing them......
Dino Esposito wrote an extensive article on this topic (DataSets vs Collection)in the August issue of the MSDN magazine. http://msdn.microsoft.com/msdnmag/issues/05/08/CuttingEdge/default.aspx
That's a great article! Dino favours custom classes for 'big' systems, where DataSets can be of use in case of deadlines, low-cost etc. A must-read for .Net architects.
Actually the answer is simple... need an in-memory database? Then use the DataSet.
[quote] Actually the answer is simple... need an in-memory database? Then use the DataSet. [/quote] So that's virtually never? ;)
[quote] So that's virtually never? ;) [/quote] See, you're not that dumb! ;)
The article was really good, I agree. But in the end, you need to decide what is best for the problem you're trying to solve. The article gives you the information to make that decision. When a DataSet is good enough to do the job, why not use that? I've actually seen solutions where people moved data from a DataSet to an object, only to move it back into a DataSet... Try sending a object to Crystal Reports or any other report writer. DataSet's are way easier for that purpose.
DataSet's are very handy, but they are nog save. I prefere Custom Entry Class because this is more OO and gets your code cleaner imho. You don't get code like: int userId = Convert.ToInt32(ds.Tables[0].Rows[0]("UserId")); But int userID = user.ID; That is more clearly for me. These two links below are interesting: http://jelle.druyts.net/PermaLink.aspx?guid=61676665-06a7-443a-9462-71dae713539e http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/CustEntCls.asp
uhhhhhh, I don't know i always have a class with a dataset in it..... So i NEVER do int userId = Convert.ToInt32(ds.Tables[0].Rows[0]("UserId")); But alwayd do : int userID = user.ID; So is that good or bad....
Up 'til now I've used DataSets most of the time because they come with standard functionality for keeping changes and structure. But if you are going Service Oriented with your code, and you want to be interoperable (i.e. callable from non-.NET environments) you just cannot use these .NET specific types in your methods. So there home-brew classes or simple types are the way to go...think about that all the time when you're building code. 'Coz you never know who's going to use your stuff tomorrow.
It just takes getting used to. I use this operator when it's clear what you're doing. And it's a matter of taste. I would never write the 'complete' code your way. I would write it this way: if (myArrayList == null) { return 0; } return myArrayList.Count; The else is not necessary in this scenario. This is why I think coding standards should never include rules about this sort of thing. Too much discussion, with very little value :-)
[quote]Too much discussion, with very little value[/quote] That's true. And indeed it might take some getting used too, like I also said in my post. About the 'complete code': I wouldn't want to say my code is the only right implementation. You might want to add a variabele to store the count and return that one, you might want to leave out the else like you did, or you might want to take a different approach. Although I think the else makes it more clear that that return statement is only hit when the if wasn't met... Here we go again with the discussion ;)
I really do not have a preference either way, I use it myself on occasion there are just some spots it just seems appropriate to me. If I am doing anything extremely complex with a lot of math then I do break it into an if statement.
I agree with Jan on the coding style. This style becomes more important if you have multiple if statements that follow each other. I prefer to limit the amount of nesting of code inside else statements. So I avoid the else block when the code in the if block returns and the else is not required. Of course this requires that you are not of the religion that only one return statement is allowed per method ;)
Well it is a EAP version... or let us say Beta :). So.. don't use it on production systems and only on test pc's. For example a virtual machine to see what ReSharper 2 has to offer.
Hi so could someone post teh correct completed code pls.
For me unable to delete the temporary folder was related to indexing service being enabled. I just added to exclude the temp folder from the index service and it corrected my problems.
Still haven't tried it, shame on me! But I will give it a change when it looses hit BETA status, because I read a lot of negative stories.
Cheers mate, that was a real bugger
Enjoy your Holiday and to get burned by the sun :)
"This means not the entire object is sent over the line, but only the interface" NO! An object ref is passed around. You create a proxy on the client. Grab a copy of Ingo Rammer, Advanced .NET Remoting and check page 42. A server activated object IProductFactory returns new client activated IProduct objects. As stated in the thread on tweakers.net your IProduct instances are then stored on the server. I'm not exactly sure what your requirements are, but if you are trying to run objects on the client without sharing the implementation between the server and clients... think hard what you're trying to accomplish. This isn’t advanced remoting ;)
Paul, I know a (transparent) proxy is generated, but fact of the matter is that the object resides on the server, and that's what I tried to make clear. Maybe I should have thought about my choice of words a little more, but I was in a hurry... I'll probably use the updater block, so there goes any form of remoting ;)
Sounds complicated. Neo? Neo maps domain objects (or business object for that matter) to a dataset, so your client uses a dataset as a container for in-memory storage and XML to store your object graph on disk. Then send the dataset to the server and order Neo to persist the dataset to your database. Neo is a disconnected Object-Relational Mapper. You could decide to share the domain model between the client and the server or let the client have its own domain model, that's up to you. Are you developing a smart client application?
I saw a presentation monday to explain the basics of .Net to some starting developers....
We put a collection class and the corresponding item class (e.g. Widgets and Widget) in the same file, which seems to work fine. More than this tends to make navigation difficult. The workspace feels cluttered.
I totally agree with the guide lines. But we put EventArg classes and the delegates by the corresponding class. We don't put the collection classes with the corresponding classes but I can understand why Horwill does it. But you need to follow guidelines imho, so do it or don't do it as long as you follow guidelines it is clear for everybody.
If the class is only used in one project in your entire solution, then I don't see a problem in moving it to that project. But when you use it several projects, then having a common project is the way to go. At least, that's my opinion.
Hi Jan, the class is used in several of the other projects, because, allthough it's a small class, it's kind of important... Think of it as a session object for a WinForms application.
Then I think you made the right decision to put it in a separate common project.
As you said Rick: "And besides, other classes will probably follow soon". Now it is one tiny class that got a whole project for his own (lucky him), but soon the project will grow. It is good you seperated it because you must follow the guide lines.
Have a look at Brad Adams post on singletons, locking and volatile (http://blogs.msdn.com/brada/archive/2004/05/12/130935.aspx) this starts with 'the best practice' on this subject (double check locking pattern) and he factores the volatile keyword out. Whether that is necessery, I leave up to others. but I think 'double checking' around your lock it worth your while. This way you won't lock while accessing an created instance of your static instance.
Why not doing it this way: public sealed class Singleton { static readonly Singleton instance=new Singleton(); static Singleton() { } Singleton() { } public static Singleton Instance { get { return instance; } } }
I doubt if the last sample provide thread safe access. The il will at least submit 3 statements, a call to .ctor, a pop and a ld. After the call to the .ctor a context switch might take place. That will allow the second thread to call into the Instance property again.
You must provide the STATIC Ctor, otherwise the compiler will mark it as beforefieldinit.
It really worked. I saved lot of my time.
This is a way... but what if I would to sort this time on username and later on on date of birth? You can add a sort delegate that does the object comparison for those kind of scenarios.
Yup, that's a posibility. But that's not the essence if this post. I only wanted to show how you can create a simple list that sorts on the value for a key value pair. That's what this code does. ;)
Can you save your newly created animated gif to a file? If so how?
If you would like to (for example) make sure all the jpegs on your site are displayed including...
Gefeliciteerd! Heb je 58.24 vragen goed gegokt? ;)
Tijd voor een Hertog Jan...
Vrieler: is goed, wanneer? Volgend weekend weer zo'n party? :p
@questa: nope, het waren 48 vragen, en ik had er 44 goed :D. 58 heb ik er dus niet goed gegokt ;)
Agreed. I think too much code is being hidden or taken away. If anyone knows of any papers on migrating to it from VS2003 it would be very interesting reading - and would lead to my faster adoption.
If you mean all the protected members for every control on your page, including the OnLoad methods and such... Remember the partial classes?! :) There's an initialize method called in your webpage's constructor. Press F12 on it (Go To Definition) and you'll see where they are.
Hi Rick, Congratulations on passing the RUP certification test. I am looking at taking the IBM test 639 for RUP. I would really appreciate any pointers from you in that matter. 91% is a very hogh score. Good job man. Write to me if you please at amit_d001@yahoo.com. Amit
Hi Rick, Is it possible to do the same with png images? Cold you e-mail me, please? My e-mail is: gorant@dundas.com Thank you in advance. Goran Tesic
I migth use this concept in a potential next version of an application I believe you know (it starts with a R and ends with ...IAD).
Congratulations on getting such a high percentage in RUP. Can you please share sample test paper or any other relevant material with me? Please write to me at deb2who@yahoo.com Thanks in Advance! Deb
I use the CSLA .NET Framework, which does a similar thing. If an error occurs, it is caught and wrapped up nicely inside another exception. We have had your problem, whereby it claimed the BinaryFormat was invalid - which it is - because the exception thrown results in HTML, rather than the format it was expecting. Do a packet sniff on it and it will tell you what error this was - but I do not know of any way to solve this. We have since dropped this in favour of Web Services - for the sake of transparency and speed.
As a follow-up to my previous post.. Eventually a colleague of mine pointed me in the right...
I've already expressed my distaste for all these supposed "accessibility friendly" controls that have been introduced. It does increase reliance on stock controls and less on the abilities of the programmer - resulting in a degree of false faith. My approach: do it yourself, but use the XHTML output of ASP.NET 2.0 to ensure a strong control.
Rick, check out this blog post: http://idunno.org/displayBlog.aspx/2005080101. The root cause is that the ASP.NET 2.0 browser sniffing (in the default configuration) doesn't recognize the W3C Validator. It is then treated as a down-level browser. The post links to a w3cvalidator.browser file that you can use to remedy this.
Hi Rick Congrats on passing the RUP Exam. Can you please tell me relevent materials that you used for passing the exam If you plan to sell your study material do let me know. I am willing to buy Please do send me a mail Regards gautamsinha@hotmail.com
This is not so handy when you host at e.g. a host like Brinkster where there is no access to the webserver so on my site there i just put a way long case statement handling everything in the global.asa
I have tried this code in vb.net but when I click the export button all I get back is the .aspx page. The pdf does not show. Any help would be appreciated. see code below. Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Imports System.IO Public Class frmNonGMPReport Inherits System.Web.UI.Page Dim crpt As NonGMPServiceProvider Dim myTable As CrystalDecisions.CrystalReports.Engine.Table Protected WithEvents exportPDF As System.Web.UI.WebControls.Button Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer Dim myLogon As CrystalDecisions.Shared.TableLogOnInfo #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here Dim crpt = New NonGMPServiceProvider For Each myTable In crpt.Database.Tables myLogon = myTable.LogOnInfo myLogon.ConnectionInfo.Password = "gmplist" myLogon.ConnectionInfo.UserID = "gmplist" myTable.ApplyLogOnInfo(myLogon) Next CrystalReportViewer1.ReportSource = crpt CrystalReportViewer1.Visible = True End Sub Sub ExportReport() Dim oStream As MemoryStream oStream = crpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Response.BinaryWrite(oStream.ToArray()) Response.End() End Sub Private Sub exportPDF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) ExportReport() End Sub End Class
Jaisus. Thanks. I was starting to get skitz out about that one; started down the path of edits to the machine.config not really knowing what i was looking for. Whacked. Jaisus.
Hi Rick Congrats on passing the RUP Exam. I got your email address from http://bloggingabout.net/blogs/rick/archive/2005/10/28/10031.aspx#comments. With a passing score of 91 percent that's excellent I have trying had to get some info on how to pass the RUP (639) exam and so far have been very unsuccesful. Can you please tell me relevent materials that you used for passing the exam. Books that i need to buy If you plan to sell your study material do let me know. I am willing to buy Please help me and do send me a mail when you get a chance Regards Gautam Sinha PMP
How are you connected? Scart or s-video? In the tv options you can force a certain connection. I had problems that seem to be similar. When I fixed the tv out to s-video my problems were gone.
I'm connected through s-video. I did set Media Center to use such a connection, but I didn't find such an option for my TV-Out...
You could try MediaPortal. A dotNET Project that may prove whether it is WIn XP MCE or your hardware. Works on most platforms. http://www.team-mediaportal.com/ Just out of interest, where did you buy a copy from? I thought it was only OEM?
Hmmm I have an nvidia board too. Do you have a panel where you can adjust the flicker fixer etc.? I can get there from the desktop. Rightclick on the desktop, select nvidia, select TV. The new dialog shows the options for tv out related stuff including forcing an output and adjusting the flicker fixer.
It can also be a directx related issue. Try fixing the refresh rate for directx fullscreen applications. Download the directx control panel somewhere (also part of the sdk). You can somewhere adjust the refresh rate to a fixed value.
Rick, any chance you can post the code or a hint as to how you are downloading the config file to the local file system? My last attempt at using WebClient.OpenRead failed. Thanks in advance, Kahn
Congrats! 91% is a great score! I'm trying to study for this test too. Please give me some advice to have a good preparation. katia.canepa@gmail.com
It's an excellent book. A bit too much on the oo-patterns I think. I would've liked to see more Agile practices in the way Uncle Bob writes. I loved reading this book.
I've bought this book as well (see <a href="http://fgheysels.blogspot.com/2006/01/buying-books.html">here</a>, and I'm expecting a lot from it. I've already read a few pages, but, 'till now I haven't learned any new things... (I've only read 30 pages yet. :) ). ps: it's been a while since I've seen you on t.net ?
Great Rick..! a score of 91 is really great... i'm preparing for RUP exam... Pl give me some pointers... Chakradhar_careermail@yahoo.co.in Regards, Chakradhar
But what if I am using an interface (for example ILease) and i can't add a static keyword?
Thanks for your explanation on Delegates, I was trying to find a down-to-earth explanation of just what the heck did they do and how the work, and I think your intro helped me grasp the main idea behind them.
Yes, I hit this little gem last week. I'm about to launch a Buddhist resource site whereby you can buy and download content. The client wants to integrate with PayPal. If you recall my post about "What is the point" I blogged (sorry, ranted) about the alternative Postback "feature", which is absoltuely pointless in that it does not send the form variables to the other page - in this case PayPal. So I had to use their PayPal component, which worked REALLY well. I was getting more than a little nervous it was coming up to launch date, so was a big relief. Come to push it up, and I get exactly what you get. The AllowPartiallyTrustedCallersAttribute is all very good - if you have access to the original source code - which I didn't. So .NET is STILL relagated to calling the PayPal API using the GET method - which I don't like because it is a little too "visible". I hate it when PHP people can do something I can't.
If the assembly with PayPal's API (which I assume exists from Nathan's comment) does not have the AllowPartiallyTrustedCallersAttribute then either - PayPal was ignorant to the fact that it is important to flag their assembly to allow use in partial trust scenarios. - PayPal decided its assembly was not inherently safe to be called by callers who are not fully trusted. Either way, Microsoft is not to blame for this. AllowPartiallyTrustedCallersAttribute is a very important security measure by Microsoft and an important thing to consider if you design assemblies for reuse. So ask PayPal for a better library ;) Do make sure your assembly is indeed safe to be called by partially trusted callers before you apply that attribute to your own code (like the post by Shawn Farkas referenced by Rick states).
Hi, nice code here :) About the poor quality, I tried to use a quantizer (ImageManipulation.OctreeQuantizer) on each image. There's a better quality but the palette doesn't work very well. The problem with the quality is here, the palette. But I didn't resolve it (yet) About a little optimisation, you can remove the latest "if", and binaryWriter.Write(";"); outside the "for", it does the same :)
I think this is a good idea. Atleast to see how everybody is related to each other. Most people are from LogicaCMG but not all. Maybe just a nice bbq will do :)
Great idea! I like the suggestion of a BBQ too btw. Maybe as a KickOff?
Good idea! I'm in, it would indeed be great to have get together.
Brilliant idea. Count me in!
I'd be interested in such a meeting as well. Dennis, maybe we can discuss upgrading BloggingAbout.NET to Community Server 2.0? ;)
Erwyn, we can discuss who's doing what. The functionality we currently have to upload files and images doesn't work yet. Someone was rewriting the FreeTextBox wrapper for CS but I don't hear from him anymore. Kind of strange. If you feel like picking it up, be my quest. I really can't find the time right now.
fun initialive, count me in
He, why only BlogginAbount.NET people! It should be a meeting for everyone who is reading you blog ;)
Hi, I am interested in attaining RUP certification. Any help would be greatly appreciated. I am specifivcally looking for material and sample questionaire. Regards ridhakefi@hotmail.com
Thank you for all the positive replies! It's nice to see that more people would like to meet. I'll see if I can arrange a meeting for the BloggingAboutDotNetters. And questa: if everyone who reads this blog would be invited, we'd be creating a second DevDays, and that's not the idea behind it... ;)
Great! Sign me up, please!!
I've received lot's of positive reactions on the post about organizing a bloggingabout.net meeting. I'll&nbsp;...
This problem (but then in a DataReader context) prompted me to write a value type conversion class that does do the trick: public static class Cast { public static T To<T>(object value) { return To(value, default(T)); } public static T To<T>(object value, T defaultValue) { if (value == null || value is DBNull) return defaultValue; Type type = typeof(T); if (!type.IsValueType) return (T) value; Type underlyingType = Nullable.GetUnderlyingType(type); Type valueType = underlyingType != null ? underlyingType : type; return (T) Convert.ChangeType(value, valueType); } } Where (int) (object) (long) 1 fails Cast.To<int>((object) (long) 1) will work.
Hi Gerke, at the customer where I encountered this problem, we don't use .Net 2.0 (yet). Still, this is a very nice solution for problems like this one, so I'll make sure we're going to use it as soon as we swith to .Net 2.0... Thanks for you reaction! PS How's London treating you? If I'm not mistaking, we used to be (distant) colleagues at LogicaCMG.
You forgot to mention that there are very expensive operations. Normally stack information is only needed then exceptions are thrown.
There is also an Article on Codeproject ( http://www.codeproject.com/dotnet/NGif.asp ) explaining how to open/save gif animations
Non-static methods should work, I do this all the time. However, you must be sure you're passing in the correct object reference. I encountered this error when I was trying to call a method on a property value and invoked the method with the object containing the property rather than the value of the property itself.
I have planned a exam for next week. Now i can do a test first and take a look if there are some points that need studing. I haven't prepared yet, because there are no trancenders available yet. So i just go and pray ;)
It is an expensive operation, that is why exceptions are a so expensive to throw. Not the throwing is expensive, but the creation of it. But, i use this sometimes for debugging purpuse and method uses. If a plug-in for my application hits my DB very hard, i can know how many times he uses methods. It is very expensive, but sometimes very very usefull!
One problem with makeing the BaseForm internal is the no internal class that is marked as public can inhire from the BaseForm. Please, remember that.
You're quite right Questa. But in my specific situation this is not a problem. I thought about that before changing the modifiers. To be honest, I don't like the default public modifier at all. I think too little developers really look at the access modifies, making lots of classes and forms accessible without for example good exception handling. Put that's another discussion ;).
Cleartype should only be used on tft screens and not on normal monitors. On normal monitors you should only use normal anti-aliasing. I use consolas on size 8 with a very thin cleartype setting and it really is a great font is the editor supports cleartype fonts like visual studio.
What's important for me is, can people handle Consolas after looking for 8 hours to a beamer projection screen!? :) Currently I'm using Lucinda Console because that's the best projection font available. I tested Consolas personally on a projection screen, and it looked nice, but haven't tested it with an audience yet. Gotta try it soon.
If you are going to use consolas on a beamer then you have the same quality degration as a monitor. The display settings should be anti-aliased and not cleartype with a beamer.
Courier, Lucida Console and Consolas aren't the only options in the world and you shouldn't just use those because MS provided them. http://keithdevens.com/wiki/ProgrammerFonts has a summary of many fonts suitable for programming. If you like ClearType then also check out Bitstream Vera Sans, Monaco, Andale Mono and Anonymous. If you prefer your fonts pixel-sharp try Envy Code A/B (mine), Profont, Dina, MonteCarlo or SGIScreen - http://steveblock.com/r/sgiscreen.zip. [)amien
On the C# Connectionlist voor MVP's and some other invited people there is a great discussion going on that goes much deeper. Meybe I can post it public somewhere when it is finished. I will ask for it.
A bit late maybe, but have just solved this same problem with your help (thanks). The resx compiler tries to write to the obj/Release directory for release builds, where it tries to write form1.resources. That should explain why Debug does build, since the obj/Debug directory shortens the path by 2 chars...
Don't listen to this. As I see it, the article states we only use static methods?!? (if not, forgive me for overlooking). To clarify, as Thuktun stated above. You need to have a proper object reference when calling Invoke() if you plan on calling non-static methods, here's an example: // _myGlobalType is a global of type object Type type = _myGlobalType; System.Reflection.MethodInfo methodInfo = type.GetMethod("MyMethodNameToFind"); // Note we provide the correct object reference methodInfo.Invoke(_myGlobalType, new object[] { (int)0 } );
i have pass the exam with 91% result i hope i can help, just send me at osikax@yahoo.com
Good score man.... please give us some hints about taking this exam, how do you prepare it?
PingBack from http://born2code.net/?p=30
I have excactly the same problem! But I tried to make all static ist doesnt work. class RBMain { private static object oE = null; private static object oW = null; private static System.Type eType = null; private static object[] inputA = { UtilClass.GetAppPath() + "report14.xlt", // filename System.Reflection.Missing.Value, // UpdateLinks System.Reflection.Missing.Value, // ReadOnly System.Reflection.Missing.Value, // Format System.Reflection.Missing.Value, // Password System.Reflection.Missing.Value, // WriteResPassword System.Reflection.Missing.Value, // IgnoreReadOnlyRecommended System.Reflection.Missing.Value, // Origin System.Reflection.Missing.Value, // Delimiter System.Reflection.Missing.Value, // Editable System.Reflection.Missing.Value, // Notify System.Reflection.Missing.Value, // Converter // System.Reflection.Missing.Value, // AddToMru // System.Reflection.Missing.Value, // Local System.Reflection.Missing.Value // CorruptLoad }; ... [System.STAThreadAttribute()] public static void Main(string[] args) { System.Globalization.CultureInfo oldCI = System.Threading.Thread.CurrentThread.CurrentCulture; System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); eType = System.Type.GetTypeFromProgID("Excel.Application"); //Get the excel object oE = System.Activator.CreateInstance(eType); //Create instance of excel oW = (object) eType.InvokeMember("Workbooks", System.Reflection.BindingFlags.GetProperty, null, oE, null); /*error here*/ eType.InvokeMember ("Open", System.Reflection.BindingFlags.InvokeMethod, null, oW, inputA); System.Threading.Thread.CurrentThread.CurrentCulture = oldCI; ...
Enjoy the vacation Rick, but with 100 kids around it doesn't sound like a relax vacation ;) I'm looking forward to the pics of your new home!
About the quick change from this: binaryWriter.Write(buf1, 789, buf1.Length - 790); //Image data to binaryWriter.Write(buf1, 781, buf1.Length - 782); //Image data The former works if you are making animated GIFs from pre-existing saved images. The latter works if you are making an animated from images you create on the fly with a Graphics class. In other words, if you're doing something like this: Image frameInGIF = new Bitmap(20, 20); Graphics bnrGraphics = Graphics.FromImage(frameInGIF); bnrGraphics.FillEllipse( new SolidBrush(Color.Blue), 0, 0, 20, 20); Though the "781 case" seems to create a working animated GIF in any case, the delay between frames is set to 0 when you create an image with a Graphics class.
Hi, Does anyone know how to specify the delay time in milliseconds between frames. I am having trouble using: buf3[4] = 10; //Delay time low byte buf3[5] = 3; //Delay time high byte How does that work? Thanks.
I had the same problem and yes making the method to be invoked as Static/Shared did work. But the real problem is this .... methodInfo.Invoke(_type, New Object() {_paramArray}) methodInfo.Invoke(Activator.CreateInstance(_type), New Object() {_paramArray}) In the first case ... as i was doing before, i just supplied the "_type" which was a Type object. There was no instance to execute the method on. However, the error "Object does not match target type" dosen't clearly indicate this. So changing the method as Static worked as static methods are on a type and not on an instance of the type. In the second case ... Activator.CreateInstance(_type) created a real instance of the type. Now both Static and instance methods were available at runtime. Hope this is helpful
"Does anyone know how to specify the delay time in milliseconds between frames" I wanna know also... And anyone know how to set the number of times that the animation will be repeated?? Sorry for my bad english ( I'm Brazillian) :D Thanks.
Hi, I am interested in attaining RUP certification. Any help would be greatly appreciated. Regards masrajeshkumar@gmail.com
Thanks, I needed a way to get the byte[] md5 hash of a string password...worked great
Very nice blog. I read it every day.
Your site is realy very interesting.
We're working on it mate, we're working on it...
Welcome back! :)
Hi Rick, I am preparing for RUP Cert. Can you tell me what are the books that you referred? Thx, VJ
Hi Rick, I forgot to leave my email id. catchvijai@gmail.com Thx, VJ
Hi Rick, Congratulations for passing the RUP Exam. I plan to take the exam soon. It would be a great help if you could share your expirence and what one should be reading for the exam. Also any training material that you would like to share would be a very useful. Thanks in advance. My email Id is dskumbhar@yahoo.com
The inaccuracy depends on the value of the double. It also depends on how the calculation statement is written.
Make sure that you aren't by any accident casting the values.
Maybe you've done graphics programming in the old days and then you perhaps found out that if would be better to always calculate positions from fixed coordinates instead of continuously updating an already calculated value in 3d space.
For example:
const double step = 0.1d;
double currentA;
double currentB;
currentA = currentB = 0d;
for (int i = 1; i < 100; i++)
{
currentA += step;
currentB = i*step;
}
A and B will contain different values most of the time. Method B is preferred if available to maximize accuracy in a whole.
About the VB6 DLL's: The guy came to me yesterday with that question. We discovered that the TLB libraries he was referencing in his VB6 project where not available in the directory where he did the manual or visual studio conversion, which resulted in all kinds of strange errors. After we put the TLB thingies there it worked like a charm. I hope his weird set_method problems dissapear now too. Normally you should only see this in MSIL code. Regards, -- Rob.
Always good to check the VMTN Forums. A search there http://www.vmware.com/community/search.jspa?objID=f19&q=host+name yields that the best way is probably a script on the host that changes the .vmx file before the VM is started, perhaps as part of the install.
Please help me, I did it all you adviced. I still have the same problem. Thak you all for your help.
Almost all values that can easily be represented using decimals (like 0.1, 0.2, 0.3, 0.15, etc.) cannot be represented exactly in binary notation with a finite number of digits. For computers the binary representation is the most efficient, so doubles are stored in binary representation.
For example, decimal fractions that can be represented accurately in binary notation are:
1 = 1/1 = (1)
0.5 = 1/2 = (0.1)
0.25 = 1/4 = (0.01)
0.125 = 1/8 = (0.001)
0.0625 = 1/16 = (0.0001)
0.03125 = 1/32 = (0.0001)
so
0.75 = 1/2 + 1/4 = (0.11)
An example of what you call "difficult fractional values" is
0.1 = 1/10 = 1/16 + 1/32 + 1/256 + 1/512 + 1/4096 + 1/8192 + ... = (0.000110011001100....)
If doubles were represented ternary, other numbers could be stored exactly:
0.33..... = 1/3 = [0.1]
0.66..... = 2/3 = [0.2]
And a difficult one is
0.5 = 1/2 = 1/3 + 1/9 + 1/27 + 1/81 + ... = [0.111...]
I've used
x for decimal notation
(x) for binary notation
[x] for ternary notation
Check out http://en.wikipedia.org/wiki/Binary_numeral_system for much more detail.
HI Rick, Congratualtion, its a great achievement, particularly cause i am trying to give the exam and i am not finding it easy. If you could providing me with some advice and share your study notes then it would be of great help id_shirish@yahoo.com Thanks Shirish , PMP
Nice! I'lll use it on my site. -kak http://www.kennedyandkate.com
I really love the Regex search creteria, only now I need the use the Regulator buildup the search string :)
Nice code... got a version for 1.1??? :)
"customer satisfaction will increase, and as far as I know that’s what makes those businesses tick… "
And that's where the problem lies. Because that doesn't make them tick, it's stupid customers that make them tick. People think they're getting the best support available. When nothing goes wrong, they continue to buy the service the company delivers.
When things go wrong, like in your case, hopefully actions will be taken. Most of the time, it isn't. Most of the time, people will continue to purchase the services at the same company.
Now I wonder why that is. Part of the problem is probably because money doesn't really matter to most people. With almost every couple in our country has two working partners, they make so much money, they have no idea what they spend on grocery, for example. One step further and we're looking at a large electronics retailer where people are just dragging the wide-screen HDTV 100" tv's outside like you get them for free with a pack of batteries or something.
People have enough money and are so spoiled, the service that people think they want, isn't really what they want. I'm just not sure what they _ARE_ looking for however. Probably go with the masses.
My last example is iPod. It might look nice, I don't think so. But for a lot of money, you get 2GB of storage. For the same kind of money you get another device that does the same, has color display, can also show photos, can more easily play and transfer different kind of media formats and comes with 40GB of storage space. But STILL people buy that stupid iPod. Why's that? Why is that?
It's worse than that, in the web.config under the tag, it called 'securityTrimmingEnabled'. so two different spellings of this property are floating around in VS 2005
To quote a famous dutch soccer player/coach: "Every downside has it's upside"
LEAP in Redmond is pretty cool. You get to see the home of the future and a futuristic information worker setup at the Microsoft Campus. But you can't tell your friends because you'll be under NDA... "Every upside has its downside" ;-)
As a side note: if you want to return a string without the dashes in them, replace the last statement with : return Regex.Replace(BitConverter.ToString(encodedBytes), "-", "");
You can add proxy settings to WLW in the Tools -> Preferences -> Web Proxy menu
did the trick for me here ;)
Hi Nick,
of course I found the proxy settings, but unfortunately they don't change anything when it comes to using Windows Live Writer. The 'problem' is not in the software, it is in the network configuration which blocks lots of ports and urls.
Kind regards,
Rick
ah oke, my mistake then :)
what i understood was that you didn't know where to find the settings :) sorry ;)
R.
Nick
No problem, I appreciate the effort ;)
Did you get a solution on this? I am just researching the same topic. thanks
Hi Paul,
unfortunately, we didn't. Our current solution is to ask the user to enter the name of the host machine and use this to generate the name for the vm. At this point it doesn't seem possible to get the name of the host...
To summarize: To invoke a static method, the object that is passed is ignored - you can pass 'null' methodInfo.Invoke(null, new object[] { _paramArray } ); To invoke an instance method, you must pass an object whose class has that method (either directly, through inheritance, or through interfaces, depending on how you reflected the method). methodInfo.Invoke(myobj, new object[] { _paramArray } ); This is reflected in the MSDN documentation. I suggest that you pass a null reference for invoking static methods, as this is clearer than passing a reference to the Type (as the parameter is ignored when invoking static methods).
Hi folks
I just scored 89% for my RUP certification test and if you need any sample questions, you can email me at vpalex@gmail.com. I respond to emails in less than 24hrs
I did all that was suggested, but still had the problem. Finally looked up the Antivirus log... and lo.... behold... this was the culprit. You need to exclude the Temporary ASP.NET folder from being scanned in the Antivirus. This solved the problem for me.
Present!
I love to the coop-play of Gears of War, trading some some pinata's or just lay back and play some Uno.
Have you played with XNA allready?
Thanks for the info. It put me on the right track to fixing an issue I was having.
Frank
Short personal update. About what I did the last couple of weeks, and whats ahead.
Hi Rick, COngratulations.. even i want to take up RUP certification.. Please give me details about eligibility and how to prepare.. my id is parvez_sims@rediffmail.com
It was great! The time spent at Microsoft Campus was interesting, and once the official part was over we had a great extra couple of days off.
You forgot to mention the rainy day in Vancouver... The day itself might have been fairly uneventful, getting an extra stamp in your passport was worth it. Oh and of course waiting for 1,5 hours at the American border ;)
Cowgirls on Thursday was... well... "interesting" as well :)
Thanks to all the other ppl who made the stay in Bellevue/Seattle/Redmond worthwhile!
Perhaps they decided to lose the "2.0" postfix because it might make people think it's only for .NET 2.0?
@Ruud. It is only for .NET 2.0. That implies it also works with .NET 3.0 ;) Since
.NET 3.0 = .NET 2.0 + WPF + WCF + WF + other stuff.
And ASP.NET vNext (3.0? 3.5?) will be:
ASP.NET vNext = ASP.NET 2.0 + ASP.NET Ajax extensions vNext + other stuff
ASP.NET vNext will be included in .NET "Orcas" 3.5. As well as C# 3.0, VB 9.0, ADO.NET vNext and LINQ.
Confusing version numbers abound!
FYI: Installing the new AJAX extensions displays the 'confusing' version numbering: 'Installing Microsoft ASP.NET 2.0 AJAX Extensions 1.0'.
Indeed good news... and we are developing a nice application using it, just ... too bad it will never go live ;-)
P.s. Nice Blogske.
You lucky *** :P Indeed pretty cool ;)
xxx
We all encounter them in the field: pieces of code that are based on assumptions. There's something fundamentally wrong in assuming when writing code.
I signed up at technorati recently . Technorati uses ping to get the info from blogs. And BloggingAbout.Net
Very handy to know, thanks
We all encountered them in the field somewhere along the way: pieces of code that are based on assumptions. There's something fundamentally wrong in assuming when writing code.
As I posted earlier we had some trouble with upgrading the UIPAB to be used in a ASP.Net 2.0 Web Application Project. Eventually, we solved the problem and life was good. Almost a week ago I received a mail through my blog from someone looking for the
Hey i have the same trouble so if you find out how to work it can you let me know? my email is OMalley291@yahoo.com thanks.
Have you notice any side effects/issues after setting shadowCopyBinAssemblies="false" ?
Same problem for a few days....this most definitely helped.
Thank you!
Here is some code for you to review. This opens the pdf into a new window.
Dim myReport As New crPrintReq()
Session("myReport") = crPrintReq
Dim myTableLogonInfos = New CrystalDecisions.Shared.TableLogOnInfos()
Dim myTableLogonInfo = New CrystalDecisions.Shared.TableLogOnInfo()
Dim myConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo()
Dim dbLogin As CrystalDecisions.Shared.TableLogOnInfo
CrystalReportViewer1.SelectionFormula = "{Print_Req.Dir_ID}= '" & Session("dir_id") & "' And {Print_Req.Uname} = '" & Session("Uname") & "'"
If Not IsPostBack Then
For Each dbTable In crPrintReq.Database.Tables
dbLogin = dbTable.LogOnInfo
'dbLogin.ConnectionInfo.Password = "'" & passwrd & "'"
'dbLogin.ConnectionInfo.UserID = "'" & login & "'"
dbLogin.ConnectionInfo.Password = "'" & Session("Pword") & "'"
dbLogin.ConnectionInfo.UserID = "'" & Session("Uname") & "'"
dbTable.ApplyLogOnInfo(dbLogin)
Next
End If
Response.Write("<script language='javascript'> {window.open('frmPreq3.aspx','_blank');}</script>")
FRMPREQ3.ASPX...CODE BEHIND
Dim strName As String
strName = Session("uname")
Me.Request.QueryString.Get(strName)
Dim tcParam As String
Dim crReport As crPrintReq
crReport = Session("myreport")
Dim strDir As String = Session("dir_id")
tcParam = Me.Request.QueryString.Get(strName)
crReport.RecordSelectionFormula = "{Print_Req.Dir_ID}= '" & Session("dir_id") & "' And {Print_Req.Uname} = '" & Session("Uname") & "'"
Dim strStream As New System.IO.BinaryReader(crReport.ExportToStream(ExportFormatType.PortableDocFormat))
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(strStream.ReadBytes(strStream.BaseStream.Length))
Response.Flush()
Response.Close()
I am willing to take the 639 Exam. Any pointers regarding course material will greatly appreciate your help kumarv2222@yahoo.com. Thanks
It's only required when all other possible member names are taken... all zillion of them :)
In Dutch we would call such a programmer an '@terbak'...
Even developers that understand the concept of adding @ in front of a keyword will be confused. Why on earth would you need to do this? I would kick some serious butt if I knew who was responsible for this!
You can just wait for someone to do this: bool @true = false;
Sick...
Maybe if you are required to have domain classes that represents 1-1 the actual domain AND follow a non convetional naming convetion (properties in lower case)...
class Test {
string @continue{get{}set{}}
First finding: the domain class should follow the actual domain: remove the @ in front of continue
Is it CLS Complaint? ;)
I have a problem, the password MD5 in my server OpenLDAP is saved with {MD5}o5c3WBNN50D/iYO5RJxcvw==, but to compare with the password in my aplication ASP.net the string is different, something so : j+ZGDCZGqIQtr/6+ZDxa4w==, somebody would help me in this case ?
It seems that fixed my headache right now, thank you very much :)
kshakes's solution is working. Thank you.
My indexing service was not running but i was having the same problem. After 2 crazy hours, i read kshakes's entry. Disabling the antivirus worked for me.
Hi, your code was very useful. however, i would like to enquire something. Is there any way the code your code for MD5 encrpytion be modified to produce an encrypted ouput of this format?
aTXuyYqHUUudx0Km2bsZKlH4/WM=
WEo/tELTiM0dVGGxgsF+5XmDr6s=
koOQgZFIppxqOVFsmWKiOSMJ3RY=
The password i have in my databse are of this format, and i am trying to find out how to insert new passwords as well as decrpyt passwords of this format.
I thank you in advance for your help. Thank you
HI. the source code u provided for MD5 encrption was very useful. however, i would like to enquire if it was possible to make modifications to your coding such that the ouput encrpyted passwords were of this format.
SZCi/864aZZbnCv6hqp+FV/cUPw=
This is so as i am required to encode passwords as well as decode passwords of this format. Thank you very much in advance.
Hi, your code showed how to encode a string into a hased string. How do i do the reverse? input a hashed string and the original password is outputted?
TO: mousemee
You don't too that. You need a hashed-string to string database. There's LOTS of combinations that generate the same hash.
Hi. is anybody familiar with using membership. crete user web service? I need a web service that adds in new users to database which consists of several tables. Thank you
There are a few minor problems with the code:
As mentioned above, you need to change the offset of the image data if there is a control block before the image.
Also the complete image array memory stream will be iniefficiently large as the gif encoder leaves a lot of null data at the end, more improtantly you need to trim down to before each individual image's end marker 3B, otherwise only the images up to the first frame with an endmarker will be shown.
If andybody's still interested, post a comment, and I can share my code.
I'm not using it however, as the default halftone palette used by the .net gif encoder is just not good enough. Rather than creating an optimized palette for each frame (which is annoyingly tricky and requires GDI bit twiddling), we've just ended up using multiple PNGs and animating them from javascript.
As a LogicaCMG employee (in Sweden) and used to those yellow pictures I really must say that those a f-ing funny!
Looks cool, but Quake 1 (yes, 1) still delivers the best multiplayer experience.
I'm getting old......... ;)
QuakeWorld for the win!!!
Signed,
Compile / One Minute Survivors
Yeah, played QW to death... and in "off-line" mode DM4 with a bunch of colleagues, that was a lot of fun...
Bananeman / Groente & Fruit Clan :)
(no, we didn't take things very seriously :)
Please tell me, how decode a password using MD5 in c#/
@ly: MD5 hashing only works one way. You can hash an entered string to see if its hash mathes the one in the database (or wherever). It is not possible to recover a password based on its MD5 hash.
It is possible to get a collision for the computed hash with brute force possibly optimized to abandon invalid iteration branches. But that is a whole science and I am not a scientist in that field.
Remember MD5 is not considered safe for storing passwords, or security any more. Use some stronger hash instead (SHA). However it is still good enough to hash file to check if there is no mod.
Check out wikipedia: http://en.wikipedia.org/wiki/MD5
Yes I am still interested in this code and getting it to work.
I'm not really bery experienced with the type of programming going on here.. could anyone explain what to substitute the Response for? since it's giving me an error..
As I mentioned before , bloggingabout.net got a bit unstable recently. Our administrator saw this, and
Yesterday , I posted about a problem with MSBuild building our solution. We solved it, so I wanted to
I'm not sure how binary you are, but I'm sure 1337 will give an exception or overflow or something! :)
hehe - lol. me 2; makes you wondered whether that indeed is a good thing, right?
13+14+10+13+1?
51?
i thought i would be C++ or Java... but thank god i didn't turn out to be Binary :)
Svaj, very close! But no sigar ... :(
Tip: there are no plus signs @ dead people
What's the Solution to this problem?
I found the two updates which crippled my laptop's Windows installation. After uninstalling and re
I have also found how looking at a project from multiple perspectives early contributes significantly to the success of a project. Recently, I've become involved in more Agile approaches to software development. One of the key methods of agile devellopment is to get customer/users feedback early through iterative releases. In regards to your post, identifying support as a customer (in addition to business users) would fit this model of development.
The TED website actually explains for me why you should watch Stephen Lawler's talk on Virtual Earth
Below is sample code that "should" work, but the animation doesn't work. It stops after the first image. I don't know what andyclap was saying, sounds like it was what he was referring to with the 3B, so do you know how to fix that?
Below, the two GIF images, "test.gif" and "ok.gif" that are on the C: drive will get animated to a "result.gif".
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
using System.Drawing;
using System.Drawing.Imaging;
namespace GIF
class Program
static void Main(string[] args)
//Variable declaration
StringCollection stringCollection = new StringCollection();
MemoryStream memoryStream;
BinaryWriter binaryWriter;
Image image;
Byte[] buf1;
Byte[] buf2;
Byte[] buf3;
//stringCollection = a_StringCollection_containing_images;
stringCollection.Add(@"C:\test.gif");
stringCollection.Add(@"C:\ok.gif");
//Response.ContentType = "Image/gif";
memoryStream = new MemoryStream();
buf2 = new Byte[19];
buf3 = new Byte[8];
buf2[0] = 33; //extension introducer
buf2[1] = 255; //application extension
buf2[2] = 11; //size of block
buf2[3] = 78; //N
buf2[4] = 69; //E
buf2[5] = 84; //T
buf2[6] = 83; //S
buf2[7] = 67; //C
buf2[8] = 65; //A
buf2[9] = 80; //P
buf2[10] = 69; //E
buf2[11] = 50; //2
buf2[12] = 46; //.
buf2[13] = 48; //0
buf2[14] = 3; //Size of block
buf2[15] = 1; //
buf2[16] = 0; //
buf2[17] = 0; //
buf2[18] = 0; //Block terminator
buf3[0] = 33; //Extension introducer
buf3[1] = 249; //Graphic control extension
buf3[2] = 4; //Size of block
buf3[3] = 9; //Flags: reserved, disposal method, user input, transparent color
buf3[4] = 10; //Delay time low byte
buf3[5] = 0; //Delay time high byte
buf3[6] = 255; //Transparent color index
buf3[7] = 0; //Block terminator
binaryWriter = new BinaryWriter(File.Open(@"C:\result.gif", FileMode.Create));
for (int picCount = 0; picCount < stringCollection.Count; picCount++)
image = Bitmap.FromFile(stringCollection[picCount]);
image.Save(memoryStream, ImageFormat.Gif);
buf1 = memoryStream.ToArray();
if (picCount == 0)
//only write these the first time....
binaryWriter.Write(buf1, 0, 781); //Header & global color table
binaryWriter.Write(buf2, 0, 19); //Application extension
binaryWriter.Write(buf3, 0, 8); //Graphic extension
binaryWriter.Write(buf1, 781, buf1.Length - 782); //Image data
if (picCount == stringCollection.Count - 1)
//only write this one the last time....
binaryWriter.Write(";"); //Image terminator
memoryStream.SetLength(0);
binaryWriter.Close();
Actually, what I posted does work! Just make sure the dimensions are exactly the same for all the images. Also to see the animation a little better, I changed the old values of high and low byte to these:
buf3[4] = 88; //Delay time low byte
I too was getting this error constantly and was almost at the point of switching to notepad2 to code in like my good old pre visual studio days. I was using the Cassini server on my laptop and got so fed up decided to install IIS to run the pages through that instead. Once IIS was installed, I tried Cassini some more and have not received that error a single time since. So, just wanted to mention that as a possible fix for this issue for those still seeing it. Worked for me with nicely.
Oh, as an FYI, someone here www.mcse.ms/message2503855.html mentions a side effect of setting the shadowCopyBinAssemblies to false.
Congratualtion, its a great achievement,i wish more certificats at IBM, If you could providing me with some advice and share your study notes then it would be of great help aaokour84@yahoo.com
I've just picked up this camera too and the Canon 75-300 zoom lens.
I would suggest your first purchase is a 58mm UV filter which does nothing but prevent your kit lens getting scratched. I've also picked up a circular polarising filter which lets you cut out reflections and get more dramatic shots with little effort.
[)amien
Hi Damien,
Thanks for the suggestions. I have a couple of friends who are in to DSLR's and stuff, so I knew about the UV Filter. It's already on there, protecting my lens.
The polarising filter might be interesting to, I'll look in to that! Thanks again.
Hej Rick,
Congrats with your camera!
Suggestion: Get a flickr.com account. GREAT (and cheap) online storage for your pictures! And read a lot of forums like 'fotografie' on http://gathering.tweakers.net.. it has great show-cases and howto's.
Last week, I bought the Nikon D80 with the famous 18-200 VR lens. Must say, also a fantastic camera; I'm really pleased with the results!
Hope to see some of your best pics soon!
I ordered some stuff through the internet a week ago. The packet was sent through the Dutch postal service
I seriously doubt you can easily decode passwords encoded using MD5 (it is possible, but it may take you 10 million years...)
Why not just encrypt the entered password and then compare it against the record in the database?
Or am I missing something?
I was extracting some image data from a file stream into a Byte[] with the following function.
private byte[] get_image(FileStream f, int length) {
byte[] image_array = new byte[length];
for (int i=0; i<length; i++) {
image_array.SetValue(f.ReadByte(), i);
return image_array;
I got this same error until I added a cast to the SetValue call like:
image_array.SetValue((byte)f.ReadByte(), i);
Thanks for pointing me in the right direction.
I ran the above code and it fails at the following line.
I found that buf1.Length is equal to 84.
Well then how can you expect buf1 to write 781 bytes when it has only 84 bytes.
Please explain.
Sorry, ignore that previous blog.
Another question: The code above works fine.
The only problem is trying to get the delay to work.
Any help on this please.
Hey Rick (i was reading a blog from Rene Schrieken and saw your blog): you really believe that a courier sends your parcel directly to the destination address? No way, much too expensive. I bet they both work the same....
Thanks Machan.It was help me to solve my problem.....
Have you tried setting the - character after the # mark? The value after that character is the unique ID for the rule.
Hi Jan,
Haven't tried that, but I'll do so now. Although the way the tag is filled now is a copy of how Visual Studio places the rules inside the tag of a project file. You would expect that to be the way to go ;)
I'll keep you posted.
Pingback from Disable specific Code Analysis rules for a Team Build - Gump's blog
3 words...
Gartner Hype Cycle? ;-)
Yeah, I agree. I still hope that it's a vacation thing, though.
Or perhaps people are too busy with real projects to blog about them...
@Olaf: I thought about that too... I've done a little searching, but there's no hype cycle to be found where blogging is positioned. I found one that mentions corporate blogging, and it is in the "trough of disillusionment" stage...
@Marc: let's hope it's just the holiday thingy ;)
Hi ,
Congratulations .... on process certification ... Send me some pointers
pkudupi@yahoo.com
Regards,
Prashanth.
thanks for this. it's exactly what I was looking for.
exhausted.
deadlines.
no time.
for instance.
When are we going to see some more pics on your photoblog ?
It is now possible to "decode" passwords that use MD5 (It won't take you 10 million years either).
Computers are powerful enough now that you can use a rainbow table (a table for MD5 hashes for every combination of letters, numbers, and sometimes symbols, up to 14 characters) to check a hash against a rainbow table relatively easily. There's a program (the name escapes me at the moment) that will actually do this to crack windows passwords given their hash.
That is why it is important to salt your passwords before hashing. For example instead of this:
string hashedPass = MD5(password);
you would want to use this:
string hashedPass = MD5(aComplicatedSaltString + password);
Typically, a good salt would be the user's UserName and a programmer defined salt concatenated together.
That makes it harder to decode because then a hacker would have to add the salt when checking every password which would take the 10,000 years mentioned above (probably less than that, but still futile to attempt).
Hi guys,
I'm using MD5 to encypt my site passwords but I want to implement a "Forget Password" feature.
Is it possible to decrypt the array of bytes to what the user had entered initialy?
Thanks.
Parser Error Message: Access is denied: 'DSHHitCounter'.
I got this error some time automatically it over comes
Dreamscene is the final version, the technical preview has been around since march. I've used it since MIX'07 for the Silverlight background...
DreamScene is a very nice funny feature :)
Can u help me out i am also making a website i have to do same thing in my website in url its my messenger id can u contact me there farhanaeem@hotmail.com or through emails i will be very glad full to u
Hi andyclap,
I'd be interested in how you got this working. I'm struggling to understand the need for writing 781 bytes when my loaded image is only 129 in length.
Cheers,
Stuart.
not able to set the property value
The <CodeAnalysisRules> element is a part of <PropertyGroup> element in your case, which means that every tag (no matter what name it has) is valid, and it means definition of a property and assigning a value.
I'd suggest you put an edit on this post, to point to your other post where you described how to make this work:
bloggingabout.tellus.nl/.../howto-disable-specific-code-analysis-rules-for-a-team-build.aspx
Please use a StringBuilder in your examples.
And public methods need to be XML-commented.
Greetz, The Aov Service Team
Using StringBuilder would be slower because of initialization time of the object. And everyone knows about the XML comments, but it'd clutter up the sample.
Greetz, The BloggingAbout.NET Team ;)
I tested the code above and drew the conclusion, that this code can work,
but does not have to.
(It will only work under certain conditions...)
Actually the code is not bad, but overlooks
several properties of the gif format:
Lets start with the creation of the buffers:
buf2:
This Buffer is the Application Extension for repeating the Animation,
and is completely correct as posted above.
Just additional:
buf2[16] = 0; //Number of repetitions LowByte
buf2[17] = 0; //Number of repetitions HighByte
The Value 0 indicates an endless loop.
buf3:
This Buffer is also absolutely correct
The only problem that I see with this is the way the pictures are merged:
memoryStream.ToArray() will give you the complete byte[] of the file, including
GIF-Signature, ScreenDescriptor, GlobalColorTable, Extensions, ImageDescriptor and ImageData.
You try to cut out the Start of each file until after the GlobalColorTable where the Picture specific Data beginns, and write one Table for the new gif-File:
...
And therein lies the error:
This code would be perfectly correct for a gif with a GlobalColorTable of 256 Colors:
(3*256byte = 768byte + 6byte Signature + 7byte Screendescriptor = 781byte)
But you overlooked two possibilites:
First of all, a gif file does not necessarily have to contain a Global ColorTable,
but can have a LocalColorTable defined after each single picture
Another point is, that the ColorTables do not have to contain 256Colors.
A quite good help for this is:
www.matthewflickinger.com/.../bits_and_bytes.asp
So you have to Split your single pictures
into their components before you
merge the required components.
If you wish I will post the Code I wrote to
merge Gifs of the same size.
(i'm not posting it already now, because it will take quite a lot of space...)
Markus
Don't you think that validating the values of the arguments and the return value fall under Entry/exit coverage (one of the criteria of code coverage)? Meaning that your example would not have a 100% code coverage?
Hey Vrieler,
Long time no see!
Of course you are right, but in this case I'm talking about Visual Studio's interpretation of Code Coverage. This number can be generated based on all unittests you have run in your solution. And, looking at this example, the Visual Studio number for Code Coverage would be 100%.
Unfortunately, that's the only interpretation of Code Coverage most people are interested in ;)
Nou jongen, gefeliciteerd!!
Ik hoop oprecht dat je vind waar je naar op zoek bent. Lijkt me een leuke club.
cu,
Rob
At my current project we made a project template for Visual Studio for our testers. We added all the
Gefeliciteerd en veel suc6!!!
greets from strapon :-)
It would be great if you could post your working code!
Rick, congrats man! Hope you find what you're looking for.
For the Dutch readers/commenters: bedankt! We houden contact en zoals jullie weten: het is een klein wereldje.
Thanks for the reactions and we'll keep in touch. It's a small world...
When asked about my point of view about a guideline concerning code coverage, my answer always is: go
From my professional point of view, I couldn't agree more with you on this post.
I don't think Completely unknown is heavy on the drama. I think that 80% is a nice score for developpers, and that they have performed way better then they ever did before.
But in terms of quality the problems will be in the 20% not covered. 20% is a big of amount of code....
Help is on the way dude! I've got something new that solved ALL my problems! I'll install it soon everywhere on BlogggingAbout.NET
Pingback from Xbox Games » Blog Archive » My games list
My wishlist would be :
Call of Duty 4
And after thinking really hard, I chose Call of Duty 4. This game is AWESOME!!! Both SP and MP!!! There's no choice, go for CoD4!!!
its still a bug in visual studio 2008
Hi, Markus I'd really appreciate the code too! thanks!
OK, this could take some Space now...
I tested the Code with equalsized flags that are not animated from www.nationalflaggen.de
file GifClass.cs:
namespace GifCreator
public class GifClass
public GIFVersion m_Version = GIFVersion.GIF87a;
public Bitmap m_Image = null;
public List<byte> m_GifSignature = new List<byte>();
public List<byte> m_ScreenDescriptor = new List<byte>();
public List<byte> m_ColorTable = new List<byte>();
public List<byte> m_ImageDescriptor = new List<byte>();
public List<byte> m_ImageData = new List<byte>();
public GifClass()
{ }
public void LoadGifPicture(string filename)
{ LoadGifPicture((Bitmap)Bitmap.FromFile(filename)); }
public void LoadGifPicture(Bitmap gifPicture)
m_Image = gifPicture;
MemoryStream stream = new MemoryStream();
m_Image.Save(stream, ImageFormat.Gif);
List<byte> dataList = new List<byte>(stream.ToArray());
if (!AnalyzeGifSignature(dataList))
throw (new Exception("File is not a gif!"));
AnalyzeScreenDescriptor(dataList);
GIFBlockType blockType = GetTypeOfNextBlock(dataList);
while (blockType != GIFBlockType.Trailer)
switch (blockType)
case GIFBlockType.ImageDescriptor:
AnalyzeImageDescriptor(dataList);
break;
case GIFBlockType.Extension:
default:
blockType = GetTypeOfNextBlock(dataList);
private bool AnalyzeGifSignature(List<byte> gifData)
for (int i = 0; i < 6; i++)
m_GifSignature.Add(gifData[i]);
gifData.RemoveRange(0, 6);
List<char> chars = m_GifSignature.ConvertAll<char>(new Converter<byte,char>(ByteToChar));
string s = new string(chars.ToArray());
if (s == GIFVersion.GIF89a.ToString())
m_Version = GIFVersion.GIF89a;
else if (s == GIFVersion.GIF87a.ToString())
m_Version = GIFVersion.GIF87a;
else
return false;
return true;
private char ByteToChar(byte b)
{ return (char)b; }
private void AnalyzeScreenDescriptor(List<byte> gifData)
for (int i = 0; i < 7; i++)
m_ScreenDescriptor.Add(gifData[i]);
gifData.RemoveRange(0, 7);
// if the first bit of the fifth byte is set the GlobelColorTable follows this block
bool globalColorTableFollows = (m_ScreenDescriptor[4] & 0x80) != 0;
if (globalColorTableFollows)
int pixel = m_ScreenDescriptor[4] & 0x07;
int lengthOfColorTableInByte = 3 * ((int)Math.Pow(2, pixel + 1));
for (int i = 0; i < lengthOfColorTableInByte; i++)
m_ColorTable.Add(gifData[i]);
gifData.RemoveRange(0, lengthOfColorTableInByte);
m_ScreenDescriptor[4] = (byte)(m_ScreenDescriptor[4] & 0x7F);
private GIFBlockType GetTypeOfNextBlock(List<byte> gifData)
GIFBlockType blockType = (GIFBlockType)gifData[0];
return blockType;
private void AnalyzeImageDescriptor(List<byte> gifData)
for (int i = 0; i < 10; i++)
m_ImageDescriptor.Add(gifData[i]);
gifData.RemoveRange(0, 10);
// get ColorTable if exists
bool localColorMapFollows = (m_ImageDescriptor[9] & 0x80) != 0;
if (localColorMapFollows)
int pixel = m_ImageDescriptor[9] & 0x07;
m_ColorTable.Clear();
int lastThreeBitsOfGlobalTableDescription = m_ScreenDescriptor[4] & 0x07;
m_ImageDescriptor[9] = (byte)(m_ImageDescriptor[9] & 0xF8);
m_ImageDescriptor[9] = (byte)(m_ImageDescriptor[9] | lastThreeBitsOfGlobalTableDescription);
m_ImageDescriptor[9] = (byte)(m_ImageDescriptor[9] | 0x80);
GetImageData(gifData);
private void GetImageData(List<byte> gifData)
m_ImageData.Add(gifData[0]);
gifData.RemoveAt(0);
while (gifData[0] != 0x00)
int countOfFollowingDataBytes = gifData[0];
for (int i = 0; i <= countOfFollowingDataBytes; i++)
m_ImageData.Add(gifData[i]);
gifData.RemoveRange(0, countOfFollowingDataBytes + 1);
private void ThrowAwayExtensionBlock(List<byte> gifData)
gifData.RemoveRange(0,2); // Delete ExtensionBlockIndicator and ExtensionDetermination
while (gifData[0] != 0)
gifData.RemoveRange(0, gifData[0] + 1);
file GifCreator.cs:
public class GifCreator
public static void CreateAnimatedGif(List<string> gifFiles, int delay, string outputFile)
BinaryWriter writer = new BinaryWriter(new FileStream(outputFile, FileMode.Create, FileAccess.ReadWrite));
byte[] gif_Signature = new byte[] { (byte)'G', (byte)'I', (byte)'F', (byte)'8', (byte)'9', (byte)'a' };
writer.Write(gif_Signature);
for (int i = 0; i < gifFiles.Count; i++)
GifClass gif = new GifClass();
gif.LoadGifPicture(gifFiles[i]);
if(i==0)
writer.Write(gif.m_ScreenDescriptor.ToArray());
writer.Write(GifCreator.CreateGraphicControlExtensionBlock(delay));
writer.Write(gif.m_ImageDescriptor.ToArray());
writer.Write(gif.m_ColorTable.ToArray());
writer.Write(gif.m_ImageData.ToArray());
writer.Write(GifCreator.CreateLoopBlock());
writer.Write((byte)0x3B); //End file
writer.Close();
public static byte[] CreateGraphicControlExtensionBlock(int delay)
byte[] result = new byte[8];
// Split the delay into high- and lowbyte
byte d1 = (byte)(delay % 256);
byte d2 = (byte)(delay / 256);
result[0] = (byte)0x21; // Start ExtensionBlock
result[1] = (byte)0xF9; // GraphicControlExtension
result[2] = (byte)0x04; // Size of DataBlock (4)
result[3] = d2;
result[4] = d1;
result[5] = (byte)0x00;
result[6] = (byte)0x00;
result[7] = (byte)0x00;
return result;
public static byte[] CreateLoopBlock()
{ return CreateLoopBlock(0); }
public static byte[] CreateLoopBlock(int numberOfRepeatings)
byte rep1 = (byte)(numberOfRepeatings % 256);
byte rep2 = (byte)(numberOfRepeatings / 256);
byte[] result = new byte[19];
result[1] = (byte)0xFF; // ApplicationExtension
result[2] = (byte)0x0B; // Size of DataBlock (11) for NETSCAPE2.0)
result[3] = (byte)'N';
result[4] = (byte)'E';
result[5] = (byte)'T';
result[6] = (byte)'S';
result[7] = (byte)'C';
result[8] = (byte)'A';
result[9] = (byte)'P';
result[10] = (byte)'E';
result[11] = (byte)'2';
result[12] = (byte)'.';
result[13] = (byte)'0';
result[14] = (byte)0x03; // Size of Loop Block
result[15] = (byte)0x01; // Loop Indicator
result[16] = (byte)rep1; // Number of repetitions
result[17] = (byte)rep2; // 0 for endless loop
result[18] = (byte)0x00;
Example to create a sequence of three not animated Gif-Pictures of the same size:
List<string> files = new List<string>(new string[] { "D:\\f1.gif", "D:\\f2.gif", "D:\\f3.gif" });
GifCreator.CreateAnimatedGif(files, 50, "D:\\result.gif");
I hope this helps...
We had the same error in our project. The MS knowledge base article on teh issue about making sure there are no relative paths to Source Control Provider was fruitless.
Turns out it was caused by a second "GlobalSection(TeamFoundationVersionControl) = preSolution" block in our sln file. We removed the block that was in error, and the properties couild nto be read message went away.
Can you publish the values in the GIFBlockType enum.
I think it's
enum GIFBlockType
ImageDescriptor = 0x2C,
Extension = 0x21,
Trailer = 0x3B
Is this correct?
Thanks
Gary
You're absolutely right!
Sorry I forgot to add the enum file...
Thanks for adding this!
Seems the enum values were correct.
Also, there's a line missing in LoadGifPicture on the Extension case in the switch statement.
Add "ThrowAwayExtensionBlock(dataList);" before the break, and it will work.
can any one tell me what is GIFVersion,GIFBlockType
I'm doing programming in c# using the GIF class
I'm getting an error saying directive or assembly reference missing
I'm new to the world of C#, a complete apprentice in this field plz help me out!!
Include these two enums:
public enum GIFVersion
GIF87a,
GIF89a
public enum GIFBlockType
There's a line missing in LoadGifPicture(BitMap). Use this version:
ThrowAwayExtensionBlock(dataList);
Works a treat after that.
I used the latest version of LoadGifPicture method and I'm getting an error.
I created three 50*50 gif images and when i run this code it failed on
AnalyzeGifSignature(List<byte> gifData) method.
when it tries to add m_GifSignature.Add(gifData[i]). The error is "Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index"
when i debug on the code LoadGifPicture is passing an empty gifData to AnalyzeGifSignature().
I created the datalist after it is saved in the memory stream and now works fine.
Thanks for sharing this usefull info
The real choice will be do you want to use a .NET blogging platform like DasBlog, Subtext or BlogEngine or something with wider support, features, plugins and themes like WordPress.
I really wanted to stay in the .NET camp but was tempted over by those features as was Rob Conery...
[)amien is right. Make a choice in platform.
If you decide for LAMP, consider Drupal or Joomla.
My blog is using Wordpress, but at the moment I'm settingup a new website where I can put more stuff on then just a blog and I'm using Joomla 1.5 for this. I'm switching because I want to share my presentations, articles and more information about myself. So I'm gone use it more then just as blogging software.
can anyone explain the purpose of these 2 enums??
Sorry for late reply holidays and all not been keeping up on reading.
Anyway I have been kind of floating around for a while I tried Microsoft's live spaces. I like them but slow as all get out way too much ajax and javascript going on. It just really bogs the blog down.
I tried wordpress, host by them, it was ok, but had a lot of wierd script errors sometimes, I would never host it on my own server basically because it is PHP and I am not familiar enough with PHP to make sure that I have plugged all the holes.
I tried blogger, and I really like them since they upgraded but I found them limiting as well in some aspects like being able to upload files and so on.
What I ended up doing is going with blog engine.net. They just released a new version right before Xmas that has full support for windows live writer and it's API's.
Also there are a lot of hosting companies finally getting into the virtual server hosting and it is really becoming dirt cheap. I got into solarvps when they were having a special and I got an excellent hosting deal from them like $30 a month for a fairly decent virtual server out on the internet. I really like this because it allows me to be fully in charge of the server and I can do anything I want and install anything I want. I am in full control of the server. This also mean I have to put on the firewall and set it up and I have to put on the antivirus and set it up and I have to patch it and so on. Anyway this allows me to have multiple domains and so on so this is another option.
Today was the first of two introduction days at Avanade . Maybe you missed it, but I started there today
Hi
Thanks for this help.
Regarding the CreateAnimatedGif method above, what units of time measurement is the delay parameter? I have tried many values, but I could never get more than a couple seconds delay between frames. Is there a way to put a delay of 5 or 10 seconds between frames?
Thanks in advance for your help.
Okay, I answered my own question. I think there may be a slight problem with the CreateGraphicControlExtensionBlock method. When I changed
to
result[3] = (byte)0x00;
result[5] = d2;
Everything started working correctly and the delay time became 100ths of a second (delay of 100 = 1 second).
Hi Markus,
i dont know how to use your code? Both are class files or vb file? can you explain please?
Really helpful.
It's a good thing they made a small yet significant change to the license. Quote from Scott's posting:
"We made a small change to the license to specifically call out that the license does not apply to users developing software for a non-Windows platform that has “the same or substantially the same features or functionality” as the .NET Framework. If the software you are developing is for Windows platforms, you can look at the code, even if that software has "the same or substantially the same features or functionality" as the .NET Framework."
If you're asking is it possible to simply reverse a hash the answer is NO.
A hash is a one-way function. It's simply a fixed-length "checksum" of sorts that is created based on the data presented. There is no reverse algorithm. That's the whole point.
The problem with trying to decode an MD5 hash is that it doesn't matter whether the message was three letters long or 500 pages long, the resulting hash it only 128 bits or 32 characters.
The most common way to crack MD5 hashed passwords is to use a program to systematically hash a dictionary or list of words (or random combinations of letters and numbers) until the resultant hash equals the hash you want to crack.
It's called a brute-force attack because you basically forcibly try every combination until you crack it.
If the password you are trying to crack is a simple or single word found in the dictionary, you can crack it in a matter of minutes or even seconds. If the password is long and complex, this method is typically fruitless.
That's why it is important to enforce complex password requirements of at least 8 characters, upper and lower case with at least one symbol (*&^, etc.
This worked for me too. Thanks!
Pingback from Pages tagged "msdn"
Why doesn't this work in dot.net within a apxs file? Where do I put the with statements? In the script tag or within the <%@ tag?
Info on using "C# 3.0" in .NET 2.0
bloggingabout.net/.../using-c-3-0-from-net-2-0.aspx
bloggingabout.net/.../compiling-a-net-3-5-project-and-running-on-a-net-2-0-machine.aspx
First and the only IBM official RUP certification guide is now available. Please follow the link below to order:
www.amazon.com/.../ref=sr_1_2
Thanks!!
Including a bug (allready sent to the development-team):
try to add a folder named "app_data"
Adding will work, but then opening that folder will give you an error.
Try doing an IISReset. That seems to work for me.
Pingback from asp.net
Hello ,good post
but I don't know how to use this ??
I made a class like your steps but
error faced me =>'ThemeModule' does not implement interface member 'System.Web.IHttpModule.Dispose()'
so how to solve this
also after building the class , what is next
sorry I'm new in that. thank you very much
Can you help me in using the BootStrapper?
Pingback from Further Proof I Lack Self-Control : An Experiment in Scotch
Hey there,
Add this:
public void Dispose()
Pingback from » Blu-Ray coming to the Xbox 360?
hey there,
i add the method dispose() but the error msg is that the system can not load type="Howtos.ThemeModule"
You've been kicked (a good thing) - Trackback from DotNetKicks.com
I also had 2 TeamFoundationVersionControl GlobalSection's in my sln file, removing one fixed my issues as well. Cheers.
Thank you very much for this article!!!
I just spent several hours pulling my hair out trying to figure out why 3 linkbuttons inside an UpdatePanel were causing full postbacks instead of just async posts. I added several new links and they all did async posts as expected. After reading your article I finally noticed the id's were missing on the 3 malfunctioning linkbuttons. Simply adding the id's fix the problem.
I owe you a beer...
Yeah, when I capture a dropdown event and display a messagebox to the user, the combobox still shows in "droppeddown" mode.
I can't figure out how to automatically close the dopped down potion so it's not down anymore. Everything I do (that makes sense to me) doesn't work. Even setting droppeddown states to false, double-setting selectedindex to -1, nothing works
Hi Rick,
The code on your post will not collect controls that inside other controls (TextBox inside FormView etc...)
To really collect all the controls from a specified type you need to run recursive method.
Take a look at the solution:
mironabramson.com/.../Collect-all-controls-from-specific-type.aspx
Hi Miron,
You are right, nested controls will not be found. But to be honest, that wasn't what I was trying to achieve ;)
The intention of my post was to bring the new .OfType<> method under the attention. I guess that worked :)
Anyway, thanks for your comment. People who are looking for that functionality and end up here now have a link to a post with code that does exactly that.
Thanks again!
Pingback from Backing up and restoring Visual Studio settings | How-to Build Your Own Home Studio
can u please provide the code for decoding also...
encoding i did but i want to retrieve the encoded string from the database n compare it with the password field when the user logs in again for this i need to decode the string so tht it comes to its original value n then i can compare it with the password tht user enters...
reply asap
thanks
You'll be punished like &#*$( by Google for duplicating content over multiple domains! :)
Great! Thanks for taking the time to post this
Thanks for this. Like you I was having terrible problems but svenM's reg fix cured it. I already had a key called VersionIndependantProgID but I went ahead and added the ProgID as recommended and everything worked.
I'm new at integrating ajax with sharepoint but your topic is exactly what's happening with my site.
I've created a webpart and my controls are added to the updatepanel. Within the class I've created a handler for the onclick event of a button. The event is been fired but the page (Master page) in sharepoint does not refresh with the changes caused by the click event.
Also, I'm using the SelectedIndexChanged event to populate dropdownlists. When I select an item in the list the page does a full refresh. These controls are also added to the updatepanel. They show up on the page in sharepoint but do not function properly. Your code example is simple. I'm using vb.net and in my class I don't have access to the page_load event. Would you mind pointing me in the right direction?
regards,
amorris01@yahoo.com
Otra vez un poco de retraso antes de poner las noticias, pero buena ración de las mismas: Microsoft Robotics
Congratulations .... on process certification ... I got 93 % in tht exam. Does anyone have any study materials on the latest version 7.0 of RUP Test 839??
email: amit.sk.sen@gmail.com
Excellent, exactly what I was looking for too!!
Not to do with Team, but older fashioned VSS 6.0. Duplicate SoureControl section was the cause.
Nice one.
:o)
Thaks a lot. This one saved me a lot of investigation.
I had to change the method from static to non static.
Here it is how it works for me:
methodInfo.Invoke(Activator.CreateInstance(_type), New Object() {_paramArray})
I just had to add Activator.CreateInstance
Animated GIF Encoder for .NET Update
LOL!
Yeah, blame the Extender! ;-)
Hi,
I am facing the Same error can you tell me the soultion for this.as i cannot hardcode my values in the dropdownlist it seems to be preety big problem.aslo i am facing the situation which is even more worse.actually my code is working fine on my local systembut when i deployed the code on the Server the error occurs i could not able to track the reason for it until now..Can anyone help me.??
>Try doing an IISReset
You can also:
Re-start VS
Re-start your computer
Put your finger in the air and whistle
All of these <may> fix the problem, as it is intermittent - one minute the error pops up, you close the browser and try again and the error doesn't pop up.
Adding the entry in web.config fixed the problem. thanks for posting this.
adding id? where is the id to be added?
can anyone please show me where linkbutton id to add?
Heh.. As Scott I did not set ID for my linkButton. Why? "Because it is autogenerated". Men, thanks for saving my time :) Second beer from me.
For everyone asking for how to decode hashes, YOU CAN'T. That is the POINT. You can hash a string and compare it to your already computed hash, that is IT. Read a wikipedia on computer hashes for gods sake.
Also, to the original poster, Rick van den Bosch... shame on you for using ASCIIEncoding.Default.GetBytes(). You do realize that would seriously restrict the usefulness of your method to working only in languages that ASCII has the character sets for, right?
I suggest you read this article entitled:
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
www.joelonsoftware.com/.../Unicode.html
mani, you do not "decode" a hashed password. It's impossible. Hashing is not encryption. Once hashed, you cannot restore it to the original password.
To test to see if the user entered the right password, you hash the password the user enters on the login screen, and compare the result to the password-hash stored in the database.
The benefit here is that even someone who can see into the database cannot know what the users password is.
The downside is that if a user looses their password, you cannot look it up to tell them. You need to have the system generate a temp password and mail it to them.
Caused by the html closing tag (forward slash /), Try escaping it
Thank you man. It work exactly as I needed.
My guess is that the finalObjects list changes since the Ranking values change (and therefore the result of the query changes). LINQ uses lazy evaluation; the result set is not determined when sortedObjects is assigned its value but only once you start iterating.
en.wikipedia.org/.../Lazy_evaluation
How did you account for the style changes when adding the DOCTYPE?
The situation I talked about in my previous post had one very big issue: LINQ sometimes just is too dynamic
I could not help but laugh to myself when reading this post. Sometimes we think the problem is with the “equipment” when many times it’s a simple, easy fix.
@pmcgouirk:
The page we changed this for was not (negatively) affected by the change.
I know the style might change if you do this for other pages, and I'm not sure how to fix those. This might be because I haven't encoutered that (yet). ;)
Good luck.
Thanks, worked fine.
Your solution does exactly what you didn't want it to in the first place i.e.: it sets theme for each page in the whole web site.
Hi Michal,
You might be misinterpreting me here, or maybe I didn't explain clearly. Let me try to clear things up :D
All I said was 'One of the reasons being it would result in the theme being applied to the entire website.'
You assume DetermineTheme returns the same theme every time. There might be several themes for my website which should be chosen based on the location of the page, the color of your shirt or the temperature outside. The method might also return null in some specific scenarios, resulting in no theme being applied at all.
This solution is pretty different from setting the theme from the web.config. Or at least I think so... ;)
Kind regards, Rick
Couldn't you have just made your updatepanel's conditional?
I worked on webpart for sharepoint that use AJAX and I was really angry why my code didn't work. You get me the answer. Thank you!!!
Did you ever stop to think that this is a nasty kludge? I read the original MSDN forum post - frankly, I think it stinks.
That's not to say that it doesn't work, but it's a lot of work for something that should be trivial (not leaky and inherently sprawling). Now **that's** worth blogging about.
Pingback from user control not updating visual studio
Can you post a sample of your code. How to use the CascadingDropdown without the Webservice but a method instead. What entries do you use for ServicePath and Category.
thanks,
What is the length of the generated string ?
Is it fixed?
Somebody should know the length (at least the max) to
store this to database.
It really worked with the updatepanel and can u please let me know how to apply triggers concept of ajax to the sharepoint.Is some code need to be added to the Page load event to apply triggers concept?
Ziet er leuk uit, alleen vind ik de html die ervoor gebruikt is dan weer iets minder.
Use Image button instead of linkButton and use small pics as its caption. It will work fine and not result as full postback.
For I = 1 To 10
Dim imgBtnDel As New ImageButton
imgBtnDel.ImageUrl = "~/Buttons/Delete.jpg"
imgBtnDel.CommandName = "Delete"
imgBtnDel.CommandArgument = i
AddHandler imgBtnDel.Command, AddressOf Me.imgCommand
.............Controls.Add(ImageButton1)
Next I
Sub imgCommand(ByVal sender As Object, ByVal e As CommandEventArgs)
Label1.Text = e.CommandName & " - " & e.CommandArgument
End Sub
Thanks a lot Raghavendra, What I was missing is Activator.CreateInstance(_type). You resolved that!!!
A comparison between ProFont and Consolas.
home.graffiti.net/.../profontVSConsolas.jpg
Basically Consolas IS better overall, but both scores are pretty much the same anyway so it doesn't exactly matter.
Somehow, ProFont is better for me personally for the following reasons:
1) I never liked the idea of tall narrow fonts because it can be harder to quickly aqquire target values/parameters, highlight and copy+paste them since the font is horizontally compresssed already.
2) I'm more used to wider fonts because they match fonts like Verdana, Courier New, etc., fonts which I've been familiar with.
3) Tall fonts remind me of studying code in programming books, but not writing/typing them. Somehow, wider fonts tend to emphasise a horizontal flow & speediness which works well for "snippet-style" programming.
4) ProFont brings out the structure and form of any piece of code (no matter how complicated or "messy") very well with the chunks, branches, values and parameters easily identifiable and isolated. Consolas (or other narrow-based fonts) tend to be pretty average in this area.
I disabled both Indexing services & antivirus and it worked. McAfee applied this policy "Common Maximum Protection:Prevent creation of new executable files in the Windows folder"
Thank you all.
Thank u that was helpfull.
i created a c# web form contains 2labels,2textboxes and button(ok).when click on ok in should verify the userid and password fron sqlserver if the userid is correct the permit to go for next page.
for this i need code for that
Hi Amit,
I am also preparing for RUP cert. ( 839 ) .
I will be very thankfull If you can provide me some study material and sample questions.
email : vishal_igi@yahoo.com
Thanks...
-vishal
+1 on the duplicate globalsection
But does this work if your .NET assembly was built in Release mode? I would hazard a guess of No...
Hi David,
No it doesn't, and I surely hoped id didn't! The classname 'Debug' says it all, doesn't it. ;)
And besides, if it did work, everyone would be able to see the debugging information of any (.NET) application. I can imagine there are companies that do not want that information to become public.
In short: this works in debug builds. It's an expansion to the default Output window of Visual Studio.
Kind regards.
Try using the publishing site portal,it doen not see any style changes plus it already has a doctype HTML transitional so u dont need to worry of adding XMLNS
also make sure you include panelfixups() just before adding the user control in createChildControls().
and do not keep modal popup inside the update panel
thanx!!
I've been using it for a week now, works excellent. Posted some quick start tips in this post. Really like the tool.
The great thing is that you can connect to a DebugView app on a server (test server of course!!! ;-) and view the messages locally in DebugView.
It was a very much helpfull stuff for me .
Now can you tell me how to decode the encoded password back.
Thank You....
Plz Tell me the advantage to call funtions by Delegate Method
U can avoid these kind of error by setting validateRequest="false" in the <%@ Page dirctive........ :)
I don't know if you managed to get this working or not, but svenM's article maybe a bit misleading.
He says if you have the ProgID key you don't have the same problem has him, but the value of the key could be wrong, wich was my case. And don't forget to restart VS after you change the registry.
Hope it helps
I'm also preparing to take 839. Can you please share with me pointers or sample tests or refer to study materials. Thanks.
Hehehe... een typische babelfish vertaling :)
Thanks man!!! That was pretty useful.
Thanks for a great article and for saving alot of more hours of work for me!
I started getting 'access denied' error. Do I need to do something else?
It works.
Thanks a lot.
many thanks
Here's utilty function to wrap it:
public static T Parse<T>(string value) {
return (T)Enum.Parse(typeof(T), value);
MyEnum foo = MyEnum.Foo;
string foobar = foo.ToString();
MyEnum bar = EnumHelper.Parse<MyEnum>, foobar);
Awesome! You just solved a very frustrating problem for me. Thanks!
Hi All,
Any help for the IBM Test 839 RUP V7 is really appreciated. I am looking for some questions and answers.
My e-mail ID is adityajairam.soory@gmail.com
Thanks...AJ
Very nice, Freelancing / having your own company is a great way to earn a living.
Wish you the best in your endevours.
BTW there is an error on:
www.kennismakelaardij.nl/.../huizenaanbod.php
Hi Mischa,
The error has been solved. And of course, we have made sure it won't come back ;)
That is great news Rick! I'd like to wish you guys good luck with the brand new company. Up to total world domination and beyond! :)
Because I stopped working at Avanade and started my own company (this website is under construction and
This error is really pissing me off :(
That also did the trick for me, thanks.
Thank you very much. It was very helpful for me.
Three lines, much faster:
public static string MD5Encrypt(string data)
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
byte[] result = md5.ComputeHash(Encoding.UTF8.GetBytes(data));
return Encoding.UTF8.GetString(result);
hello everyone,
Problem with Ajax Enabled Application running at server as whenever i leave the page(startup page) for few minutes and then if try to login it shows popup window with below message so i m in great problem so pls provide me solution for this.
"Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
wth r these codes for!
Thanks for this. I was having the same problem when trying to connect to an Access DB file and svenM's reg fix cured it. I already had a key called VersionIndependantProgID but I went ahead and added the ProgID as recommended and everything worked. Thanks for your post.
very good..really helpful
Thank you...
That was our exact problem too. Thanks.
The ASP.NET Charting Controls have been announced last month. The charting controls are a nice addition
it's a contest? :-D
1 line:
return Encoding.UTF8.GetString((new MD5CryptoServiceProvider()).ComputeHash(Encoding.UTF8.GetBytes(data)));
Hi all,
Please the code for VB .NET?
i translate the code...
Imports System
Imports System.Collections.Generic
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.IO
Namespace GifCreator
Public Class GifClass
Public Enum GIFVersion
GIF87
End Enum
Public Enum GIFBlockType
ImageDescriptor = &H2C
Extension = &H21
Trailer = &H3B
Public m_Version As GIFVersion = GIFVersion.GIF89a
Public m_Image As Bitmap = Nothing
Public m_GifSignature As New List(Of Byte)()
Public m_ScreenDescriptor As New List(Of Byte)()
Public m_ColorTable As New List(Of Byte)()
Public m_ImageDescriptor As New List(Of Byte)()
Public m_ImageData As New List(Of Byte)()
Public Sub New()
Public Sub LoadGifPicture(ByVal filename As String)
LoadGifPicture(DirectCast(Bitmap.FromFile(filename), Bitmap))
Public Sub LoadGifPicture(ByVal gifPicture As Bitmap)
m_Image = gifPicture
Dim stream As New MemoryStream()
m_Image.Save(stream, ImageFormat.Gif)
Dim dataList As New List(Of Byte)(stream.ToArray())
If Not AnalyzeGifSignature(dataList) Then
Throw (New Exception("File is not a gif!"))
AnalyzeScreenDescriptor(dataList)
Dim blockType As GIFBlockType = GetTypeOfNextBlock(dataList)
While blockType <> GIFBlockType.Trailer
Select Case blockType
Case GIFBlockType.ImageDescriptor
AnalyzeImageDescriptor(dataList)
Exit Select
Case GIFBlockType.Extension
Case Else
End Select
blockType = GetTypeOfNextBlock(dataList)
End While
Private Function AnalyzeGifSignature(ByVal gifData As List(Of Byte)) As Boolean
For i As Integer = 0 To 5
m_GifSignature.Add(gifData(i))
gifData.RemoveRange(0, 6)
Dim chars As List(Of Char) = m_GifSignature.ConvertAll(Of Char)(New Converter(Of Byte, Char)(ByteToChar))
Dim s As New String(chars.ToArray())
If s = GIFVersion.GIF89a.ToString() Then
m_Version = GIFVersion.GIF89a
ElseIf s = GIFVersion.GIF89a.ToString() Then
Else
Return False
Return True
End Function
Private Function ByteToChar(ByVal b As Byte) As Char
Return CChar(ChrW(b))
Private Sub AnalyzeScreenDescriptor(ByVal gifData As List(Of Byte))
For i As Integer = 0 To 6
m_ScreenDescriptor.Add(gifData(i))
gifData.RemoveRange(0, 7)
' if the first bit of the fifth byte is set the GlobelColorTable follows this block
Dim globalColorTableFollows As Boolean = (m_ScreenDescriptor(4) And &H80) <> 0
If globalColorTableFollows Then
Dim pixel As Integer = m_ScreenDescriptor(4) And &H7
Dim lengthOfColorTableInByte As Integer = 3 * CInt(Math.Pow(2, pixel + 1))
For i As Integer = 0 To lengthOfColorTableInByte - 1
m_ColorTable.Add(gifData(i))
gifData.RemoveRange(0, lengthOfColorTableInByte)
m_ScreenDescriptor(4) = CByte((m_ScreenDescriptor(4) And &H7F))
Private Function GetTypeOfNextBlock(ByVal gifData As List(Of Byte)) As GIFBlockType
Dim blockType As GIFBlockType = DirectCast(gifData(0), GIFBlockType)
Return blockType
Private Sub AnalyzeImageDescriptor(ByVal gifData As List(Of Byte))
For i As Integer = 0 To 9
m_ImageDescriptor.Add(gifData(i))
gifData.RemoveRange(0, 10)
' get ColorTable if exists
Dim localColorMapFollows As Boolean = (m_ImageDescriptor(9) And &H80) <> 0
If localColorMapFollows Then
Dim pixel As Integer = m_ImageDescriptor(9) And &H7
m_ColorTable.Clear()
Dim lastThreeBitsOfGlobalTableDescription As Integer = m_ScreenDescriptor(4) And &H7
m_ImageDescriptor(9) = CByte((m_ImageDescriptor(9) And &HF8))
m_ImageDescriptor(9) = CByte((m_ImageDescriptor(9) Or lastThreeBitsOfGlobalTableDescription))
m_ImageDescriptor(9) = CByte((m_ImageDescriptor(9) Or &H80))
GetImageData(gifData)
Private Sub GetImageData(ByVal gifData As List(Of Byte))
m_ImageData.Add(gifData(0))
gifData.RemoveAt(0)
While gifData(0) <> &H0
Dim countOfFollowingDataBytes As Integer = gifData(0)
For i As Integer = 0 To countOfFollowingDataBytes
m_ImageData.Add(gifData(i))
gifData.RemoveRange(0, countOfFollowingDataBytes + 1)
Private Sub ThrowAwayExtensionBlock(ByVal gifData As List(Of Byte))
gifData.RemoveRange(0, 2)
' Delete ExtensionBlockIndicator and ExtensionDetermination
While gifData(0) <> 0
gifData.RemoveRange(0, gifData(0) + 1)
End Class
End Namespace
Have a 2 error:
1)
ByteToChar: Delegate 'System.Converter(Of Byte, Char)' requires an 'AddressOf' expression or lambda expression as the only argument to its constructor.
2)
gifData(0): Value of type 'Byte' cannot be converted to 'WindowsApplication1.GifCreator.GifClass.GIFBlockType'.
sorry for my English :)
who work with radius server encypt user password?
sample don't work :(
string pswrd = "1";
string key = "key";
byte[] keyBytes = Encoding.Default.GetBytes(key);
byte[] authBytes = radius.Authenticator; //byte[16]
byte[] pswrdBytes = new byte[16];
Encoding.Default.GetBytes(pswrd).CopyTo(pswrdBytes, 0);
int b1Len = keyBytes.Length + authBytes.Length;
byte[] b1 = new byte[b1Len];
keyBytes.CopyTo(b1, 0);
authBytes.CopyTo(b1, keyBytes.Length);
byte[] hash = getMd5Hash(b1);
byte[] res = new byte[16];
for (int i = 0; i < 16; i++)
pswrdBytes[i] ^= hash[i];
I tried the above steps, but still i am getting problem.I am able to view the modal popup in the site, but it appears in the left topmost cornet of site. Please help me to solve the issue
La necesidad de encriptar (ocultar a simple vista) información no es necesidad propia en los sistemas
you need to do custom error handling to handle such type of error.
In the "EndRequestHandler" just add the following code.
if (args.get_error() != undefined)
// If there is, show the custom error.
$get('Error').style.visibility = "visible";
// Let the framework know that the error is handled,
// so it doesn't throw the JavaScript alert.
args.set_errorHandled(true);
This is very useful...
But I want to how to Decode it..
Hoping a reply..
Tnx...
:)
Nice post I'm facing the same problem I will try this now.
Satalaj
Hello,
here you can find a very simple solution:
social.msdn.microsoft.com/.../79e84cfe-3d4b-43c7-8d86-723208e4a64c
From that post:
"This happens only occasionally when making changes to the aspx file, and then hitting F5 for 'Start Debugging'. If I manually modify the the designer.cs file in question (just add a space somewhere), save it, and go, the problem disappears."
I tried it and it works!!
I found something similar using FxCop on some code I wrote.
I had to add the reference to microsoft.sharepoint.security
Bye from Italy,
Gilda
Pingback from Hashing Password « Team Six Project Blog
Thanks !
One byte in "buff2" must control whether or not to loop the animation. It would be nice if you could add this information in the code as comment.
Pingback from RemotingConfiguration.Configur*e Fails in SmartClient with System.ArgumentException: URI | keyongtech
Thanks so much, it did save me time!
My org (MGSI - Microsoft global services india) falls under WorldWideServices arm of Microsoft and is
How to identify Web.UI.Controls using StyleCop?I want to make custom rule for .net UI.controls' naming convention.
Thank you!!!
Bravo! Problem fixed with removal of the second source control section.
I had renamed the root namespace on a bunch of my projects and had removed/readded to source control (VSS2005). I wonder why VS causes this error?
Any help on applying this in vb?
Could you show some ways to apply the DetermineTheme method? Would you suggest cookies, session variables, etc?
Thanks, this is what i was looking for :)
This did not solve my problem entirely, I don't have any click event associated with the link button, but itgenerated dynamnically and added to the placeholder which is in a updatepanel and has only clientsideclick to show a modalpopup extender on the page, but it results in fullpostback when I click on the link it just shows the modal and then does the postback eventually hiding the modal again as page gets reloaded!! crazy thing any idea why this is behavinig this way?
Santhosh
Get a Windows Home Server! It has an almost perfect full system backup-restore story for situations like this. Makes an automatic daily backup cycle really easy. Only takes about 15-30 minutes a day because it only sends clusters that have changed to the server. You can pick and choose the day to restore to. Just boot from the WHS Restore CD.
I just leave my laptop in sleep mode at night. It automatically wakes up in the middle of the night to back up and then goes back to sleep again. Works fine over wireless.
The hard disk you restore to doesn't even have to be the same size as the original.
You can also inspect and restore individual files from backups by just mounting them as an extra drive. So no need to do a full system restore in case you lost just a few files.
It respects EFS file encryption. These files are also encrypted in the backup and can only be read on systems that have the right EFS certificate.
I could go on and on... ;)
PS: Don't forget Live Mesh ;)
How can decode password which r store by encode form.
i m host to server in aspx page following error comes
SecurityException: That assembly does not allow partially trusted callers.
this is very useful and simple way..
thanks...
Thanks! this helped!
I also searching for the same.... pl help
I found two duplicate sections in my solution. Removing the incorrect ones solved the issues.
Nice tip.
Will keep in mind, while generating controls dynamically.
Thank u very much sir u solve my very big problem.
An alternative (not Microsoft) program for this is IETester. IETester works for IE8, IE7 IE 6 and IE5.5.
More information on www.my-debugbar.com/.../HomePage
Thanks. it worked for me. even though restarting IIS, VS, browser solves the problem, but its not permament solution. Better to add that little markup shadowCopyBinAssemblies="false" in the web.config file.
Good one!!!
Exactly That!
Duplicate removal fixed the problem, thanks :0)
Problem is does visual studio automatically undefine #DEBUG
e.g #undef DEBUG
so the whole thing goes out of debug mode.
or i have to do it everytime pre-release
Same thing here, found 2 TeamFoundationVersionControl sections, deleted one and the error went away. Thanks
Rick,
I've just read through your solution, although I haven't tried implementing it yet, and I like it.
However, it occurs to me that the title " HowTo: Set the Theme for a MasterPage" is actually a misnomer since your actually just appending to all Pages' PreInit events - whether they use a MasterPage or not. Perhaps a better title would be in order to catch those developers looking for this type of solution but not necessarily using a MasterPage.
This worked for me as well. I just unpluged my USB wireless mouse and it worked fine. Very strange... Thank you for the post. I spent days trying to figure out why this didn't work.
I had the same problem, but then realised I had a command prompt open located within the gac_msil\<dll>\<version> folder from when I had done the backup xcopy out of the gac.
Closing this the update of the dll in the gac worked fine
Andy
Following post contains code snippet to generate MD5 hash code using C#:
www.etechplanet.com/.../Generate-MD5-Hash-code-from-a-string-using-C.aspx
Thanks... I was thinking something like this....
it didn't work for me, everything was working fine with me until i decided to install WSS then i didn't need it anymore so i simple uninstalled it from my machine and ever since then i'm facing this problem
beware also after uninstalling the WSS i had to reinstall the IIS as it created problems and i had to fix the VS2008 cause i couldn't find the stander templates to create new website in vs2008
now i'm just trying to add ajax controls toolkit but it totally doesn't show in my tab!!!!!
Is EndRequestHandler functions or what?
And where can I find it?
Please a details for bottom code?
Thanksyou
Just for info this is caused by an important .NET feature - the compiled files (all your module DLLs, all the .cs codebehind classes and the dynamicly created _aspx classes generates from the .aspx files) are not actually executed in the /bin folder
Instead all these binaries are copied to a dynamically created subdirectory deep down in the 2.0 framework folder (same folder if you're using 3.5 as the core ASP.NET engine is the same) and executed here.
This feature is what allows you to update your .aspx files on the fly - without compiling and redeploying your core /bin binaries.
When you do this - all existing request (usres) are served from the /Windows/.NET/2.0 directory while your /bin files are recompiled and then "shadow copied" into the .NET folder.
Interestingly all the .aspx files are dynamically compiles into classes named [pageclass]_aspx - which of course inherit from the .cs class defined as the codebehind.
This means users can continue to use your site while you are correcting your HTML (thou of course you should never ever do this as it slows the site completely - at least don't ever get caught doing it).
omg omg omg people who ask how to decode the hash should &*&%!!!
READ THE COMMENTS BEFORE YOU POST ANYTHING.
You CAN'T decode and you don't need to.
Just encode the entered password at login and compare that to the hash in the database.
Thanks for the solution. We had this problem once, and somehow got rid of it, but it came back on me recently, highly appreciated!
[Quote]Placing an UpdatePanel around the entire UserControl (with default settings) makes that the entire UserControl is posted back, even when it is a control inside a nested UpdatePanel that posts back. The ASP.NET controls have no problem with this, but the SharePoint InputFormTextBox set to RichText does. The toolbars are not rendered, and the entire HTML is shown. Setting ChildrenAsTriggers would disable this behaviour (it does with default ASP.NET controls), because in that case only the nested UpdatePanel is posted back. Unfortunately we didn't get to test that.
[/Quote]
Is this fix tested? doesnt work for me .
Cleaning up ASP.NET temporary files worked for me
I spent 3 days to solve this!!!
Thank u so much for the post!!!
Santhosh, I am experiencing exactly the same problem as you are. I'm using nyromodal. .Net is really frustrating and ruin the client side code to enable my nyromodal modal popups. I've been searching on this for almost 2 days and trying a million different things.
My conclusion is just about to be "UpdatePanels" are next to useless and I'm thinking of just coding everything directly using jQuery and web service calls. But this has its drawbacks too as you lose the state of the objects in the page and everything has to be static.
ASP.Net = EPIC FAIL. This would have been finished in 20 minutes with PHP.
The easy way of avoiding the problem is to perform a Solution->Clean before running the web app. This always fixs the problem.
Cool! See you there! :)
That really is the error. Thanks for the blog :)
I have added the AllowPartiallyTrustedCallersAttribute and i have enable debug = 'true" but i still get this message. Is there anything else I am missing.
I have a combobox that the runtime believes has already been destroyed.
If not myCombo is Nothing Then
myCombo.focus
myCombo.DroppedDown = true /* blows up here */
When the exception occurs, I break to the debugger. The supposedly destroyed combobox instance can be investigated in the watch window.
Piece of shit.
Set page directive attribute ValidateRequest="false" it will solve problem
I am using a dropdown list on a master page then how can i bind this dropdown list with themes.If user select the theme from the dropdown list that theme should be applied on whole page...what is the body of this DetermineTheme() method
Hey, I love this code and I'm trying to use it (over using something like a base-page where I'd have to change the base-page for all of my aspx pages)
I'm stuck on trying to get the user's ID inside the "DetermineTheme" function. That way I can do a database lookup on some tables and see what theme they should have. Right now I'm using "Membership.GetUser(User.Identity.Name).ProviderUserKey.ToString()"
which doesn't seem to work.
Says "User" does not exist inside the current context.
Any thoughts?
Wunder - try HttpContext.Current.User...
Archana - re: enumerating themes for a drop down...
Try:
DirectoryInfo di = new DirectoryInfo(Server.MapPath("~/App_Themes/"));
foreach(Directory d in di.GetDirectories())
add the theme to the drop down
Thats all very nice but how do I decode it?
;)
Thanks. I need to decode the hash back to a string now, how do I do that?
Just joking :-D I can't believe people are asking that!
mrpmorris.blogspot.com/.../more-secure-passwords.html
find below code to get EndRequestHandler event....
function EndRequestHandler(sender, args) {
alert("There was an error" + args.get_error().message);
function load() {
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
call load() method on your body Onload Event.
lmao .. you guys rock .. lol how to decode it..
Thanks.. solved my problem exactly!
Thanks,it worked for me.
how we verify password stored in database with login password? (using hash functions in c#)
Thanks, that did it!
The same solution worked for me.
In my case it started when two developers added new projects at the same time and when both tried to check-in code. Obviously code was not "auto merged" correctly and hence the unpleasant message.
Thanks a lot!
I also spent 3 days trying to figure out what the problem was.
Thanks this worked for me although i can't believe that my wireless mouse was causing the problem
Thanks again
Tried all of the above but still no luck ... any other tip that might solve this problem.
Thanks works great. Glad somebody mentioned salting.
I would say for those who wan't to automate the forgotten password scenario generate a random temporary password for users to use.
It would be nice to find out what others are on about with regards to having databases that store hashed passwords differently.
Somebody requested what the database length would be it is always 32chars I think.
thanks for your research, saved me [end tasking] asp_wp.exe every time i build and [F5]
brilliant!
Hi, Good post. Do you have any sample code.
I wouldn't mention the word encoding in this article, it's hashing. Might trigger the large amount of questions by the beginners.
Personally I prefer this:
FormsAuthentication.HashPasswordForStoringInConfigFile(password, System.Web.Configuration.FormsAuthPasswordFormat.MD5.ToString())
Solved our problem
Duplicate VersionControl in solution file.
Thanks so much for this posting.
I had updgraded Visual Studio and then suddenly my previously working web application stated getting an error, "This assembly does not allow partially trusted callers." I struggled with the error for a long time until I found this article, checked my web.config, and sure enough, it had trust level = medium.
I changed trust level to full and now everything works fine again.
this option work, test!!!
<asp:UpdatePanel ID="UpdatePanel10" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<td >
<asp:LinkButton ID= "lnkTest" runat="server" CommandName="Sort"
CommandArgument="" Text="Test" OnCommand="Sort_lsvAvisos" />
</td>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lnkNAviso_lsvAvisos" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
At the risk of sounding redundant...
I OWE YOU A BEER!!!
I have been pulling my hair out for hours over this. Thanks a lot man.
Thanks for posting this.
I solved my error.
I had the same problem- There is another resolution. This applies to Windows Server 2003. Here's how:
1) Invoke IIS Manager (inetmgr.exe)
2) Expand Web Sites-->Default Web Site
3) Right-click on the app in question, and choose "Properties"
4) Note down the entry selected for "Application pool:"
5) Now, still in IIS Manager, expand "Application Pools"
6) Right-click on the application pool whose name was obtained in step 4, and choose "Properties"
7) In the Properties window, select the "Identity" tab
8) Under "Application pool identity", ensure that "Predefined" is selected
9) Click the dropdown for "Predefined"; select "Local System"
10) Click OK to the warning & save your changes
11) OK all the way out & restart IIS- check your app now; it should work
thanks! GlobalSection was the problem.
try
if (Debugger.IsAttached)
Thanks. That was really useful
Thanx!!!! it works!!!!!!
how can i get the images to change every secound?
I tried
buf3[4] = 1; //Delay time low byte
buf3[5] = 1; //Delay time high byte
But this seems to be about 2.5 secounds.
When using 0 its much to fast.
Thanks for your reply!
Cannot create/shadow copy 'your assembly info here' when that file already exists
add this code in Web.config in System.web section
<hostingEnvironment shadowCopyBinAssemblies="false" />
is working Thanks
Can you please tell me how to decode a md5 hash?
Thank you
greetings, Carl
removing GlobalSection + renumbering the SccProjectUniqueName1, SccProjectName1, SccLocalPath1 + setting the correct value for SccNumberOfProjects helped in my case.
The GlobalSection fix worked for us too, one of our solutions had no less than five duplicate TeamFoundationVersionControl sections!
Cheers :)
Sto attualmente sviluppando un piccolo sito in cui ho voluto sperimentare massivamente l'uso di ajax
nice job. thanks
grt solution it really worked :)
CreateAnimatedGif Overload(s):
Array of Bitmaps and Delays (allows for various images and delays)
public static void CreateAnimatedGif(System.Drawing.Bitmap[] gifFiles, int[] delays, string outputFile)
for (int i = 0; i < gifFiles.Length-1; i++)
if (i == 0)
writer.Write(GifCreator.CreateGraphicControlExtensionBlock(delays[i]));
Output to a stream? Easypeasy:
public static void CreateAnimatedGif(System.Drawing.Bitmap[] gifFiles, int[] delays, MemoryStream outputFile)
BinaryWriter writer = new BinaryWriter(outputFile);
It worked like a charm... one of the properties i was refering to was'nt static... you certainly saved some time of mine... Thx
I agree with MPM , Raghavendra & Thuktun
Attaching the code to make it work for non static methods..
ObjectHandle obj = Activator.CreateInstanceFrom(AppDomain.CurrentDomain.BaseDirectory + AssemblyName, TypeName);
MethodInfo mi = obj.Unwrap().GetType().GetMethod(WorkCall);
Type type = obj.Unwrap().GetType();
PropertyInfo pi = type.GetProperty("THE PROPERTY IN QUESTION");
object iGotIt = pi.GetValue(obj.Unwrap(), null);
Hope this helps too...
Unpleasant one.
It saved me much time. Thanks.
I believe this is a bug. I've had the same lack of success. I've even tried both the x32 and x64 version of the .net caspol.exe to set the paths from both v2 and v4. I know the .net framework configuration snap-in only is able to edit the x32 settings, so I assume there’s some issue around x64 and v4.
Previously I had the problem with VS 2008 when working with solution files stored on a network share and I was able to resolve it. I can open a solution file from a UNC location with 2008 fine, and then open the same file in 2010 produces the warning. I'll be submitting this to connect...
Great tips, thank you very much. I use it for a Windows service.
Setting validateRequest=false is not only a bad idea, it's opening you up for a script injection attack:
See this article:
www.asp.net/.../request-validation
set on aspx page validaterequeset=false
Hello!
Can you post ready to use code for create gif-animation
Add another one to the list. Thanks!
YOU CAN'T! READ THE REST OF THE POSTS!
It does not work for me
Brilliant!
Exactly what I was looking for. Thank you!
Thanks a lot!!
It is very much helpfull for me .
Avi
http://www.etechplanet.com
I also found site that can help you do gif animated graphics and other animations. Try visiting this site:
http://www.wegif.com/browse/
I changed by ProgID key from MSIDXS.1 to MSIDX and it worked for me.
Everytime I save a agif file on .NET, I can't change it to gif because the extension is hidden. Any thoughts?
Fantastic solution and it works for me!
but strangely even though i installed MOSS 2007 SP2, the bug still exists!
I guess the bug for SP1 is not fixed even though i installed SP2?
in which section i hav to add trust level?
the problem is due to html tags.
setting ValidateRequest="false" in page directive works fine.
Found this useful. Thanks for sharing.
Does any one try to test algorythms post here vs example given in wiki page : en.wikipedia.org/.../MD5
I do, and those algotythms result are all differents.
Reason ? You have to convert the string returns by yours algorythm into a hexadecimal character string.
So i found out solution, comparing with my java-algrythm. Here is my code, witch complain with wiki examples :
// First class : HEX
public class HEX
private static char[] HexChars = { '0', '1', '2', '3', '4', '5', '6',
'7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
public static String ToString(byte[] data)
StringBuilder sb = new StringBuilder(data.Length * 2);
foreach (byte b in data)
sb.Append(HexChars[((b & 0xF0) >> 4)]);
sb.Append(HexChars[(b & 0x0F)]);
return sb.ToString();
// Second class : MD5
using System.Security.Cryptography;
public class MD5
public static String Encode(String text)
return HEX.ToString(Encode(Encoding.UTF8.GetBytes(text)));
public static byte[] Encode(byte[] data)
return new MD5CryptoServiceProvider().ComputeHash(data);
Oooops, I apologizes, yours algorythms were right !
Mine is only a different one.
For licensing purposes we are researching the same topic. For Microsoft there is a registry string easily accessible within the guest OS.
Did you get a solution on this?
Thanks in advance
Wolf
Yes, It doesn't work for me
This article:
blogs.msdn.com/.../How-do-I-send-out-simple-debug-messages-to-help-with-my-debugging_3F00_.aspx
discusses what you're talking about briefly, but also offers advice on what to do if you just want to output debugging messages.
Great post! Thanks!
woow your md5 idea is really great , how did you find that name, did you invent c#. wow can you tell me how to hash that md5 so maybe i could decrypt the password and smoke it. i am a programmer i have a web site, can you tell me how i can do it. could you hold my hand while i pee, and maybe make a decrypt password functions for my hash kittys . can you email me your code, can you do it for me, i am a programmer. and i program real programs like "Hello world!", i did it all by myself from the example file. wow
I encountered this error, while I was trying to check my mapping file with VS08 .Net . When i was trying to fetch each file alone specifically or with other class named on the if statement below:
foreach (FileInfo entry in fileEntries)
if ((entry.Extension == ".xml") && (entry.FullName.IndexOf(".hbm") > 0) && (entry.Name == "Person.hbm.xml") || (entry.Name == "Department.hbm.xml"))
cfg.AddXmlFile(entry.FullName);
I fixed once by eliminate the supercalss from the page, and on the second time by using '||' as a logical joint to match the relationship inherited with that class. Hopefully, that will be useful for anyone using the same method. Thanks
hi, is it a method for VB also?
If you are using a 64-bit OS then you'll need to add these keys to the Wow6432Node. e.g.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\AssemblyFolders\GumpsBlog
Ran into this same bug today, trying to do the same thing. If you change the SelectedIndex while the list is shown (DroppedDown = true), and then the user leaves the control, causing the list to retract, the SelectedIndex reverts to what it was before the list was dropped down.
Only thing I can figure, like you, is to set DroppedDown = false, then change the SelectedIndex, then set DroppedDown = true again. But this causes some crazy flicker on each key press.
Years ago (~2005), Rick mentioned struggling with Paint.net v2 which is now v3.5, and has an Animated GIF plug-In based on this code.
The Plug-In based on this code is limited somehow in Paint.net, the results look poor due to dithering or restrictive palette conversion or ???
My question is how this code could be used to improve Paint.net's animated GIF plug-in from the results we get now?
----> same problem as saber
Thx a f'ing ton Thukton. That was it for me too. For some reason I was passing in the field name for propertyinfo.getValue instead of the object that had the data.
THANK YOU THANK YOU THANK YOU!!!
I have had this error a couple of months ago, and now my panel stopped working. This was the solution I was looking for!! THANK YOU!!!
So many hours wasted until I found this!
Added the code in the Web.config file and it works.
Thanks for your Info.
Thanks.U saved my efforts.
Hells yes it helped! I was wondering why StyleCop was telling me to make things uppercase.. Damn StyleCop, always thinking it knows best ;)
Rather than changing the doctype, I just specify the .X and .Y poperties for the popup. I'll do this in code behind if I have to (if they need to change). Also, to get the modal background working in IE, I included this in my CSS:
.modalBackground {
background-color:Gray;
opacity:0.7;
filter:alpha(opacity=70);
position: absolute !important;
the "position: absolute !important;" fixes the modal background in IE.
Pingback from Animated GIF Encoder for .NET Update
"Output to a stream?"
lol =D
hi
Thanks for placing code here...
its very helpful n in easy steps..
once again Thanks
I have the same problem and it is not working only on mysite. Same control is working on other site. Pl. advise urgently.
Nice. I wanted a converter like this. Let me test this out.
UK
Thanks it worked for me....as well...but as Simon Hodgetts said its better to clean the solution before hitting F5.
thanks a lot, that's exactly what I have been fighting with - "<>" in ListItem's name and setting no explicit value caused this exception!
Hi!
The same error occurs for me also.
I have cleaned the solution and build the solution.
Now it works fine.
Thanks ...
Thanks so much. This posting kicks ass. It helped a lot.
There were some questions on how to make the output look something like this: "aTXuyYqHUUudx0Km2bsZKlH4/WM=". I had that question too, and I figured it out.
Answer: Convert your Byte Output to a Base64String, instead of a string. In this example, simply change the last line of your code to:
"return System.Convert.ToBase64String(encodedBytes);"
Your post was super helpful! Cheers!
Rudolf:
I had the same problem as you. Here's your fix (5 years after your post LOL)
Change:
oW = (object) eType.InvokeMember("Workbooks", System.Reflection.BindingFlags.GetProperty, null, oE, null);
/*error here*/ eType.InvokeMember ("Open", System.Reflection.BindingFlags.InvokeMethod, null, oW, inputA);
To:
/*no error here*/ oW.GetType().InvokeMember ("Open", System.Reflection.BindingFlags.InvokeMethod, null, oW, inputA);
Here's a C# code snippet:
Type type = Type.GetTypeFromProgID(ProgID);
object app = Activator.CreateInstance(type, true);
app.GetType().InvokeMember("Visible", BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty, null, app, new Object[1] { true });
object acts = app.GetType().InvokeMember(Name, BindingFlags.GetProperty, null, app, null);
acts.GetType().InvokeMember("Open", BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod, null, acts, new Object[1] { filename });
--
where...
Word: ProgID="word.application" Name="Documents"
Powerpoint: ProgID="powerpoint.application" Name="Presentations"
Excel: ProgID="excel.application" Name="Workbooks"
Visio: ProgID="visio.application" Name="Documents"
Congrats dude! Enjoy the new less-busy-but-not-less-interesting ride :)
Sure do love how people put code out there and do not give you all of it.
<system.webServer>
<modules>
<add name="ThemeModule" type="Howtos.ThemeModule"/>
</modules>
</system.webServer>
line is need here too.
still doe snot work for me but I am still trying
After googling for more than an hour I hadn't found anything more than people with the same problem but no solutions. Until I came across your site.
Many thanks! it was just the Static keyword :D
thanks a lot.
Try installing this first
www.microsoft.com/.../confirmation.aspx
Does the OS have an impact on this at all? i.e. I am running Server 2008 R2 64 bit and it does not match up to a php or javascript created hash.
However I have been looking for help on this issue and I had a reply on another forum that they got the same hash as I was expecting. What gives?
I had same issue with grayed out controls. This resolved my problem. Thank you very much.
Parser Error Message: Could not load type 'WebApplication1.corp.corporate_site'.
Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="corporate-site.master.cs"
Line 2: Inherits="WebApplication1.corp.corporate_site" %>
Line 3:
what could be the error and let me know how to solve it?
Thanks!
I was pulling my hair out too. I had my LinkButtons being created inside a Repeater so didn't put IDs on them. I was getting Buttons to work properly but not LinkButtons so I didn't even think that the ID was the problem.
You saved me today! Thanks.
Or even simpler for many you can stick it into the global.asax.
protected void Application_PreRequestHandlerExecute(Object sender, EventArgs e) {
Page page = HttpContext.Current.CurrentHandler as Page;
if (page != null) {
page.PreInit += delegate {
page.Theme = DetermineTheme();
};
if it helps ... validateRequest="false" DID NOT resolve the problem for me.
I had to remove the <asp:UpdatePanel> code to figure out what the issue was!
I had a <New> as a textvalue in my dropdown which I was inserting for a blank value and that wascausing the issue. Changed this to [NEW] and everything is hunky dory! :P
You saved me tons of time. Thanks!
Thank you a lot!
Thank You
Glad to know I am not the only one that works this way. I always get the feeling I am a little bit OCD when I go collapsing all my folders and projects.
Thank you man. This is exactly what I needed. You have explained the inexplicable
This exception can also be thrown if you have session state set to one of the out-of-proc modes (state server or sql server) and you have an object in session that is not marked as [Serializable].
+1 duplicated.. thanks
it works fine if you set vaidaterequest="false".Thanks for the help.
Thank you - solved my problem too - had a custom control with RenderChildren and once the IDs were set it worked as expected.
"GlobalSection(TeamFoundationVersionControl) = preSolution" block was duplicated... removing worked a treat.
CHEERS!!!!!!!!!
Pingback from C# Animierte Gifs erstellen « Flo
I am preparing for the RUP Certification, I am looking for questions and answers. If any one can help me with study material and question paper.
My email id is advchig@yahoo.com
A G
Thanks a lot. This post helped me a lot after spending the whole day trying to debug my code.
I tried to use the solution below and work fine:
<b style="color:red">Set page directive attribute ValidateRequest="false" it will solve problem
</b>
Hey Can you change your namespace from System.Extended.UI.XXX to Sys.Extended.UI.XXX? In javascript, you use Sys instead of System. I got it working after adjusting this change. Thanks for posting this.
Nice one!!!
Thanks so much - adding an ID sorted the problem immediately!
I had this problem when using an ObjectDataSource web control in ASP.Net. I didn't want to solve it by making the method static, so I used the OnObjectCreating event to set an instance of my class for the ObjectDataSource to use in an Insert handler. I still encountered the "Object does not match target type" error - when the ObjectDataSource tried to load the class that handled the Insert, it couldn't find it. The problem turned out to be that my class was defined under my website's App_Code directory - move it out of there and all was fine.
Below a list of interesting links that I found this week: Interaction: Test Usability By Embracing Other
What a simple and clever hack. I never know about it, but I can't make this functionality work in IE and Chrome. In Firefox works. any ideas ?
Checking with Fiddler the page return code is 404, but curiously only Firefox can handle this error.
I got that exception while I tried to run InstallUtill from the VS command line propmt.
I dont get how can i handle this.
I have made my user acount as Admin(all access alowed), but it didnt helped.
could some one help?
Awesome tip. You're right - I don't think most people knew about this. I certainly didn't!
It would be really really helpful if you posted at least some of your code on this article :)
You seem to be the only one on the web to have managed to do this and I am very much interested cause I am on the verge of burning the entire SharePoint farm!!!
I get the fix, but does anyone know WHY it happens? I've got a solution that is not in Source Control (but all the projects are). I've taken all the recommended steps (unbound the source control, recreated the solution, edited the solution file), but it seems to be a recurring problem.
Andy Rocks
setting page directive attribute ValidateRequest="false" is not working in my case .. i m have deployment my application on windows server 2003 ... any help is appreciated
Guys, this issue will usually appear in custom controls that depend on Ajax and especially when you upgrade (the reason is because you have to change one line of JS code as explained below).
I upgraded from Ajax v.2 to v.4 and went through a bit of hell until I found out this thread and realized that I had to edit the JS that comes with the custom controls (source code needed) and change the last line FROM:
Tooltip.TooltipBehavior.registerClass('Tooltip.TooltipBehavior', AjaxControlToolkit.BehaviorBase);
TO:
Tooltip.TooltipBehavior.registerClass('Tooltip.TooltipBehavior', Sys.Extended.UI.BehaviorBase);
and then rebuild. The new dll is the one we'll have to copy to the bin folder of our application and then reference it in the web.config
hope that helps!
I was getting the same error. In the code behind, I had assigned the following text value to a readonly textbox
Password.Text = "<created by system>"
When I removed the "<" and ">" from the value I assigned to the textbox, I no longer received the 500 error.
I had this kind of problem. The way I solved it was by changing the class names in the code behind. Thepage causing problem was test.aspx, but the partial classes in the code behind were named test1. When I was debugging the error, I saw that the javascript was looking for a class named 'test' but it wasn't finding because there wasn't one. So I changed the names of the partial classes to 'test' and it worked.
Wow, what a time saver! Thank you so much for this post.
I have windows based dll and I am getting this in invokating another dll. What do I do in my app or dll so I do not get this error.
I am getting the same error. I have two Test Lists named UnitTests and IntegrationTests and both are not empty. But still i am getting the same error. I have even removed tests and added them again in Test Lists but the problem persists. Please let me know what exactly solved your problem
Rehan bhombal
rehan.bhombal@hotmail.com
The process cannot access the file because it is being used by another process
KUDOS to all who have suggested fixes for this! My hero of the day is Dan Davis for his suggestion. I got this error out of a RadGrid while trying to update a business object stored in Session. Temporarily switching my environment back to InProc session state mode, my app works again, so I know I simply have a property that is not serializing.
Fortunately, as Microsoft continues to integrate ASP.NET and IIS, you can implement custom HTTP handlers for other file types without tweaking IIS. This is perfect for sites running on a shared hosting account. I've just finished a short article that steps through how you can do this with ASP.NET 4.0 and IIS7 or later. You can view the article at www.blackbeltcoder.com/.../writing-a-custom-http-handler-in-asp-net.
Thanks, very good for your solution, i don't know thath the file log4net don't function on 64 bit... i could go crazy.. thank's
You will find a learning guide and a practice exam on my web site http://rup.admiraal.ws
I also spent 3 days trying to figure the problem.Unplugging my wireless mouse worked for me. thank you very much. Ah!!! the wonders of microsoft...
Thanks, I could solve my problem, after ref the content.
Good info for silverlight...thank you for the post..
I am also running into the same problem as Santhosh and Aaron mentioned. Have either of you figured a way to solve this problem or a work around?
Excellent. Got rid of the annoying message, and fixed the Pending Checkins. Top Man !
This is rubbish. Sorry! But it is.
Don't mark your methods as static. That's not your problem. Make sure you are passing the right type to the invoke. It's really no more complicated than that.
No hacking! That's how code ends up so ugly and unmaintainable.
Thank you. I spent a lot of time researching this issue until I found this page. Thanks!
good stuff, was helpful thanks! =)
For more information please read this article:
support.microsoft.com/.../841295
Be technically lazy.....
Cheers!!
Thanx
it worked for me
Thanks man!!
Hey Thanks TZAdvantage, your approch is much simpler. you r awesome. :)
thanks, simple and helpful!
Unbelievable!! Very many thanks!
yes tried validateRequest="false" and it works:D
i have use database db = DatabaseFactory.CreateDatabase("ConString");
file name tree.cs file i am getting error
thnx a lot......
it really helped me a lot
and its probbably the simplest code to do d job available online....
thnx 1ce again
If you do not give id to linkbutton it will give compilation error.. So I dont get it which id u are talking about.. I m facing same problem and not able to solve it..
help
I would like to be able to decode a MD5 hash but it is not really easy to do that. I would have thought you could reverse it but it is specifically designed to make it hard to do that. Some people seem to have cracked it but only to a certain degree.
The reason I need to decode a password is because the place I work for wants to make sure that when someone changes their password that they do not use the same one as before. Not only the same one but they want me to pull out numbers and special characters and then make sure that what is left is not the same as before.
Anyhow that is one reason why someone would want to do that. All that being said there is other ways to encrypt a password with a key and decrypt it the same way using the key.
HD5 is not the way to go for that it seems.
Executable name should be 'WcfTestClient.exe' and not 'svcTestClient.exe'.
i have md5 code ... So can i get password of facebook
Pingback from System.Security.SecurityException | devssolution
Good call! Thanks!:)
Confirm that changing AjaxControlToolkit.BehaviorBase to Sys.Extended.UI.BehaviorBase works fine for ACTK 4.1
Thanks for your solution, this problem make me crazy too.
Thanks a lot, I was rewriting a page I had previously made in VB.NET in VS2008 to C# in VS2010 when I ran into the same problem.
It didn't occur in VB in VS2008 though...
Worked for me. Thanks Rick.
Great work..! Thanks :)
Sys.Extended.UI.XXX
work fine instead of AjaxControlToolkit.XXX
Actualy u need to change the Howtos.ThemeModule to the class namespace eg. My apllication has just the ThemeModule class (outside any namespace) then i just used
<add name="ThemeModule" type="ThemeModule"/
great aricle!
Good day!
We're having the same problem as above, but with the Windows Azure environment.
Have you had something?
Thank you,
Eric Steps
Pingback from How to integrate the decryption procedure in the encrypted file? - Programmers Goodies
Thank u very much ......
oky i have the same problem But …. i have buttons when i click on it i got some image buttons …… So i creat buttons and the place holder of the image in update panel …… and every thing work fine
Than i have another button2 with wich do other stff …
one i click in the button 2 ….
i loss all the image in the my first place holder ……
What to do ??
pleace !!!
@soso
You probably have these buttons inside the same updatepanel. Because the code in Button1 is not triggered when Button2 is clicked, you lose all the controls that were rendered by the code under Button1.
The solution might be to extract the generation of all the controls into a separate method, and call this method from both the Button1 and Button2 clicked event.
Hope this helps
Pingback from » Animated GIF Encoder for .NET Update www.thinkedge.com
Thanks Kostis, followed your advice on a custom control for asp.net that used javascript, changed
AjaxControlToolkit.XXX
in one line of code, and now the control works.
Rick, thanks, I was wondering why fxcop.... now I know.
Nice to stumble upon you this way!
@Jeroen yes it is!
It's a small world after all... ;)
It is not working if you use sharepoint site.
The code seems to create a large gif, I think it is creating a large color table with each frame.
I wonder if anyone found this problem and if there might be a fix.
Awesome post.
it saved my time.
THANKS,
grock
How to Decode?
Great code, its very easy to use and faster.
Thank you Rick. Helps me a lot when integrating word automation in reporting services 2008 R2
Pingback from Animated GIF image with C# « Martin's .NET puzzle