Skip to main content

Process with an ID #### is not running in visual studio community edition 2015

Today I was working on a project and my team member has push the changes to repository first time and I get the latest from git. When I tried to run the project I get an error like “Process with an ID #### is not running”. It’s showing Id number different every time.

If I check the error window It showing me an error like below
“The program ‘[3148] iisexpress.exe’ has exited with code -1073741816 (0xc0000008) ‘An invalid handle was specified’.”

In browser it’s shows me message like “The webpage is not available.”

I have tried different different solutions and check but non of them fixed my issue. After googling I found some different different solution and finally 1 solution worked for me.

So let me show you how to resolve that issues in visual studio.

Solution

1. Close all the instances of VS in your PC.
2. Open folder which contains solution file for current project and delete the hidden .vs folder.
3. Again open the Visual Studio.
4. Press F5 and IIS Express should load as normal, allowing you to debug.

 

Note: As per my experience and viewing some kind of solutions over the net, it looks like by moving project from 1 PC to other PC or other environment or Different version of Visual Studio it causes the problem. So there may be some environment specific information available in the .vs folder.

Explore the Use of System.Environment Class

System.Environment class can not be inherited. It provides valuable information about current platform and environment of the system.
It uses to retrieve environment variable settings, version of the CLR and call stack contents etc.

It has various methods and property to get the useful information about current working environment. Lets have a look on some of most used properties.

Get the Machine Name
– To Get the current system’s machine name we can use MachineName property of Environment class.

For example :
Console.WriteLine(“Machine Name :” + Environment.MachineName);

Get the Current Working Directory
– To Get the current working directory we can use CurrentDirectory property of Environment class.

For example :
Console.WriteLine(“Current Directory :” + Environment.CurrentDirectory);

Get the Current UserName of the system
– To Get the current user name we can use UserName property of the Environment class.

For example :
Console.WriteLine(“User Name :” + Environment.UserName);
Get the current Operating System Version ?
– To Get teh current OS Version we can use OSVersion property of the Environment class.

For example :
Console.WriteLine(“OS Version :” + Environment.OSVersion);

See the below Full C# code.

using System;

namespace SystemEnv
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Line 1");
            Console.WriteLine(Environment.NewLine);
            Console.WriteLine("Line 2");
            Console.WriteLine("Machine Name :" + Environment.MachineName);
            Console.WriteLine("Current Directory :" + Environment.CurrentDirectory);
            Console.WriteLine("OS Version :" + Environment.OSVersion);
            Console.WriteLine("User Name :" + Environment.UserName);
            Console.Read();
        }
    }
}

What is the Difference between Build, Rebuild and Clean in Visual Studio?

If you are a Microsoft Asp.Net Developer then usually you came across this words like Build, Rebuild and Clean.

This article gives you explanation about Difference between Build, Rebuild and Clean


If you are using Visual studio you might have question that what is difference between Build, Rebuild and Clean ? here we are going to understand the diversity between them.

Build Solution :
When we build any solution then Visual studio will build/compile all assemblies (Dlls and EXE’s) that are changed, it is basically incremental or partial process in which only CHANGED assemblies are compiled if there is no changed assemblies it won’t get build

Rebuild Solution:
It is full compiled case, in which all assemblies (either changed or not) are deleted and recompiled again, irrespective of changed or not

Clean Solution:
It is not compile case, it just delete all assemblies (Dlls and EXE’s) from folder but not compiled them again, it remove all compiled files from previous build

Hope you understand this simple article