{"id":1718,"date":"2014-12-16T18:57:37","date_gmt":"2014-12-16T18:57:37","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1718"},"modified":"2025-06-13T23:52:58","modified_gmt":"2025-06-14T06:52:58","slug":"net-couchbase-client-instrumentation-aspnet-and-glimpse","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/","title":{"rendered":".NET Couchbase Client Instrumentation with ASP.NET and Glimpse"},"content":{"rendered":"<p>The .NET Client Library provides detailed error information by way of its IOperationResult interface.\u00a0 To find out why a store operation failed, use <em>ExecuteStore<\/em> instead of <em>Store<\/em>.<\/p>\n<div class=\"geshifilter\">\n<div class=\"csharp geshifilter-csharp\" style=\"font-family: monospace;\">var result <span style=\"color: #008000;\">=<\/span> client<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">ExecuteStore<\/span><span style=\"color: #008000;\">(<\/span>StoreMode<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">Add<\/span>, <span style=\"color: #666666;\">&#8220;key&#8221;<\/span>, <span style=\"color: #666666;\">&#8220;value&#8221;<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\n<span style=\"color: #0600ff; font-weight: bold;\">if<\/span> <span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">!<\/span> result<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">Success<\/span><span style=\"color: #008000;\">)<\/span><br \/>\n<span style=\"color: #008000;\">{<\/span><br \/>\nConsole<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">WriteLine<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #666666;\">&#8220;Operation failed with message {0} and status code {1}&#8221;<\/span>, result<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">Message<\/span>, result<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">StatusCode<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\n<span style=\"color: #008000;\">}<\/span><\/div>\n<\/div>\n<p>While the <em>IOperationResult<\/em> value that&#8217;s returned provides status codes, caught exceptions and error messages, there are situations where detailed logging is necessary to diagnose a persistent problem.<\/p>\n<p>With the recent 1.2.2 release of the .NET Client Library for Couchbase, logging assemblies are included by default in both the <a href=\"https:\/\/nuget.org\/packages\/couchbasenetclient\">Nuget package<\/a> and the zip with the <a href=\"https:\/\/packages.couchbase.com\/clients\/net\/1.2\/Couchbase-Net-Client-1.2.2.zip\">latest binaries<\/a>.\u00a0 Out of the box, Couchbase (and its dependency Enyim.Caching) supports log4net and NLog logging.<\/p>\n<p>It&#8217;s pretty straightforward to enable logging with Couchbase, but you do need to know the basics of configuring log4net or NLog to get going.\u00a0 If you&#8217;re just starting out with Couchbase and ASP.NET, it would be useful to see logging details without having to learn another framework, even if minimal.\u00a0 Fortunately, if you&#8217;re using the diagnostics tool <a href=\"https:\/\/getglimpse.com\/\">Glimpse<\/a> in your ASP.NET application, you can turn on logging quite easily.<\/p>\n<p>If you&#8217;re not familiar with Glimpse, the common analogy is &#8220;Firebug for ASP.NET.&#8221;\u00a0 Once you install the NuGet package for Glimpse and enable the framework, you get a diagnostics window in your application that provides you with a view of the request as it was executed on the server.\u00a0 You can see your web.config settings, environment details, routes, server variables and several other aspects of your executing web application.<\/p>\n<p>Nik and Anthony, who created the open source Glimpse project (supported now by Redgate) have created a powerful extensibility model.\u00a0 Plugging into the Glimpse UI to provide instrumentation details for a library is as simple as implementing the <em>ITab<\/em> interface (or extending <em>TabBase<\/em>).<\/p>\n<p>The Enyim.Caching dependency in the Couchbase client defines <em>ILog<\/em> and <em>ILogFactory<\/em> interfaces, which when implemented may be used to provide a custom logging provider for capturing Couchbase instrumentation details.\u00a0 For my new CouchbaseLabs project Couchbase.Glimpse, I have created a new logger that will capture per-request logs and send the output to Glimpse.<\/p>\n<p>To get started, <a href=\"https:\/\/getglimpse.com\/Docs\/#download\">install and enable Glimpse<\/a>.\u00a0 Once you&#8217;ve done that, install the <a href=\"https:\/\/www.nuget.org\/packages\/CouchbaseGlimpse\">CouchbaseGlimpse<\/a> extension.\u00a0 The NuGet package will add the necessary configuration for you.\u00a0 You can also grab the source <a href=\"https:\/\/github.com\/couchbaselabs\/couchbase-glimpse\">from GitHub<\/a>.\u00a0 If you go the source code route, you&#8217;ll need to include the config section below.<\/p>\n<div class=\"geshifilter\">\n<div class=\"xml geshifilter-xml\" style=\"font-family: monospace;\"><span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&lt;configuration<span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&lt;configSections<span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&lt;sectionGroup<\/span> <span style=\"color: #000066;\">name<\/span>=<span style=\"color: #ff0000;\">&#8220;enyim.com&#8221;<\/span><span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&lt;section<\/span> <span style=\"color: #000066;\">name<\/span>=<span style=\"color: #ff0000;\">&#8220;log&#8221;<\/span> <span style=\"color: #000066;\">type<\/span>=<span style=\"color: #ff0000;\">&#8220;Enyim.Caching.Configuration.LoggerSection, Enyim.Caching&#8221;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/span><br \/>\n&#8230;<br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&lt;enyim.com<span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&lt;log<\/span> <span style=\"color: #000066;\">factory<\/span>=<span style=\"color: #ff0000;\">&#8220;Couchbase.Glimpse.Logging.GlimpseLogFactory, Couchbase.Glimpse&#8221;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900;\"><span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/span><\/div>\n<\/div>\n<p>You&#8217;ll need to enable logging to start capturing details from the client.\u00a0 Somewhere in your application, probably Application_Start, you&#8217;ll need to call the <em>Configure<\/em> method on <em>GlimpseLogger<\/em>.<\/p>\n<div class=\"geshifilter\">\n<div class=\"csharp geshifilter-csharp\" style=\"font-family: monospace;\"><\/div>\n<div class=\"csharp geshifilter-csharp\" style=\"font-family: monospace;\">var config <span style=\"color: #008000;\">=<\/span> <a href=\"https:\/\/www.google.com\/search?q=new+msdn.microsoft.com\"><span style=\"color: #008000;\">new<\/span><\/a> GlimpseLogConfiguration <span style=\"color: #008000;\">{<\/span> IsDebugEnabled <span style=\"color: #008000;\">=<\/span> <span style=\"color: #0600ff; font-weight: bold;\">true<\/span> <span style=\"color: #008000;\">}<\/span><span style=\"color: #008000;\">;<\/span><br \/>\nGlimpseLogger<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">Configure<\/span><span style=\"color: #008000;\">(<\/span>config<span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><\/div>\n<\/div>\n<p>Logging levels are cumulative, so enabling debug enables all other levels.\u00a0 You can also capture specific loggers (logs per class) by adding log names to the white list.\u00a0 The configuration below will output logs originating only in the <em>PooledSocket<\/em> and <em>ConfigHelper<\/em> classes.<\/p>\n<div class=\"geshifilter\">\n<div class=\"csharp geshifilter-csharp\" style=\"font-family: monospace;\"><\/div>\n<div class=\"csharp geshifilter-csharp\" style=\"font-family: monospace;\">var config <span style=\"color: #008000;\">=<\/span> <a href=\"https:\/\/www.google.com\/search?q=new+msdn.microsoft.com\"><span style=\"color: #008000;\">new<\/span><\/a> GlimpseLogConfiguration <span style=\"color: #008000;\">{<\/span> IsDebugEnabled <span style=\"color: #008000;\">=<\/span> <span style=\"color: #0600ff; font-weight: bold;\">true<\/span> <span style=\"color: #008000;\">}<\/span><span style=\"color: #008000;\">;<\/span><br \/>\nconfig<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">SourceWhiteList<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">AddRange<\/span><span style=\"color: #008000;\">(<\/span><a href=\"https:\/\/www.google.com\/search?q=new+msdn.microsoft.com\"><span style=\"color: #008000;\">new<\/span><\/a><span style=\"color: #008000;\">[<\/span><span style=\"color: #008000;\">]<\/span> <span style=\"color: #008000;\">{<\/span> <span style=\"color: #666666;\">&#8220;PooledSocket&#8221;<\/span>, <span style=\"color: #666666;\">&#8220;ConfigHelper&#8221;<\/span> <span style=\"color: #008000;\">}<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\nGlimpseLogger<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000ff;\">Configure<\/span><span style=\"color: #008000;\">(<\/span>config<span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><\/div>\n<\/div>\n<p>Once you&#8217;ve built your app to include the new Couchbase tab in Glimpse, navigate to a page where the Couchbase client is being used.\u00a0 You should see something similar to the screen capture below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-5305\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2014\/12\/glimpse-300x219.png\" alt=\"\" width=\"300\" height=\"219\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2014\/12\/glimpse-300x219.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2014\/12\/glimpse-768x561.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2014\/12\/glimpse-20x15.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2014\/12\/glimpse.png 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>You&#8217;ll find that when the client is first bootstrapping, it&#8217;s a bit chatty with debug logs.\u00a0 However, if you&#8217;re having a problem connecting to your cluster, there&#8217;s probably valuable information available to you, including the cluster config (which you can see as JSON in the screen capture above).<\/p>\n<p>The GlimpseLogger isn&#8217;t persisting its logs, so if you need to capture diagnostic information beyond a request, you&#8217;ll need to use log4net or NLog.<\/p>\n<p>The <a href=\"https:\/\/github.com\/couchbaselabs\/couchbase-glimpse\">GitHub repo<\/a> contains a copy of the .NET beer sample app with Glimpse enabled.\u00a0 Clone that repo and run the app to get a quick sense of how the plugin works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The .NET Client Library provides detailed error information by way of its IOperationResult interface.\u00a0 To find out why a store operation failed, use ExecuteStore instead of Store. var result = client.ExecuteStore(StoreMode.Add, &#8220;key&#8221;, &#8220;value&#8221;); if (! result.Success) { Console.WriteLine(&#8220;Operation failed with [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[10126],"tags":[],"ppma_author":[8980],"class_list":["post-1718","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-dotnet"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>.NET Couchbase Client Instrumentation with ASP.NET and Glimpse - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\".NET Couchbase Client Instrumentation with ASP.NET and Glimpse\" \/>\n<meta property=\"og:description\" content=\"The .NET Client Library provides detailed error information by way of its IOperationResult interface.\u00a0 To find out why a store operation failed, use ExecuteStore instead of Store. var result = client.ExecuteStore(StoreMode.Add, &#8220;key&#8221;, &#8220;value&#8221;); if (! result.Success) { Console.WriteLine(&#8220;Operation failed with [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-16T18:57:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T06:52:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2014\/12\/glimpse.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"584\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Zablocki, NET. SDK Developer, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Zablocki, NET. SDK Developer, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/\"},\"author\":{\"name\":\"John Zablocki, NET. SDK Developer, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/ee312fb775c13d20a32f1d455888a282\"},\"headline\":\".NET Couchbase Client Instrumentation with ASP.NET and Glimpse\",\"datePublished\":\"2014-12-16T18:57:37+00:00\",\"dateModified\":\"2025-06-14T06:52:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/\"},\"wordCount\":711,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"ASP.NET\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/\",\"name\":\".NET Couchbase Client Instrumentation with ASP.NET and Glimpse - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2014-12-16T18:57:37+00:00\",\"dateModified\":\"2025-06-14T06:52:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\".NET Couchbase Client Instrumentation with ASP.NET and Glimpse\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/ee312fb775c13d20a32f1d455888a282\",\"name\":\"John Zablocki, NET. SDK Developer, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/201925d9efc4992ce80385b76fdea34b\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g\",\"caption\":\"John Zablocki, NET. SDK Developer, Couchbase\"},\"description\":\"John Zablocki is a NET. SDK Developer at Couchbase. John is also the organizer of Beantown ALT.NET and a former adjunct at Fairfield University. You can also check out the book on Amazon named \\\"Couchbase Essentials\\\" which explains how to install and configure Couchbase Server.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/john-zablocki\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":".NET Couchbase Client Instrumentation with ASP.NET and Glimpse - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/","og_locale":"en_US","og_type":"article","og_title":".NET Couchbase Client Instrumentation with ASP.NET and Glimpse","og_description":"The .NET Client Library provides detailed error information by way of its IOperationResult interface.\u00a0 To find out why a store operation failed, use ExecuteStore instead of Store. var result = client.ExecuteStore(StoreMode.Add, &#8220;key&#8221;, &#8220;value&#8221;); if (! result.Success) { Console.WriteLine(&#8220;Operation failed with [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/","og_site_name":"The Couchbase Blog","article_published_time":"2014-12-16T18:57:37+00:00","article_modified_time":"2025-06-14T06:52:58+00:00","og_image":[{"width":800,"height":584,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2014\/12\/glimpse.png","type":"image\/png"}],"author":"John Zablocki, NET. SDK Developer, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Zablocki, NET. SDK Developer, Couchbase","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/"},"author":{"name":"John Zablocki, NET. SDK Developer, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/ee312fb775c13d20a32f1d455888a282"},"headline":".NET Couchbase Client Instrumentation with ASP.NET and Glimpse","datePublished":"2014-12-16T18:57:37+00:00","dateModified":"2025-06-14T06:52:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/"},"wordCount":711,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["ASP.NET"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/","url":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/","name":".NET Couchbase Client Instrumentation with ASP.NET and Glimpse - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2014-12-16T18:57:37+00:00","dateModified":"2025-06-14T06:52:58+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/net-couchbase-client-instrumentation-aspnet-and-glimpse\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":".NET Couchbase Client Instrumentation with ASP.NET and Glimpse"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/ee312fb775c13d20a32f1d455888a282","name":"John Zablocki, NET. SDK Developer, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/201925d9efc4992ce80385b76fdea34b","url":"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g","caption":"John Zablocki, NET. SDK Developer, Couchbase"},"description":"John Zablocki is a NET. SDK Developer at Couchbase. John is also the organizer of Beantown ALT.NET and a former adjunct at Fairfield University. You can also check out the book on Amazon named \"Couchbase Essentials\" which explains how to install and configure Couchbase Server.","url":"https:\/\/www.couchbase.com\/blog\/author\/john-zablocki\/"}]}},"authors":[{"term_id":8980,"user_id":22,"is_guest":0,"slug":"john-zablocki","display_name":"John Zablocki, NET. SDK Developer, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g","author_category":"","last_name":"Zablocki","first_name":"John","job_title":"","user_url":"","description":"John Zablocki is a NET. SDK Developer at Couchbase. John is also the organizer of Beantown ALT.NET and a former adjunct at Fairfield University.\r\nYou can also check out the book on Amazon named \"Couchbase Essentials\" which explains how to install and configure Couchbase Server."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=1718"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1718\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=1718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=1718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=1718"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}