Server.MapPath problems.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Groh

    Server.MapPath problems.

    Hi, I'm trying to use the Server.MapPath in my ClassLibrary application, but I didn'get it...I tryed already the System.Web.Http ServerUtility.. .

    OpenConn();
    DataSet dsErrorSQL = new DataSet();
    HttpServerUtili ty myPath = new HttpServerUtili ty();
    dsErrorSQL.Read Xml(myPath.MapP ath("XMLErrors. xml"));
    and i have this error:

    No overload for method 'HttpServerUtil ity' takes '0' arguments

    Wich namespace should i import ?

    Thank you folks!

    Daniel
  • Joe Mayo

    #2
    Re: Server.MapPath problems.

    Hi Daniel,

    It's static. Try Server.MapPath( "XMLErrors.xml" )

    Joe
    --
    Welcome to C# Station!  This is a community site for people interested in applying .NET using the C# programming language.  We’ve been around since July 4th 2000 and have continued to grow over the years.  Items of interest include Articles, Books, Links, Documentation,  and Tutorials. More… Source Code If you would like to see an […]

    "Daniel Groh" <newsgroupms@gm ail.com> wrote in message news:%23Nhwo0fR FHA.3944@TK2MSF TNGP10.phx.gbl. ..
    Hi, I'm trying to use the Server.MapPath in my ClassLibrary application, but I didn'get it...I tryed already the System.Web.Http ServerUtility.. .

    OpenConn();
    DataSet dsErrorSQL = new DataSet();
    HttpServerUtili ty myPath = new HttpServerUtili ty();
    dsErrorSQL.Read Xml(myPath.MapP ath("XMLErrors. xml"));
    and i have this error:

    No overload for method 'HttpServerUtil ity' takes '0' arguments

    Wich namespace should i import ?

    Thank you folks!

    Daniel

    Comment

    Working...