oazabir

Stories submitted by oazabir

Prevent ASP.NET cookies from being sent on every css, js, img request(omaralzabir.com)

submitted by oazabiroazabir(1790) 3 months, 28 days ago

ASP.NET generates some large cookies if you are using ASP.NET membership provider. Especially if you are using the Anonymous provider, then a typical site will send 517 bytes of cookie on every css, js, image request. That's 60 GB worth useless upload for 1M page view. See how to prevent this. read more...

2 comments |category: |Views: 29

tags: another

Tweaking WCF to build highly scalable async REST API(www.codeproject.com)

submitted by oazabiroazabir(1790) 6 months, 12 days ago

You can build async REST API using WCF but due to some bug in WCF implementation it does not scale as you would want it to. Here's my journey with Microsoft's WCF team to explore the problem and find the right fix. read more...

add a comment |category: |Views: 3

tags: another

Build truly RESTful API and website using same ASP.NET MVC code(www.codeproject.com)

submitted by oazabiroazabir(1790) 6 months, 14 days ago

Usually we create separate controllers or WCF service layer to deal with API part of the website but I will show you how you can create both RESTful website and API using the same controller code working over the exact same URL that a browser can use to browse through the website and a client application can do CRUD over. read more...

add a comment |category: |Views: 4

tags: another

Automatic JS, CSS versioning to force update browser cache(omaralzabir.com)

submitted by oazabiroazabir(1790) 8 months, 14 days ago

When you update javascript or css files that are already cached in users’ browsers, most likely many users won’t get that for some time because of the caching at the browser or intermediate proxy(s). You need some way to force browser and proxy(s) to download latest files. Here's an HttpFilter that will automatically generate new URL for changed files. read more...

add a comment |category: |Views: 28

tags: another

WCF does not support compression out of the box, so fix it(omaralzabir.com)

submitted by oazabiroazabir(1790) 11 months, 17 days ago

WCF does not support compression over IIS. Even IIS does not support compression of SOAP messages by default. Learn how to fix both. read more...

add a comment |category: |Views: 1

tags: another

Safely deploying changes to production server(omaralzabir.com)

submitted by oazabiroazabir(1790) 11 months, 18 days ago

When you deploy incremental changes on a production server, which is running and live all the time, you some times see error messages like “Compiler Error Message: The Type ‘XXX’ exists in both…”. Sometimes you find Application_Start event not firing although you shipped a new class, dll or web.config. Sometimes you find static variables not getting initialized and so on. There are so many weird things happen on webservers when you incrementally deploy changes to the server and the server has been up and running for several weeks. Learn how to safely deploy and automate server restart, cleanup, start, warmup procedures. read more...

add a comment |category: |Views: 4

tags: another

