Users Pricing

forum

Home Forums Server.MapPath does not exist in currect context – MindStick

Server.MapPath does not exist in currect context

Samuel Fernandes 3693 05 Oct 2013

here's one stupid :)

Inside my project mvc4 I have namespace

prj.MVC4.Controllers 

where I'm using Server.MapPath(..) without problem

and on prj.MVC4.Models Server.MapPath(...) does not exist on current context.

I'm aware that Server.MapPath resides in System.Web and both namespace and assembly are added into class with using System.Web and System.Web.dll is added to the prj.

on ctrl + . I'm getting Microsoft.SqlServer as suggested namespace to add.

How to fix this?


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md