Subscribe: AppDev: Something You Should Know by Irena Kennedy
http://blogs.msdn.com/irenak/rss.aspx
Preview: AppDev: Something You Should Know by Irena Kennedy

AppDev: Something You Should Know by Irena Kennedy



Everything that is related to application development, and other cool stuff...



Last Build Date: Wed, 13 Jan 2016 08:34:42 +0000

 



SYSK 398: How to deploy .dacpac to SQL Azure from Azure block blob

Thu, 01 Dec 2016 23:43:24 +0000

Here is a quick-and-dirty (i.e. clean-up and optimize to your liking) way of doing it:   Import-Module “sqlps” -DisableNameChecking $srv = new-object Microsoft.SqlServer.Management.Smo.Server(“YOURSERVER.database.windows.net”) $conContext = $srv.ConnectionContext $conContext.LoginSecure = $FALSE $conContext.Login = “YOUR_USER” $conContext.Password = “YOUR_PASSWORD” [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SqlServer.Dac.dll”) $serverconnection = New-Object Microsoft.SqlServer.Management.Common.ServerConnection($srv.ConnectionContext.SqlConnectionObject) $serverconnection.Connect() $dacpacPath = “https://YOURNAME.blob.core.windows.net/YOURCONTAINER/YOURFILE.dacpac” $object = New-Object Net.WebClient $dpfile = $object.DownloadData($dacpacPath) $ms = New-Object IO.MemoryStream...



SYSK 397: Xamarin-Forms-Labs CalendarView control is not rendered in Win8 phone

Wed, 13 Jan 2016 08:34:42 +0000

If you downloaded XLabs open source controls from https://github.com/XLabs/Xamarin-Forms-Labs and trying to use them in a Xamarin project targeting Windows phone 8, you may be having “blank” rendering (calendar not displayed) issue – note that the space for the control is taken which can be seen by setting control’s background property.  I had this issue attempting...



SYSK 396: FxCop Rules for RESTful API

Mon, 24 Aug 2015 14:48:00 +0000

There are a few well known basic naming rules providing a consistent, understandable REST API services, e.g. The scheme and host name are not case sensitive; however, the path and query should be treated as case sensitive. Lowercase letters are preferred in URI paths.  Do use hyphens (-) between words to improve readability of URI...



SYSK 395: DataAnnotations: ConditionallyRequiredAttribute with lamda expressions

Mon, 19 Jan 2015 09:33:00 +0000

Back in 2010, Jeff Hanley published a sample of a ConditionallyRequiredAttribute that used a name of another property for runtime condition verification.  The original source can be found at http://jeffhandley.com/archive/2010/09/26/RiaServicesCustomReusableValidators.aspx.  I took the liberty to update it to support lambda expressions, allowing for more complex rules, e.g. [ConditionallyRequired(typeof(YourClass), “(x) => { return x.Prop1 == 5...



SYSK 394: Cost of getting StackTrace and finding a StackFrame

Sat, 27 Sep 2014 08:24:16 +0000

I wanted to find out the overhead of getting the stack trace and finding a specific method in the array of stack frames.  The profiled code looked like this: private static MethodBase GetCallerMethod(string caller) {     StackTrace st = new StackTrace(2);     return (from f in st.GetFrames() let m = f.GetMethod() where m.Name == caller...



SYSK 393: Error: Cannot obtain Metadata (RESOLVED)

Mon, 01 Sep 2014 08:58:46 +0000

Not all error messages are created equal, and some of them are less helpful than others.  Here is one I came across —  “Metadata contains a reference that cannot be resolved…  An exception was thrown in a call to a WSDL export extension:System.ServiceModel.Description.DataContractSerializerOperationBehavior contract…  Type ‘YourNamespace.YourClass’ cannot be serialized. Consider marking it with the DataContractAttribute...



SYSK 392: WebActivator Under The Hood post by Suhas Rao

Mon, 01 Sep 2014 08:38:19 +0000

Check out a good post by one of my coworkers — http://blogs.msdn.com/b/suhasaraos/archive/2014/08/13/webactivator-under-the-hood.aspx



SYSK 391: Entities as a data contract

Sun, 20 Jul 2014 16:56:00 +0000

There may be instances when using data transfer objects (DTO) is appropriate. For example, if you need to control the serialization details, such as which members to serialize and which not to serialize, and if you need to change the names of the serialized members, or do data contract mapping based on service version, or...



SYSK 390: String.Format vs. concatenation

Sun, 06 Jul 2014 10:39:41 +0000

Since .NET 1.0, we’ve all been told – strings are immutable, so for best performance, avoid large number of string concatenation and use StringBuilder.  Ok, but how large is “large” and what about string.Format?If you use your favorite .NET de-compiler, you’ll see that string.Format does quite a bit of work, and it would be logical...



SYSK 389: How to set ClientCredentials via Configuration file in Client

Sun, 30 Sep 2012 16:20:47 +0000

I’m working on a project where a service hosted elsewhere requires Windows authentication.  As a consultant, my computer is not on the customer’s domain, so, using my logged-on Windows credentials won’t do any good.  And, doing nothing results in the following exception:  “The caller was not authenticated by the service.” and inner exception is “The...