Posted on 2004-08-03
so I have webmatrix installed on my c:\ on my computer. I have a directory called employees, in which all my files are stored.
What I want to do is send an email to an account with a link to a .aspx file that contains an accountid for an employee.
Now when I just use the physical path on my harddrive i.e. c:\employees\confirm.aspx?id=asdfadsfdaa
The source code of the page opens and the page isn't served. I think this is becasue the file is not getting processed on IIS...
So I decided to use Server.MapPath...however I am writing this email send function in a custom class.
I am using the following string to acquire the path of my confirm.aspx file...
string linkstring = HttpContext.Current.Server.MapPath("confirm.aspx?id=" + accountid);
This throws the following error:
System.ArgumentException: Illegal characters in path.
The accountid variable I am passing is simply a string of characters.....
what am I doing wrong? should I use Server.UrlPath instead if I am going to be using the website on http web?