Yearly Archives: 2011

A potentially dangerous Request.Path value was detected from the client

Posted on

I have a Odata service implementation and started getting errors where one of parameters in query has ‘:’. Solution: <system.web> <httpRuntime requestValidationMode=”2.0″ requestPathInvalidCharacters=””/> <pages validateRequest=”false”> Tweet


IOC- MEF,UNITY reading of a day

Posted on

Couple of good readings regarding MEF usage. MEF introduction article – http://www.informit.com/articles/article.aspx?p=1635818 http://brendanforster.com/mef-import-vs-importingconstructor – article describes difference between [Import] and [ImportingConstructor] attribute usage. Also describing design difference between using property setters and constructor initialization. Recomposition and constructors –http://codebetter.com/glennblock/2009/03/21/recomposition-and-constructors/ Tweet


Reseting local Windows Azure storage

Posted on

I run few days into a problem when I was not able to delete local development storage tables using Windows Azure API and system was throwing me exceptions. The reason of these exceptions I guess was the fact that table were very big. In basic scenarios resetting can be archived with Storage emulator UI.      …Continue Reading


LINQ Contains operation is not supported by Azure Table API

Posted on

  Unfortunately Azure API not supporting Contains LINQ expressions .   Contains Syntax: LINQ public static Product[] GetProducts(Guid[] prodIDs) {    return (from p in GetProducts() where prodIDs.Contains(p.ProductID) select p).ToArray<Product>(); } TSQL expression  – WHERE [t0].[ProductID] IN (@p0, @p1)’, LINQ contains syntax example has been taken from http://weblogs.asp.net/dwahlin/archive/2008/05/09/using-linq-to-perform-quot-where-in-value1-value2-quot-queries.aspx Tweet


Improving performance for Windows Azure tables

Posted on

Original article NET and ADO.NET Data Service Performance Tips for Windows Azure Tables.   Summary: Default .NET HTTP connections is set to 2 Config file: <system.net> <connectionManagement> <add address = "*" maxconnection = "48" /> </connectionManagement> </system.net> In code: ServicePointManager.DefaultConnectionLimit = 48; Turn off 100-continue (saves 1 roundtrip) Code: ServicePointManager.Expect100Continue = false; // or on   …Continue Reading


StorageClient.StorageClientException: The specified blob already exists

Posted on

Got interesting exception today while trying to upload multiple file blobs to Azure container.   private void UploadFileToBlob(string url, Asset asset,string filepath,string filename) { var container = new CloudBlobContainer(url); //Get a reference to a blob, which may or may not exist. CloudBlob blob = container.GetBlobReference(filename); blob.DeleteIfExists(); //Upload content to the blob, which will create the   …Continue Reading


Deploying MVC dependencies to Azure

Posted on

If you creating web application to be deployed to Windows Azure, you probably noticed that deployment and azure instance initialization may take a while. Any missing reference or break will cause you time and lost productivity. Few days ago I spent couple of hours trying to include all mvc references one by one making sure   …Continue Reading


ODATA WCF Data Services Friendly URLS using Routing

Posted on

When you creating your first OData WCF Data service common tasks is to give a friendly URL instead of using filename.svc as entry point.You can archive it with URL routing feature in ASP.NET MVC.Just modify your Global.asax.cs route registration block to include following lines. public static void RegisterRoutes(RouteCollection routes) { routes.Clear(); var factory = new   …Continue Reading


iPad User agent string

Posted on

Here it is: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10 You can test how you page looks like in Apple IPad by using safari browser and changing it from Safari to IPad. Google analytics also providing report to see what mobile devices your visitors   …Continue Reading


WordPress Error: Jquery is not defined

Posted on

After installing WordPress site and downloading plugins i noticed that half of admin functionality is not working. I tried to search for solutions and did some debugging and here what i found. Solution 1 (worked for me): 1. In wp-config.php insert define(‘CONCATENATE_SCRIPTS’, false ); at the beginning of file.Once you will add this your scripts   …Continue Reading