Recently we were stumped with the following error while working on an Azure project Error 1 The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. C:Program FilesMSBuildMicrosoftCloud Service1.0Visual Studio 10.0Microsoft.CloudService.targets 202 5 OrderManagement […]
Category Archives: Bulb Flash
Bulb Flash:-SQL Azure tip; Firewall rules: allow all incoming IPs during testing and Development!
Before we even show you how , do note that this should be done only during testing of non-critical data which will cause no issues if accessed from unintended applications.. SQL Azure tracks the IP address for the purpose of security . However sometimes during development( and co-development) when you don’t have a static IP, […]
Bulb Flash:- Some practical WPF MVVMLight tips!
One of our major projects recently used WPF 4.0 with MVVM pattern.We used the MVVM Light Toolkit for implementing the MVVM Pattern. The MVVM Light Toolkit definitely has a lot to offer to make your life easier but the documentation is not exemplary! Few things we learnt down the road as we came to a […]
EF 4.0 Bulb Flash!:- Load only what you need!!
A small tip for those working with Entity Framework 4.0:- We all know the concept of Lazy Loading in the Entity Framework: With lazy loading enabled, related objects are loaded when they are accessed through a navigation property. With lazy loading a drawback is that an object retrieved from the database comes loaded with all […]
Bulb Flash:-Returning Complex objects from Stored Procedures in Entity Framework!
Sometimes when using the Entity Framework we decide to encapsulate a complicated piece of SQL into a stored procedure and call it directly from your code. But how to you extract the result of the Stored Proc if it returns a combination of columns from different tables? Consider the following Stored Proc which returns a […]
Commanding within DataTemplates in MVVM!
A quick post about setting commands within DataTemplates when using the MVVM pattern! When you are inside a DataTemplate the DataContext is changed to the the current item, so to access the command you will need to use the “relative source” Something like <Button Content=”Delete” Width=”Auto” Command=”{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}}” CommandParameter=”{Binding}”> Hope this […]
Improving WPF/Silverlight- WCF Communication!
While working on a recent assignment related to establishing and optimizing duplex communication with Silverlight and WCF,we learnt quite a lot of new concepts like HttpPollingDuplex binding with multiple messages mode Http Long Polling designs etc. While most of these concepts were new we did get a bulb flash on how to improve basic WPF/Silverlight […]
Bulb Flash:- Setting a Dangerous Cookie on the Browser!!
During a recent assignment we were trying to set an xml string in the browser cookie. The string actually being a security token had a combination of signatures and unicode characters which the browser did not seem to like too much:-) So after we set the cookie,every time i would browse the solution i was […]
Bulb Flash: Update Configuration without restarting your webrole
Recently started working on an azure project where we frequently updated a setting in our Service configuration file. Only every time we did that our web role got restarted… Then came across this event which can be hooked on to decide if the webrole should be restarted or not. RoleEnvironment.Changing += RoleEnvironmentChanging; RoleEnvironment.Changed += RoleEnvironmentChanged; […]
Bulb Flash: Foreign key objects from WCF service not propagated to Silverlight client!
Consider the case :- WCF uses LINQ to SQL to connect to a DB with extensive foreign key relationships. You set Serialization Mode= Unidirectional to ensure all the relationships and DB objects can be propagated to the client as datacontracts Silverlight client connects to the WCF service. In many of the cases(i could not come […]