C#

RSS Subscribe

Windows service on local computer started and then stopped

Posted on September 28, 2018 by Suresh Kamrushi in C#, Windows

+30 I am getting below error while running windows service: The “my service name” service on Local Computer started and then stopped. Some services stop …

Installing Windows Services using command prompt

Posted on September 26, 2018 by Suresh Kamrushi in C#, Windows

+20 In this post, I am sharing how you can install or uninstall windows services in your local windows system [Windows 10]. Assuming you already …

Could not load file or assembly System.Web.Http.WebHost

Posted on September 17, 2018 by Suresh Kamrushi in C#

+20 After deploying to IIS server from Visual Studio getting below error, Could not load file or assembly ‘System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35’ or one of its …

How to format cell using EPPlus package in C# MVC

Posted on September 4, 2018 by Suresh Kamrushi in C#

+10 EPPlus is a great package used in C# to export and import excel files. Here I am sharing how we can format data while …

Reading excel file using EPPlus package

Posted on August 22, 2018 by Suresh Kamrushi in C#

+30 Here I am sharing how you can read excel file using EPPlus package. Many solution given on internet but nothing work for me, so …

How to read data from excel sheet and insert into database table in C#

Posted on August 22, 2018 by Suresh Kamrushi in C#

+30 Reading excel file using EPPlus package and inserting into table is very easy in C# MVC framework. Here I have created a simple method …

Generating and Formatting excelsheet in c# using EPPlus

Posted on August 13, 2018 by Suresh Kamrushi in C#, SQL Server

+50 Getting data from database in DataTable format and then generating Excel sheet and formatting it using EPPlus is very easy in C# MVC. Here …

Starting windows services from C# MVC 4

Posted on July 6, 2018 by Suresh Kamrushi in C#, Windows

+20 Sometime you need to start/stop windows services from your C# MVC application. Here i am sharing how you can do that: 1) To access …

The type or namespace name ‘ServiceController’ could not be found

Posted on July 6, 2018 by Suresh Kamrushi in C#, Windows

+20 May times you need to add namespaces to your application, here I sharing how you can add “System.ServiceProcess” required to incorporate windows services to …

Visual Studio not loading few files and folder in Solution Explorer

Posted on May 30, 2018 by Suresh Kamrushi in C#

+10 I am building a project in C# MVC4 using Microsoft Visual Studio 2012 and getting this issue. Whenever i add or delete any project …

How to read an Excel file using C# MVC 4

Posted on April 19, 2018 by Suresh Kamrushi in C#

+2-1 Reading Excel file using C# MVC 4 is very easy. Here I am sharing the code how you can read cell by cell in …

ASP.net MVC 4 Razor File Uploading

Posted on April 6, 2018 by Suresh Kamrushi in C#

+50 Sharing simple and basic code using which we can easily upload a single file to the server. You can add validation before you move …

Export CSV file using C# MVC

Posted on April 6, 2018 by Suresh Kamrushi in C#

+30 Sharing here how you can export CSV file on runtime using C# MVC 4.5. In below code I am executing query to get data …

ASP. net MVC 4 – You do not have permission to use the bulk load statement.

Posted on April 6, 2018 by Suresh Kamrushi in C#

+10 When trying to execute store procedure having bulk insert, getting error as “You do not have permission to use the bulk load statement.” Error …

Sending emails with attachment in asp.net MVC 4

Posted on March 20, 2018 by Suresh Kamrushi in C#

+40 Here I am sharing how you can send email with attachment using C# MVC 4. Before you copy and paste the code you need …

How to deploy asp.net application in IIS server

Posted on December 26, 2017 by Suresh Kamrushi in C#

+40 I am developing C# MVC 4.0 project in Visual Studio and it is working good. Now I want to test my application in IIS …