background preloader

WCF

Facebook Twitter

Building Dynamic SQL In a Stored Procedure. Download source - 1.56 KB Introduction A dynamic SQL in a stored procedure is a single Transact-SQL statement or a set of statements stored in a variable and executed using a SQL command. There may be several methods of implementing this in SQL Server. This article will show you a good method of doing this. NOTE: Most importantly, the Dynamic SQL Queries in a variable are not compiled, parsed, checked for errors until they are executed. sp_executesql Vs EXECUTE Command A dynamically build Transact-SQL statements can be executed using EXECUTE Command or sp_executesql statement. The basic syntax for using EXECUTE command: EXECUTE(@SQLStatement) The basic syntax for using sp_executesql: sp_executesql [@SQLStatement],[@ParameterDefinitionList], [@ParameterValueList] Example 1.0 DECLARE @EmpID AS SMALLINTDECLARE @SQLQuery AS NVARCHAR(500) SET @EmpID = 1001 SET @SQLQuery = 'SELECT * FROM tblEmployees WHERE EmployeeID = ' + CAST(@EmpID AS NVARCHAR(10)) EXECUTE(@SQLQuery) Example 1.1 Example 2.0 History.

[ Article ] How to configure and use Microsoft Enterprise Library 5 for logging - GoNetDotNet. This post should help you in solving common questions like How to log exception using Microsoft Enterprise Library 5.0. How to configure Microsoft Enterprise Library to log exception. How to configure Microsoft Enterprise Library to log exception to rolling flat file. How to configure and use Microsoft Enterprise Library 5.0 to log exception Before getting into details lets have a short introduction to Enterprise Library. Microsoft Enterprise Library Microsoft Enterprise Library is a collection of reusable library designed to help developers with common enterprise development challenges.

Benefits of Microsoft Enterprise Library Improved productivity: Each of the Application Blocks provides several interfaces meant to satisfy common application concerns.Configuration-driven design: Many technical decisions about the application behavior can be delayed until configuration time of the application. Microsoft Enterprise Library Application Blocks How to install Microsoft Enterprise Library 5.0. How to set up a SCEP Server for use by Mobile Management Solution 7.1. Disclaimer: this article covers the basics of setting up a SCEP server for use by Mobile Management.

It is not intended as a best practice guide for every environment. Please see detailed Microsoft documentation, such as the Microsoft SCEP Implementation Whitepaper. Assuming the system is running Windows Server 2008 R2, is joined to an Active Directory domain, and the domain already has a Certificate Authority available: Recommended: Log into the server as the Domain Account you plan on configuring SCEP to use. Open the Server Manager and select Roles > Add Roles Select the Active Directory Certificate Services role, click Next, and Next again at the AD CS information page.

Unselect the Certificate Authority role service, and select Network Device Enrollment Service, click Next NDES requires IIS, so accept the defaults for installing IIS to the server. Specify the user account NDES will use, (required: add it to the local IIS_IUSRS group first), and click Next. Utilizar certificados digitales desde .NET | Programando a medianoche. Luego de mis artículos sobre certificados digitales, firma digital y hash sólo me queda escribir el último de esta serie en donde me gustaría mostrar cómo buscar, leer y utilizar estos certificados X.509 desde .NET.

Consultar los repositorios de certificados Como primer paso vamos a recorrer los certificados que tenemos instalados en nuestra máquina. Para esto debemos utilizar la clase X509Store, la cual nos da la posibilidad de consultar un repositorio de certificados, por ejemplo, el repositorio raíz (Root), el repositorio donde están los certificados de las autoridades certificantes (CertificateAuthority), o el repostorio personal (My).

También tenemos que elegir la ubicación del certificado, es decir, si vamos a querer consultar los certificados que están a nivel de máquina o de usuario. Luego de elegido el repositorio que queremos abrir debemos utilizar el método Open para que consulte al mismo. Consultar la información del certificado y sus extensiones Validar certificados. Upload files using an HttpHandler. Download source code - 12.9 KB Introduction Using an HttpHandler to upload files can be quite handy while designing multiple file uploads, large file uploads, resumable file uploads, and reporting on the progress of an upload. I’m sure there are many more uses for it.

The article does not intend on explaining the implementations of all uses of the HttpHandler in uploading files, but rather explains the code required by the HttpHandler to upload files. That being said, I have still included an example on how to upload multiple files using the HttpHandler with the help of the Jumploader Java applet in the Points of interest section.

