I encountered this error while working with MongoDB Official C# Driver. This error occured when I was trying you insert some test data into a collection. Here’s the snap of error it shown Later in the course I figured out i was using BsonReprentation Attribute to decorate the Bson data type as objectId. When I … Read more
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
Introduction and GoalWith this article I’m starting a step-by-step series on how to use MongoDB with ASP.NET MVC. In the course we will go from the basic to the advanced operations of MongoDB and gradually how to use it with ASP.NET MVC. What you will learn You will learn the basics of MongoDB administration. You’ll … Read more
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
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
Error: Cannot create/shadow copy ‘DotNetOpenAuth.OAuth’ when that file already exists. How I solved it: Try to re-build the solution and it should work. It worked in my case, I’m not kidding !