Monday

Fix SQL Error : SQL Server Error 25 And 87

Introduction

Error SQL Server Error 25 And 87 is very known error while connecting through MS SQL Management Studio. SQL Server Error 25 And 87 comes out commonly when we type wrong host name instead of correct host name (server name). I have already provided resolution in my earlier article SQL error of Could not open a connection to SQL Server and Login failed for user iis apppool default apppool. I have provided main key factors how we can resolve this issue through given below steps.

Error Description

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid) (Microsoft SQL Server, Error: 87).

  1. Check your login Authentication whether its Windows or SQL Server.
  2. If you are using local MS sql database then you can use (.) (dot) instead of complete server name.
  3. Enter your correct host name: (hostname\SQLEXPRESS) my_hostname\SQLEXPRESS (in case of SQL Server Express) or (my_hostname\mssqlserver).
  4. You can also try localhost slash (\) then host name, here is sample as (localhost\SQLEXPRESS) or (localhost\mssqlserver).

Authentication Windows or SQL Server
Fig 1: Authentication Windows or SQL-Server
SQL Authentication using dot
Fig 2: SQL-Authentication using dot
Authentication Windows or SQL Server
Fig 3: Use localhost in server-name

Conclusion

Explained all primitive steps to resolve very known SQL Server Error 25 And 87. You may go one by one steps provided to resolve this issue so that take over from this SQL error.

Relevant Reading

Saturday

Publish APP: Copying file failed in publish using Visual Studio

Introduction

I have already written few articles on how to publish web application in IIS using visual studio. Today, I am writing about very common issue Copying file failed in publish using Visual Studio, it comes issue while deleted files remained in visual studio solution. I have demonstrated below how to get rid of this issue.

Jquery Magnifier: How to develop image magnifier using mvc

Introduction

Jquery Image Magnifier is widely used in our web/Mobile app to view product images in all angles. Jquery Image Magnifier is used often in eCommerce website where end use can view minutely product image before to place order online. Here, Jquery magnifier is using in ASP.Net MVC App.

Include Two Style sheets files

CSS files are very important to enable Jquery magnifier using MVC application (Need to add stylesheet (demo.css, jQuery.MagnifierRentgen.min.css)).


Include Three JS File to Client Side Magnifier Effect

Here adding three java script file reference (online Jquery reference (jquery-1.11.3.min.js) & other two offline (jQuery.MagnifierRentgen.min.js, demo.js))
    
    
    

Razor View (CSHTML Page)

Razor View (CSHTML Page)
@{
    ViewBag.Title = "Magnifier";

    
    
}


    

JQuery Magnifier

_Layout Razor View (App Layout default settings)

Here showing Layout Master Razor view code


    
    
    @ViewBag.Title
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")


    @RenderBody()

    @RenderSection("scripts", required: false)


Image Magnifier Output View First

Image Magnifier using MVC

Image Magnifier Output View Second

Image Magnifier using MVC

Conclusion

Jquery Image Magnifier can trust and motivated to buy product online through eCommerce website (marketplace). In this article, I have explained all steps to how can we zoom in, zoom out the image to give a very close look of the product image. This is very brilliant feature (Jquery Magnifier) in our eCommerce website.

Download Example

Download

Relevant Reading

Thursday

JQuery: Show Hide div on radio button using Jquery

Introduction

Today, Explaining about how to show hide HTML Div on radio button click containing input box on radio button click. This particular requirement arise whenever we are asking questions or confirming something on that basis we have to show and hide html controls under div, I have explained here in with great deal.

Show Hide div on radio button using Jquery

Tuesday

Fix GDI: A generic error occurred in GDI in MVC Application

Introduction

Providing solution to very common issue "A generic error occurred in GDI+." while working with ASP.Net MVC C# application. In this application, I was writing code to save image in Png format. Sometimes, we don't have any exact idea about issue, then we can wastage our precious development time, to overcome this issue, I come up here with to resolve this issue.  

Monday

Fix Error: Could not load file or assembly 'Antlr3.Runtime (1)' or one of its dependencies

Introduction

Today, I am going to explain a MVC application error while our application is interrupted or closed properly. This might be arise a major issue in our build causes delay to deploy our MVC app.

Error Description

Could not load file or assembly 'Antlr3.Runtime (1)' or one of its dependencies

Reasons

This issue comes when our power failure and resulted into our application is not closed down properly.
Could not load file or assembly 'Antlr3.Runtime (1)' or one of its dependencies

Figure: Could not load file or assembly

Step 1

Press Windows + Run and then type %temp%

Step 2

Now delete all temporaries files located at your machine C:\Users\user1\AppData\Local\Temp,

Using with above 2 steps helped me to resolve issue Could not load file or assembly 'Antlr3.Runtime (1)' or one of its dependencies while working on MVC application.

Conclusion

I have explained MVC error Could not load file or assembly 'Antlr3.Runtime (1)' or one of its dependencies, how it comes, reasons behind it and provided all necessary steps to resolve issue Could not load file or assembly 'Antlr3.Runtime (1)' or one of its dependencies. Relevant MVC Fixes

Suggested Reading

Saturday

MVC Razor View: Unexpected if keyword after @ character in MVC Razor View

Introduction

I am going to explain a very popular error i.e Unexpected "if" keyword after "@" character while working with ASP.Net MVC Razor View, I am sharing all aspects of this error Unexpected "if" keyword after "@" character.

Error Detail:

Unexpected "if" keyword after "@" character.  Once inside code, you do not need to prefix constructs like "if" with "@".
When Error "Unexpected "if" keyword after "@" character" comes off
Working on MVC project and working on MVC Razor view, meanwhile a problem faced me whenever using foreach statement in MVC Razor View Engine. I was using nested statement to write some logic. I have been shared my both preview of code 1) Wrong statement and 2) corrected statement which is showing below.

Unexpected if keyword after character in MVC Razor View

Wrong Statement

@foreach (var item in Model)
{
    @if (item.isCorrect)
    {
           // do something
    }
}

Correct Statement

@foreach (var item in Model)
{
    if (item.isCorrect)
    {
           // do something
    }
}

Conclusion 

Explained above, how can we use nested loop in Razor view, in this article, fully explained how can we remove issue of nested loop Unexpected if keyword after @ character.

Suggested Reading