Getting Started With MongoDB and ASP.Net MVC4: Day 2

This article takes you a step further in getting started with MongoDB and ASP.NET series. Today, we will learn how to perform basic CRUD operations in MongoDB using Mongo Shell and a little about MongoDB C# Driver organization. The first two articles in this series are basically focused on MongoDB installation and how to use … Read more

A new guard page for stack cannot be created- ASP.NET MVC4 Error

An hour back I was working with ASP.NET and encountered with this pretty error. I kept wandering for about ten minutes what really has happened. My iisexpress.exe was automatically shut down and it didn’t work when I kept hitting CTRL+F5. How I solved it:Later i the process I came to know that I had the … Read more

How to use Server.MapPath in ASP.NET MVC 4?

You can use Server.MapPath in ASP.NET MVC 4 like this:String path = HttpContext.Current.Server.MapPath(“~/myFolder/myFile.txt”);You can use the way mentioned above but ASP.NET MVC 4 has another way to map files on server  and that is using HostingEnvironment class. Actually Server.MapPath() also internally calls HostingEnvironment.MapPath() to map the file paths on server. It belongs to the  System.Web.Hosting … Read more