First off, thanks for all of your advice.
I changed the folder settings, and ASPNET is authorized to write to that
directory.
Path.GetTempPat h() returns: C:\DOCUME~1\ATC S\ASPNET\LOCALS ~1\Temp\
But, Path.GetTempFil eName() still returns an Error, I pasted the info below.
The directory name is invalid.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.IO.IOExc eption: The directory name is invalid.
Source Error:
Line 1847: // Get a temporary system filename
Line 1848: lFile = Path.GetTempPat h();
Line 1849: lFile = Path.GetTempFil eName();
Line 1850: File.Delete(lFi le);
Line 1851: lPath = Path.GetPathRoo t(lFile);
Source File: c:\development\ visual studio
projects\system \utilities\util ities.cs Line: 1849
Stack Trace:
[IOException: The directory name is invalid.]
System.IO.__Err or.WinIOError(I nt32 errorCode, String str) +723
System.IO.Path. GetTempFileName () +90
System.Utility. Utilities.GetFi lename(String Prefix, String
Extention, Boolean AddDateStamp, Boolean AddTimeStamp) in
c:\development\ visual studio projects\system \utilities\util ities.cs:1849
System.Utility. Utilities.GetFi lename() in c:\development\ visual
studio projects\system \utilities\util ities.cs:1799
System.Utility. TextFile.initia lizeClass(Strin g File) in
C:\Development\ Visual Studio Projects\System \Utilities\Text File.cs:190
System.Utility. TextFile..ctor( ) in C:\Development\ Visual Studio
Projects\System \Utilities\Text File.cs:126
System.Utility. LogFile..ctor(S tring File) in C:\Development\ Visual
Studio Projects\System \Utilities\LogF ile.cs:75
System.Utility. TraceDebugListe ner..ctor(Strin g Type) in
C:\Development\ Visual Studio
Projects\System \Utilities\Trac eDebugListener. cs:82
System.Utility. ListenerDebug.. ctor() in C:\Development\ Visual Studio
Projects\System \Utilities\List enerDebug.cs:10
eRMS.Global.Ses sion_Start(Obje ct sender, EventArgs e) in
c:\inetpub\wwwr oot\eRMSTest_NE T\Global.asax.c s:73
System.Web.Sess ionState.Sessio nStateModule.Ra iseOnStart(Even tArgs e)
System.Web.Sess ionState.Sessio nStateModule.On Start(EventArgs e)
System.Web.Sess ionState.Sessio nStateModule.Co mpleteAcquireSt ate()
System.Web.Sess ionState.Sessio nStateModule.Be ginAcquireState (Object
source, EventArgs e, AsyncCallback cb, Object extraData)
System.Web.Asyn cEventExecution Step.System.Web .HttpApplicatio n+IExecutionSte p.Execute()
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +173
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.432 2.573;
ASP.NET Version:1.1.432 2.573
Again, thanks for all of your help.
Jerry Pisk wrote:
You need to disable Simple file sharing under Folder Options to be able to
set permissions in WinXP.
If the ASPNET's temp directory is set to a valid path then I don't know what
might be causing the problem.
Jerry
"Glenn A. Harlan" <ga******@hotma il.com> wrote in message
news:IJ******** ************@co mcast.com...
The system environment Temp and Tmp are both set to "C:\WINDOWS\TEM P". I'm
running XP Professional. My user has Temp and Tmp set to:
%USERPROFILE% \Local Settings\Temp.
The Path.GetTempPat h is showing the ASPNET user Local Temp.
In windows XP there doesn't seem to any place to specificaly set folder
permissions as in 2000 or 2003 Server for an individual user.
Jerry Pisk wrote:
Most likely it would be the ASPNET user. I'm not sure how to set that
user's environment (without writing code) but first check what the temp
directory is, Path.GetTempPat h(). Check if the name is valid and the
directory exists and that ASPNET can write into it (but i think you'd get
a different exception if it was a permission issue).
Jerry
"Glenn A. Harlan" <ga******@hotma il.com> wrote in message
news:ZP***** *************** @comcast.com...
Wouldn't that be the ASPNET user?
If so how do I set the environment for that User?
Jerry Pisk wrote:
>Because your TEMP or TMP environment variable (for your web site's
>account) is an invalid directory name?
>
>Jerry
>
>"Glenn A. Harlan" <ga******@hotma il.com> wrote in message
>news:Hp*** *************** **@comcast.com. ..
>
>
>
>>Why am I receiving the below error when calling -
>>Path.GetT empFileName()
>>
>>
>>The directory name is invalid.
>>Descripti on: An unhandled exception occurred during the execution of
>>the current web request. Please review the stack trace for more
>>informati on about the error and where it originated in the code.
>>
>>Excepti on Details: System.IO.IOExc eption: The directory name is
>>invalid .
>>
>
>
>