views:

16

answers:

1

I'm writing a MVC 2.0 app with VS2010. On my Windows 7 Ultimate 64bit machine it runs fine. On my laptop (Windows 7 Home Premium, 32bit) it is getting a null reference on Server when I call MapPath.

        public ActionResult Index()
    {
        ContentModel content = new ContentModel();
        content.Content = ContentInterface.GetHtmlContent(Server.MapPath("~"), "Home");
        content.Ads = ContentInterface.GetPartialAds(Server.MapPath("~"), AdCount);
        content.Testimonials = ContentInterface.GetTestimonials();

        return View(content);
    }

I have installed MVC 2 via Webinstaller, I reregistered .Net 4 with IIS. I've confirmed IIS 6 WMI compatibility mode.

Any ideas?

A: 

Figured it out: permissions. I granted Full Control to IUSR and it works now.

Steve