Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

January 16, 2007

Blocking DoS attacks, maybe...

Mads / .NET Slave has posted an HttpModule for blocking DoS attacks. How does it work? Well any IP address that accesses your page more than 10 times per second gets banned for 5 minutes. All settings are configurable, for example you could ban on 15 requests per 2 seconds for 10 minutes.

I would certainly recommend that you do some testing to find a decent setting. Also some comments have come up on Mads' post wondering about more detail like: What if you're being hit by AOL's proxy server or a search engine bot? You'll have to take into account how your visitors access your website too. I will be playing around with the source and seeing how it reacts to an AJAX-enabled site as well.

kick it on DotNetKicks.com

January 03, 2007

SubSonic in WinForms or DLL

I was recently trying to get SubSonic integrated into my Business Layer DLL, which compiled with my web project, and found a great tool in the SubSonic forums. It was a bit of a nuisance to manually do this after each release but thanks to DevInstinct in the forum who has created a Custom Tool add-in for VS 2005 to allow you to use SubSonic in a DLL or EXE (You can use it in Web Application Projects and WinForms too).

This is great because now I can properly separate my Presentation Layer with my Business Layer and package SubSonic in only the Business Layer project! Scale away! This tool is great so go check it out and show support for it so we can get it added to a future SubSonic release.


P.S. I don't pay too much attention to punctuation or properly formatted paragraphs, enjoy ;-) oh and Happy New Year!

kick it on DotNetKicks.com

December 04, 2006

ASP.NET AJAX under the hood

Great article by Omar Al Zabir on some advanced tips & tricks using AJAX. Omar is the architect behind Pageflakes.com and uses ASP.NET / AJAX as the foundation. If you're using AJAX, much like I am, you will find the article very useful. It goes into batch calls, timeouts, caching, javascript tricks, and a few other items.

One thing I found very useful was how Omar implemented a "retry" feature when doing an AJAX call. This is exactly (or very close to) what I have implemented in my StickTo application. So go on and take a look. And in the near future I'll be posting some AJAX tips of my own including: displaying a progress bar without an update panel and how to use JSON de/serialization from client/server and back.

kick it on DotNetKicks.com

November 29, 2006

SubSonic - Sweet!

I've been using SubSonic: The Zero Code DAL (formerly known as actionpack) for about two months now and I LOVE IT! SubSonic is a tool that helps a website build itself. Remember how long it took to write your SQL Data Access Layer? Well SubSonic takes care of all of that for you in a real-time ORM Mapping manner and even incorporates Views and Stored Procedures too!

My favorite part of SubSonic is that since I've started using it I haven't had to write ANY Data Access Layer functions at all. SubSonic takes care of everything. I can get a DataSet in my business layer by simply calling something like:

Public Function QueryAllProducts() as DataSet
Return New Query(Tables.Products).ExecuteDataSet()
End Function

That's it!! Also looking at the code you can see: Tables.Products... Yes, everything is Strongly-Typed too, even the Stored Procedures! The project is still under development but it's certainly a strong build, a few applications have already been built using SubSonic. So certainly join the community and give SubSonic a try.



Check out the 20 minute demo webcast: http://www.wekeroad.com/actionpackintro.html

kick it on DotNetKicks.com

November 02, 2006

Choosing Between VB.NET and C#


Good article on choosing between the two languages. A lot of people look at VB.NET differently because of the older VB6. However VB.NET is just as powerful as C#, minus the ability to break out of managed code - which in a lot of cases is not recommended. Anyways, take a look at the article you'll find VB.NET is just like C# ~ And my personal opinion reflects this too. I can write C# just as well as I can VB.NET.


kick it on DotNetKicks.com