MapPath not working with ASP.NET MVC
- From: shapper <mdmoura@xxxxxxxxx>
- Date: Mon, 21 Jul 2008 10:09:54 -0700 (PDT)
Hello,
On a class method I have the following:
HttpContext.Current.Request.MapPath("Data/Assets.xml");
I call this function from a View named "Document/New" which controller
is DocumentController and I end up with:
Could not find a part of the path 'C:\Documents and Settings\Me\My
Documents\Visual Studio\MyApp\Document\Data\Assets.xml'.
Where the correct path should be:
'C:\Documents and Settings\Me\My Documents\Visual Studio\MyApp\Data
\Assets.xml'.
How to solve this?
Thanks,
Miguel
.
- Follow-Ups:
- Re: MapPath not working with ASP.NET MVC
- From: Ignacio Machin ( .NET/ C# MVP )
- Re: MapPath not working with ASP.NET MVC
- Prev by Date: Re: Delegates are useful, and here is why (sample program)
- Next by Date: Re: TcpClient read/write timeouts do not timeout
- Previous by thread: CLS compliance problem
- Next by thread: Re: MapPath not working with ASP.NET MVC
- Index(es):