Failed to access IIS metabase
March 18th, 2011 by Sanket
Resolution for error: “Failed to access IIS metabase” while browsing a web site from local host on XP machine with IIS 5.1 version
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Follow following steps to resolve the issue -
1. Unregistered...Anonymous Types in Visual Basic
January 5th, 2011 by Sanket
Anonymous Types in Visual Basic
Visual Basic 2008 introduces anonymous types, which enable you to create objects without writing a class definition for the data type. Instead, the compiler generates a class for you. The class has no usable name, inherits directly from Object, and contains the properties you specify in declaring the object. Because the name of the data type is not specified, it...Microsoft Visual Studio LightSwitch – Introduction
September 1st, 2010 by Sanket
What is Microsoft Visual Studio LightSwitch?
Microsoft has finally announced the Visual Studio LightSwitch, which is featured as the newest member of the Visual Studio product family.
Microsoft Visual Studio LightSwitch gives you a simpler and faster way to create professional-quality business applications for the desktop, the web, and the cloud.
Microsoft has revealed that LightSwitch dramatically...Total instances running of application in C# .NET
August 3rd, 2010 by Sanket
Total number of instances running of application in C# .NET
Many times we needs to find how many instances of particular application or process are running.
This can be used in allowing to run only single instance of application or at most 2 etc.
Also count can be useful for licensing and other stuff.
So here is simple code to find out how many number of instances are running for particular application...Setting up Master Page at runtime in asp.net
July 21st, 2010 by Sanket
Setting up Master Page at runtime in asp.net
Many times we needs to decide master page at runtime.
Here is quick help for the same.
You will have to use ‘Page_PreInit’ method. In that set MasterPageFile attribute of current page to required master page.
And Done !
protected void Page_PreInit(object sender, EventArgs e)
{
this.Page.MasterPageFile = “~/MasterPages/” + mymaster...Custom Installer Class to create setup tasks in Visual Studio Setup Project
July 8th, 2010 by Sanket
Custom Installer Class to create setup tasks in Visual Studio Setup Project
Sometimes we have to perform custom tasks that are not there in ‘Visual Studio setup project’.
Installer Classes are great tools that you can develop and integrate with your Setup and Deployment Projects in order to perform additional tasks while running any application’s installation or un-installation process, though...Visual Studio 2010 Samples for C# 4.0
April 25th, 2010 by Sanket
Visual Studio 2010 Samples for C# 4.0
We break out the C# samples into two different categories:
Language Samples
LINQ Samples
Language Samples
The language samples familiarize you with various C# language features. They are available in the LanguageSamples folder. The C# 4.0-specific samples are called:
Named and Optional
Office Sample
Python Sample
Simple Variance
Here is the complete list...Take and Skip Partition Operator in LINQ
March 1st, 2010 by Sanket
Many times we have requirement, to fetch partial result set from collection like Arrays, DataTable.
To achieve the same we can use Take and Skip Partition Operator of LINQ.
Skip Partition Operator Reference: http://msdn.microsoft.com/en-us/library/bb358985.aspx
Take Partition Operator Reference: http://msdn.microsoft.com/en-us/library/bb503062.aspx
For this we will consider following example of Array...app.config modification issue in Windows 7
February 28th, 2010 by Sanket
File modification issue in Windows 7 for program files content
We have developed many windows application using C# or VB.NET.
In that we stored connection string and other required data in ‘app.config’ file, and we modify that file using our application to store latest connection or other information.
This is standard practice and works as well.
But in ‘Windows 7’ OS architecture is changed...Coding Standards in .NET : Naming Guidelines
February 5th, 2010 by Sanket
A comprehensive coding standard is essential for a successful product delivery. The standard helps in enforcing best practices and avoiding pitfalls, and makes knowledge dissemination across the team easier. The C# coding standard presented here is very thin on the “why” and very detailed on the “what” and the “how.” The coding standard presented next captures best practices, dos and...Standard Coding Practices in .NET
February 2nd, 2010 by Sanket
A comprehensive coding standard is essential for a successful product delivery. The standard helps in enforcing best practices and avoiding pitfalls, and makes knowledge dissemination across the team easier. The C# coding standard presented here is very thin on the “why” and very detailed on the “what” and the “how.” The coding standard presented next captures best practices, dos and...Transport level security VS message level security in WCF
January 28th, 2010 by Sanket
Transport level security VS message level security in WCF
Advantages of Transport level security
Does not need any extra coding as protocol inherent security is used.
Performance is better as we can use hardware accelerators to enhance performance.
There is lot of interoperability support and communicating clients do not need to understand WS security as it’s built in the protocol itself.
Disadvantages...WCF Security modes provided in .NET
January 27th, 2010 by Sanket
WCF Security modes provided in .NET
Across all service bindings there are five possible security modes:
None. Turns security off.
Transport. Uses transport security for mutual authentication and message protection.
Message. Uses message security for mutual authentication and message protection.
Both. Allows you to supply settings for transport and message-level security (only MSMQ supports this).
TransportWithMessageCredential....Default types of WCF bindings in .NET
January 27th, 2010 by Sanket
Default types of WCF bindings in .NET
Within the Windows Communication Foundation programming model, bindings are represented by the System.ServiceModel.Channels.Binding class. All binding classes must derive from this base class.
Following are the different bindings provided by WCF by default:
1. BasicHttpBinding
2. WSHttpBinding
3. WSDualHttpBinding
4. WSFederationHttpBinding
5. NetTcpBinding...Enable SQL encryption in ASP.NET
January 21st, 2010 by Sanket
Database Encryption is ASP.NET
If you are using the ADO.NET SQL Server managed data provider and a SqlConnection object to connect to SQL Server, then you can enable encryption by adding the encrypt=true parameter to the connection string as shown here. <configuration> <connectionStrings> <add name="MyDbConn" ...Client Credential Type in WCF
January 16th, 2010 by Sanket
Different Client Credential Type provided in WCF – Windows communication foundation
The choice of client credential type depends on the security mode in place. For transport security you can require a Windows credential or certificate-and there are variations on how Windows credentials are passed via TCP, HTTP and MSMQ. Message security supports any of the following settings for clientCredentialType:
None...Modules in IIS 7 and their functionality
January 9th, 2010 by Sanket
IIS 7.0 modules and their functionality
Following are the modules which are available in IIS 7 by default.
Module name
Description
HTTP modules
CustomErrorModule
Sends default and configured HTTP error messages when an error status code is set on a response
HttpRedirectionModule
Supports configurable redirection for HTTP requests
OptionsVerbModule...What Is Message level Security in WCF?
January 8th, 2010 by Sanket
What Is Message level Security in WCF?
Message security uses the WS-Security specification to secure messages. The specification describes enhancements to SOAP messaging to ensure confidentiality, integrity, and authentication at the SOAP message level (instead of the transport level).
In brief, message security differs from transport security by encapsulating the security credentials and claims...Get Vs Post Method
October 29th, 2009 by Sanket
Get Vs Post Method in HTML, PHP and ASP.NET
Using "get" to pass information sends the information appended to the request for the processing page. It tends to be simpler and you can troubleshoot any problems simply by looking at the address bar in your browser since all values passed are displayed there. This is also the primary weakness of this method. The data being passed is visible...