Background After searching around and being unable to find a short, clear, and concise code snippet that could do this, I wrote my own, and would like to share it with anyone who needs it. Code anatomy I am assuming you are familiar with the use of an HttpHandler. Using the code You will then need to configure the handler in the web.config. Points of interest. Exploring the Unit Test Generator VS Extension v1.RC - Willy's Reflections. We are busy with final signing of the Unit Test Generator release candidate (RC), previously discussed in Unit Test Generator under the bonnet (hood) … aka vsarUnitTestFx ...‎ and Announcing the Unit Test Generator Visual Studio Extension BETA‎. In this post we will take a peek at some of the features to clarify some of the common questions we have been receiving from dog-fooding users. Please keep an on Visual Studio ALM + TFS Blog for the release notification for the Release Candidate (RC).

The team’s project principles Let us review our project principles: Our solution won't resurrect the old command. The good news is that with the upcoming v1 release, team achieved all six principles. Basic test generation Q1: What happens by default? Start by creating a very simple class library, containing a public class and no methods. In the ALPHA and BETA release the feature lit up and allowed you to create an empty test class. Next we add some rudimentary code to the class: … giving you: Unit Test Generator extension.

Sign in to write a review Sort by: Works exactly as described. Compatible with Resharper Does exactly what it promises, setting up the plumbing and creating one test method, or a test method for EVERY public methods of a public class. People who ever developed this plugin ,please don't call yourself a programmer. It would be really nice if it picked up on the InternalsVisibleTo setting, and allow you to create unit tests for internal classes in the project. Better than nothing. The original version would create test cases with a template call tothe method under test, AND would also allow you to create test cases (with calling stubs) for EVERY method in a class, not just one at a time. Terrible.... Who's idea was to remove from VS 2013 "Create Unit Test"? This solves nothing. VS 2013 Testing features has gone back in time 10 years.

Thanks for restoring this functionality to Visual Studio! Bull shit :(. Easy to use out of the box. by cml1 | February 01 2014 //arrange $END$ //act Excellent. Apple Push Notification certificates without the Mac Keychain | David Boike's Blog. If you want to send push notifications to an iPhone application from a .NET platform, the Mac Keychain turns out to be a major buzzkill. In order to get a .p12 file suitable for use with the apns-sharp push notifications library in the Keychain, you have to perform a complex, manual (read error-prone) procedure that gets really annoying, especially if you have many apps to provision for push notifications, as I do. Wouldn’t it be great if you could do this in C#, on Windows, without a Mac or the Keychain?

Well, you can! How the Keychain Works In order to replicate the Keychain process in C# .NET, it’s important to understand how the process works. The Keychain’s job is to manage certificates and keys for you by providing a wizard-like GUI over (likely) the OpenSSL API. We use the Keychain’s Certificate Assistant to create a Certificate Signing Request. Certificate Management with Bouncy Castle Unfortunately, the exact source code I created is the intellectual property of my employer.

Simple guide how to create APNS certificates for Push Notifications via QuickBlox iOS SDK guide. Creating an App ID Each iOS application that uses the APNs must have a unique application ID that uniquely identifies itself. In this step, you will learn how to create an App ID for push notification. Log in to the iPhone Developer Connection Portal Click on the iOS Provisioning Portal on the right of the page: You should see the welcome page.

Click on the Identifiers section to open the list with identifiers: To make a new App ID open the App IDs tab and click on the New App ID button: Enter your app name for the Description (1). You should now see the info about App ID that you have created. Generating a Certificate Request You must generate a certificate request file so that you can use it to request for a development SSL certificate later on. Launch the Keychain Access application in your Mac OS X: Select Keychain Access -> Certificate Assistant -> Request a Certificate From a Certificate Authority: Enter the information required and check the 'Saved to disk' option. A wizard will appear. Json.NET - Documentation - Table of Content. Developing WCF Restful Services with GET and POST Methods. Introduction In this article, we will see how to create WCF REST based service.

In this example, we will define two methods, GetSampleMethod (method type is GET) & PostSampleMethod (method type is POST). GET method will take input as String & returns formatted String. POST method will take input as XML (user registration) & return status string. Note: One should have basic knowledge of what is WCF, why WCF & my article will discuss HOW to use WCF with webHttpBinding. We will divide this article into the below sections: Define WCF Service Define Interface Define Class Implement POST & GET methods Define Configuration for WCF Service Service Configuration Behavior Configuration Smoke test WCF service (before client uses it) Implement client code to use WCF service Define WCF Service Open VS 2010 & Select new Project, then select WCF & select WCF Service Application & name it as WCF Rest Based.

Define Configuration for WCF Service Smoke Test WCF Service Happy coding… hope this helps!