Category: VS2015

  • How to use CLR function at SQL Server?

    Creating a CLR function in SQL Server involves the following steps: 1. Define the function as a static method of a class in a language supported by the .NET Framework 2. Register the assembly in SQL Server by using the CREATE ASSEMBLY statement 3. Create the function that references the registered assembly by using the…

  • How to enable “Windows Authentication” for your websites?

    There are few things which we need to do before access the website using windows authentication. Web.config: Add or replace existing Authentication Tag IIS Express with Visual Studio: Click on your project in the Solution Explorer to select the project. Open Properties pane suing F4. In the Properties pane for your project: a) Set “Anonymous…

  • How to Create Multiple SQL Server Instances on Same Server

    When you install SQL Server, the installation creates an instance (DEFAULT OR SQLEXPRESS) of SQL Server. In my case I have created instanace named DEVSQL. Some times we do need to create multiple instances based on requirements. To create more instances, start the setup again. The following screen appears when setup starts for the SQL…

  • SQL Server – List all the Constraints by Table or by Column Name

    List all Constraints of the Database: [sql]SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS OR SELECT OBJECT_NAME(object_id) AS ConstraintName, SCHEMA_NAME(schema_id) AS SchemaName, type_desc AS ConstraintType FROM sys.objects WHERE type_desc LIKE ‘%CONSTRAINT'[/sql] List Constraints¬† on table column: [sql] Select SysObjects.[Name] As [Contraint Name] ,Tab.[Name] as [Table Name],Col.[Name] As [Column Name] From SysObjects Inner Join (Select [Name],[ID] From SysObjects Where XType…

  • how to remove helper warnings at visual studio mvc view page

    While working on MVC project we can get warnings in the MVC view/ partial view / layout page. The name ‘ViewBag’ does not exist in the current context ‘System.Web.WebPages.Html.HtmlHelper’ does not contain a definition for ‘ActionLink’ … ‘System.Web.WebPages.Html.HtmlHelper’ does not contain a definition for ‘AntiForgeryToken’ … These are due to wrong version in the config…

  • JSON date to Date object – javascript

    While working with web services or API with json return, we will get date values in different format, we can’t use this as is where required. To convert to date object we need to extract integer value and then pass to Date object, below example shows how to get valid date object. [javascript] var json…

  • Debugging VS2013/VS2015 Websites Using 64-bit IIS Express

    If you are working on ASP.NET MVC web sites in Visual Studio 2013 (VS2013) or 2015 (VS2015), and want to debug 64bit application, you need to do following changes in Visual Studio. f you don?t do this, you will likely get a message similar to: ?Could not load file or assembly or one of its…