Tuesday, June 25, 2013
Monday, March 11, 2013
Get Exception details recursively
public static string GetExceptionDetailsRecursively(Exception e)
{
StringBuilder sb = new StringBuilder();
while (e != null)
{
sb.Append("Inner :");
sb.Append(e.Message);
sb.Append("\t");
e = e.InnerException;
}
return sb.ToString();
}
How to get all notes comma separated group by customer
SQL Query - How to get all notes comma separated group by customer
| NoteKey | CustomerKey | Note | LastEditedTime |
|---|---|---|---|
| 1 | 18736673 | Accout access error, Contact Technical team. | 01/02/2013 |
SELECT n1.CustomerKey, (SELECT ','+ n2.Note+ ' Last Edited Time:' + convert(varchar(26),n2.LastEditedTime)
FROM Note n2
WHERE n1.CustomerKey= n2.CustomerKey
ORDER BY CustomerKey, Note
FOR XML PATH('')) AS CustNote
FROM Note n1
Group By n1.CustomerKey
Thursday, February 14, 2013
Generate a proxy of a WCF Service
SVCUTIL.exe is the tool used to generate proxy of a WCF Service class. A simple way of creating a proxy with all default options is :
- Open Microsoft Visual Studio Command Prompt 2010.
- svcutil.exe [assembly name]- This will generate the .wsdl & .xsd files.
- svcutil *.wsdl *.xsd /language:C# - This will generate the proxy class(.cs file) and output.config file.
- Add the proxy class to your client project and copy the content of the output.config file to App.Config file.
Tuesday, December 4, 2012
Web API Sample
Web Api framework is Http based and can be accessed from broad range of clients like Browser, Mobile App etc.
REST uses some common HTTP methods to insert/delete/update/retrieve information. These Http methods are: 1.GET - Requests a specific representation of a resource 2.PUT - Creates or updates a resource with the supplied representation 3.DELETE - Deletes the specified resource 4.POST - Submits data to be processed by the identified resource
Data Type supported:
- XML
- JSON
- ATOM
My Blogs
Add BlogDelete Blog
public class BlogPost
{
public int Id {get; set;}
public string Title {get; set;}
public string Content {get; set;}
public string Labels {get; set;}
}
public namespace SampleWebApi.Controllers
{
using System.Net;
using System.Net.Http;
using System.Web.Http;
public class BlogController:ApiController
{
static List posts = new List
{
new BlogPost{ Id = 1, Title= "Web Api Framework on .NET", Content = "services exposed over plain HTTP", Labels= "" },
new BlogPost{ Id = 2, Title= "MVC4", Content= "Mobile Support", Labels= "" },
new BlogPost{ Id = 3, Title = "KnockoutJS", Content= "Javascript based MVVM framework", Labels= ""}
};
public BlogPost GetBlogPost(int id)
{
return posts.Find(m => m.Id == id);
}
public IEnumerable GetAllPosts()
{
return posts;
}
public BlogPost PostBlog(BlogPost post)
{
posts.Add(post);
return post;
}
public void PutBlog(int id, BlogPost post)
{
var blog = posts.Find(m => m.Id == id);
blog.Title = post.Title;
blog.Content = post.Content;
}
public void DeleteBlog(int id)
{
var post = posts.Find(m => m.Id == id);
posts.Remove(post);
}
}
}
Subscribe to:
Posts (Atom)
About Me
- Deba Khadanga
- Deba Khadanga has extensive rich experience in Architecture, Design and implementation of Enterprise Solutions on highly Distributed computing platforms primarily using Microsoft and Azure Cloud technologies. Nowadays, he works with Capgemini India Pvt. Ltd as Cloud Architect. His work experience also includes experience in building Cloud MS Practice capability | Azure CoE capability | pre-sales support for cloud migration and modernization | RFP, RFI response in financial domain.
You can send an email to debapkhadanga@gmail.com.
Follow
Search This Blog
Tags
- .testconfig TFS2010 (1)
- “ASP.NET_SessionId" (1)
- 503 on session expiration (1)
- Action Filter (3)
- advance knockout. ko.bindingHandlers (1)
- Ajax call (1)
- Ajax callback events (1)
- Alter SQL Table (1)
- Amplify (1)
- Amplify.Request (1)
- AppSettings (1)
- ASP.NET Ajax callback events (1)
- ASP.NET diagnostics (1)
- ASP.NET Menu (1)
- ASP.NET MVC (6)
- ASP.NET MVC Execution process (1)
- ASP.NET MVC on Azure (1)
- ASP.NET Security (1)
- ASP.NET Session Cookie (1)
- ASP.NET Session Cookie not getting clear (1)
- ASP.NET Session Cookie not getting expired when session is expired. (1)
- ASP.NET validations success or failure (1)
- assembly in incorrect format (1)
- AssemblyInitializeAttribute (1)
- Async Controller in MVC4 (1)
- Authorization in MVC (1)
- Authorize (1)
- AuthorizeAttribute (1)
- Azure Deployment (1)
- Azure Hosted Service (1)
- Azure storage emulator (1)
- best practise to use Entity Framework in ASP.NET MVC (1)
- Bind Dropdown in MVC (1)
- binding to DropDownList in asp.net mvc (1)
- Browser Back button (1)
- bugs fixed in Jquery 1.6 (1)
- caching improvements in asp.net 4.0 (1)
- change connectionstring dynamically (1)
- change Entiry Framework ConnectionString dynamically (1)
- check if form is valid in asp.net (1)
- Class Design (1)
- ClassIntializeAttribute (1)
- client id generation in asp.net (1)
- client side function call before Ajax call. (1)
- client side model binding using knockout (1)
- Client side validation using DataAnnotations (1)
- cloud-based BI (1)
- Compare 2 objects (1)
- Configration Settings Reader (1)
- ConfigrationManager (1)
- configsource in app.config (1)
- configsource in config file (1)
- configsource in web.config (1)
- Configure Code coverage in TFS2010 (1)
- Content Type change (1)
- ContentType CAML (1)
- Cound not load assembly (1)
- Crud operation using Entity Framework (1)
- CRUD operations using RESTFul WCF Service (1)
- Custom Logging in Workflows (1)
- Custom Validation (1)
- Custom Validation in ASP.NET MVC (1)
- Custom Validation using IValidatableObject (1)
- data annotations in Ajax calls (1)
- DataAnnotations (1)
- DataAnnotations in Ajax Calls (1)
- datatable (1)
- DbEntityValidationException (1)
- Debug Helper component (1)
- Default Web Site down (1)
- Derived Class Serialization (1)
- Design Pattern (1)
- Diagnostics in Workflow Foundation 4 (1)
- Diagnostics tool (1)
- Dictionary to Enumberable of SelectListItem in asp.net mvc (1)
- Display modes in MVC4 (1)
- edit connection string dynamically (1)
- Edit Footer of Word Document (1)
- Edit Header of Word Document (1)
- EF (1)
- EF 4.0 (1)
- EF 4.1 DB First (1)
- elevated privilege (1)
- Elmah (1)
- Enable 32 bit Application mode in IIS7 (1)
- Entity Framework Exception (1)
- EntityConnectionStringBuilder (1)
- Exception Handling (1)
- Extension methods (1)
- Feature Activation (1)
- file upload in asp.net MVC (1)
- Generic class (1)
- GenericPrincipal (1)
- Grid in mvc (1)
- grid jquery (1)
- HandleError (1)
- Handling Session Timeout in Ajax Calls (1)
- Highlight rows in JqGrid (1)
- Highlighting rows in JqGrid based on some column value (1)
- History.js (1)
- Hosted Service (1)
- HTML Status Codes (1)
- HTML5 (1)
- HTML5 project template (1)
- HTTP Error 503 (1)
- HTTPS (2)
- IEnumerable Extensions (1)
- IEqualityComparer in C# (1)
- IIS (1)
- impersonation (1)
- importing from CSV in C# (1)
- inline editing grid (1)
- Insert update delete using EF 4.1 in n-Tier Web Application (1)
- Installing SPJob (1)
- Javascript framework (1)
- Javascript knockout (1)
- Javascript patterns (1)
- javascript prototype (1)
- Jet OLEDB Provider (1)
- jqgrid (1)
- jqgrid and datatable comparision (1)
- JqGrid row highlighting (1)
- jquery grid (1)
- Jquery notification (1)
- Jquery Plug-in Scrollable (1)
- Json (1)
- JsonResultWrapper (1)
- Knockout 2.0.0 (1)
- knockout custom binding handler (1)
- KnownType (1)
- Masking SSN (1)
- Mega menu (1)
- Method with generic in vb.net (1)
- MVC 3 ValidationAttribute (1)
- MVC 4 developer preview (1)
- MVC 4 features (1)
- MVC 4 for Mobile Application (1)
- mvc ajax client validation (1)
- MVC Best Practices (1)
- MVC Security (1)
- MVC way of routing in asp.net (1)
- MVC3 tools update (1)
- MVC4 (1)
- MVC4 tablet browsers (1)
- new features in ASP.NET 4.0 (1)
- new features in EF5.0 (1)
- new features in Jquery 1.6 (1)
- new features in SQL Azure CTP (1)
- Observer design pattern. (1)
- open XML (1)
- ORM (1)
- OutputCache (1)
- Overlay (1)
- package application of Azure (1)
- Page_ClientValidate (1)
- PageRequestManager class (1)
- People Picker control (1)
- PeopleEditor (1)
- Performance improvement in EF5.0 (1)
- pnotify (1)
- Polymorphism (1)
- Project Management Tips (1)
- Publishing (1)
- QueryString update in jquery (1)
- RAZOR (1)
- reading .CSV file in C# (1)
- RedirectPermanent (1)
- Regular Expression (1)
- reports (1)
- reports in MVC (1)
- reportviewer control (1)
- ReportViewer control in ASP.NET MVC (1)
- RequireHttpsAttribute (1)
- REST Service (1)
- RESTFul Service (1)
- Role Management (1)
- Rule Engine (1)
- self-provision a SQL Azure (1)
- separate file for a ConfigurationSection (1)
- Serialization (1)
- Session Expiration (1)
- Session expiration on client side (1)
- session timeout clientside (1)
- SharePoint - User Profile Information (1)
- SiteMap Provider (1)
- Solution Store (1)
- SPContentType.Update() (1)
- SPUserToken (1)
- SQL Azure (1)
- SQL Azure Data Sync (1)
- SQL Azure disadvantages (1)
- SQL Azure Reporting Services (1)
- SQL on Azure advantage disadvantages (1)
- SQL Server Managment Studio Find & Replace dialog (1)
- SQL Server Query (1)
- SqlConnectionStringBuilder (1)
- SQLTrackingParticipant in WF4 (1)
- SSRS Reports (1)
- SSRS reports in MVC (1)
- storing file in DB (1)
- System.IO.Packing API (1)
- tablesorter (1)
- tabs (1)
- Telerik MVC Extensions review (1)
- Test Setting window in TFS 2010 (1)
- TestInitializedAttribute (1)
- TestMethodAttribute (1)
- Trace and Assert (1)
- Type of SharePoint Users (1)
- Unit Test (1)
- Unit Test Attributes (1)
- updating an entiry in EF (1)
- upload file in asp.net MVC (1)
- using Jet provider in IIS 7 in 64 bit CPU mode (1)
- Validation Errors (1)
- validation technique in MVC3 (1)
- Validations in ajax based mvc application (1)
- Visual Studio Test (1)
- VS 2010 features (1)
- WCF (1)
- WCF Publish (1)
- WCF Publish using IIS (1)
- Web Api (1)
- Web Role (1)
- web.config in asp.net 4.0 (1)
- Web.Config transformation; environment specific config file (1)
- webgrid (1)
- WebPI (1)
- window dialog (1)
- Windows Authentication (1)
- Workflow Foundation 4 (1)
- WSP (1)
My Blog List
References
- Free email sending for Azure Customer
- WordPress
- SEO Techniques
- Unit Test Razor Views
- PreCompile Razor Views
- MVC Mini Profiler
- Attribute based route mapping
- Custom Field
- Jquery 1.6 released
- Web API - for HTTP what MVC is for HTML
- WCF Web API-Preview 4
- Blog - Steve M.
- Hansellminutes
- Channel 9
- MIX 2011
- WCF Web Api
- Your Regular Expression Buddy
- Regular Expression Editor
- Create Guid
- Encode/Decode HTML
