Juan T. Llibre wrote:
The temp directory is hard-coded.
Sorry, I meant the 'other' temp directory, not the 'Temporary ASP.NET
files' one. I'm not completely sure what this other directory is used
for, but I know that I need to give write access to it to the user who
the web application runs as, or I get 'permission denied' errors.
When a web _service_ is running, IO.Path.GetTemp Path() returns (for me):
C:\DOCUME~1\RIK \ASPNET\LOCALS~ 1\Temp\
RIK\ASPNET seems to be name-of-machine\ASPNET, rather than username\ASPNET .
Looking at it again, I think it might be quite easy to work out what
this path will be, without having to be a web service, so I'll give it a
go and see if I can figure out a correct implementation.
BTW for anyone wanting to get the 'Temporary ASP.NET files' directory
from outside the web application, I do it like this:
String.Format _
( _
"{0}\Microsoft. NET\Framework\v {1}.{2}.{3}\Tem porary ASP.NET Files", _
Environment.Get EnvironmentVari able("windir"), _
Environment.Ver sion.Major, _
Environment.Ver sion.Minor, _
Environment.Ver sion.Build _
)
Cheers,
Rik