Server.MapPath problems.

  • Thread starter Thread starter Daniel Groh
  • Start date Start date
D

Daniel Groh

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

OpenConn();
DataSet dsErrorSQL = new DataSet();
HttpServerUtility myPath = new HttpServerUtility();
dsErrorSQL.ReadXml(myPath.MapPath("XMLErrors.xml"));
and i have this error:

No overload for method 'HttpServerUtility' takes '0' arguments

Wich namespace should i import ?

Thank you folks!

Daniel
 
Hi Daniel,

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

Joe
--
http://www.csharp-station.com
Hi, I'm trying to use the Server.MapPath in my ClassLibrary application, but I didn'get it...I tryed already the System.Web.HttpServerUtility...

OpenConn();
DataSet dsErrorSQL = new DataSet();
HttpServerUtility myPath = new HttpServerUtility();
dsErrorSQL.ReadXml(myPath.MapPath("XMLErrors.xml"));
and i have this error:

No overload for method 'HttpServerUtility' takes '0' arguments

Wich namespace should i import ?

Thank you folks!

Daniel
 
Back
Top