Quick ways to boost performance and scalability of ASP.NET, WCF and De(omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 2 months ago

By tweaking system.net changes, you can increase the number of parallel calls that can be made from the services hosted on your servers as well as on desktop computers and thus increase scalability. By changing WCF throttling config you can increase number of simultaneous calls WCF can accept and thus make most use of your hardware power. By changing ASP.NET process model, you can increase number of concurrent requests that can be served by your website. And finally by turning on IIS caching and dynamic compression, you can dramatically increase the page download speed on browsers and and overall responsiveness of your applications. read more...

add a comment |category: |Views: 8

tags: another

Dynamically set WCF Endpoint in Silverlight(omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 2 months ago

When you add a WCF service reference to a Silverlight Application, it generates the ServiceReference.ClientConfig file where the URL of the WCF endpoint is defined. When you add the WCF service reference on a development computer, the endpoint URL is on localhost. But when you deploy the Silverlight client and the WCF service on a production server, the endpoint URL no longer is on localhost instead on some domain. As a result, the Silverlight application fails to call the WCF services. You have to manually change the endpoint URL on the Silverlight config file to match the production URL before deploying live. See how to automate this. read more...

add a comment |category: |Views: 30

tags: another

Ten Caching mistakes that break your app(omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 4 months ago

Caching frequently used objects, that are expensive to fetch from the source, makes application perform faster under high load. It helps scale an application under concurrent requests. But some hard to notice mistakes can lead the application to suffer under high load, let alone making it perform better, especially when you are using distributed caching where there’s separate cache server or cache application that stores the items. Moreover, code that works fine using in-memory cache can fail when the cache is made out-of-process. Here I will show you some common distributed caching mistakes that will help you make better decision when to cache and when not to cache. read more...

add a comment |category: |Views: 189

tags: another

How to make screencasts in animated GIF for free(omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 4 months ago

I have been using animated GIFs to show short screencasts in my blogs and articles. Animated GIF is supported by all browsers and supports virtually any website in the world where even Flash is blocked. A picture is worth a thousand words, and an animation is worth a thousand multiplied by [frames in animation] words. So, I have been looking for a complete free solution to capturing screencasts and then converting it to animated GIF and then heavily compressing it. read more...

add a comment |category: |Views: 3

tags: another

Building High Performance Queue in Database for Orders, Tasks, ...(omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 4 months ago

Queue is a widely used data structure that sometimes have to be created in a database instead of using specialized queue technologies like MSMQ. Running a high performance and highly scalable queue using database technologies is a big challenge and it’s hard to maintain when the queue starts to get millions of rows queued and dequeued per day. Let me show you some common design mistakes made in designing Queue-like tables and how to get maximum performance and scalability from a queue implemented using simple database features. read more...

add a comment |category: |Views: 31

tags: another

Exporting normalized relational data from database to flat file(omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 5 months ago

Sometimes you need to export relational normalized data into flat files where a single row comes from various tables. For example, say you want to export all customer records along with their work and home address, and primary phone number in a single row. But the address and contact information are coming from different tables and there can be multiple rows in those table for a single customer. Sometimes there can be no row available in address/phone table for a customer. In such a case, neither INNER JOIN, nor LEFT JOIN/OUTER JOIN will work. How do you do it? Solution is to use OUTER APPLY. read more...

add a comment |category: |Views: 6

tags: another

Website diagnostic page to diagnose your ASP.NET app(omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 5 months ago

Whenever you change web.config file or deploy your website on a new environment, you have to try out many relevant features to confirm if the configuration changes or the environment is correct. Sometimes you have to run a smoke test on the website to confirm if the site is running fine. Moreover, if some external database, webservice or network connectivity is down, it takes time to nail down exactly where the problem is. Having a self-diagnostics page on your website like the one you see on your printer can help identify exactly where’s the problem. Here’s a way how you can quickly create a simple self-diagnostics page in a single page without spending too much effort. This diagnostics page tests for common configuration settings like connection string, ASP.NET Membership configurations, SMTP settings, <appSettings> file paths and URLs items and some application specific settings to confirm if the changes are all correct. read more...

add a comment |category: |Views: 10

tags: another

WatiN to automate browser and test complex AJAX websites(www.codeproject.com)

submitted by oazabiroazabir(1790) 1 year, 6 months ago

WatiN is a great .NET library for writing automated browser based tests that uses real browser to go to websites, perform actions and check for browser output. Combined with a unit test library like xUnit, you can use WatiN to perform automated regression tests on your websites and save many hours of manual testing every release. Moreover, WatiN can be used to stress test Javascripts on the page as it can push the browser to perform operations repeatedly and measure how long it takes for Javascripts to run. Thus you can test your Javascripts for performance, rendering speed of your website and ensure the overall presentation is fast and smooth for users. read more...

add a comment |category: |Views: 61

tags: another

Munq is for Web, Unity is for Enterprise(omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 8 months ago

The Unity Application Block (Unity) is a lightweight extensible dependency injection container with support for constructor, property, and method call injection. It’s a great library for facilitating Inversion of Control and the recent version supports AOP as well. However, when it comes to performance, it’s CPU hungry. In fact it’s so CPU hungry that it makes it impossible to make it work at Internet Scale. Thus comes Munq, a super fast Container for the web. read more...

add a comment |category: |Views: 14

tags: another

Finally! Entity Framework 100% Unit Testable and N-tier capable (omaralzabir.com)

submitted by oazabiroazabir(1790) 1 year, 8 months ago

Learn how I have produced a 100% unit testable fully n-tier compliant data access layer following the repository pattern using Entity Framework solving all the "gotchas" out there. read more...

add a comment |category: |Views: 15

tags: another