Link to home
Start Free TrialLog in
Avatar of humantag
humantag

asked on

ASP.NET : Compiler Error Message: BC30138:

I have been pulling my hair out trying to figure this out.....when I try to create a simple ASP.NET Webform I get the following errors( see below).  The location of the temp file its trying to create is extremely odd to me but then again I don't know that much about the ASP.NET server engine and how it works.

I have played around with the permission and I have already checked the machines system variables (TMP & TEMP) and they are both pointing to '%SystemRoot%\TEMP' as they should....help please!

Server Error in '/' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30138: Unable to create temp file in path 'c:\windows\system32\inetsrv\%SYSTE~1\TEMP\': The directory name is invalid.

Source Error:

 

[No relevant source lines]
 

Source File: vbc :    Line: 0



Show Detailed Compiler Output:


c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5b70cf5c\ff57aaf0\App_Web_list.aspx.3a1a604e.6bbvmcnd.dll" /debug- /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5b70cf5c\ff57aaf0\App_Web_list.aspx.3a1a604e.6bbvmcnd.0.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5b70cf5c\ff57aaf0\App_Web_list.aspx.3a1a604e.6bbvmcnd.1.vb"


Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

vbc : error BC30138: Unable to create temp file in path 'c:\windows\system32\inetsrv\%SYSTE~1\TEMP\': The directory name is invalid.

 




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
Avatar of Dave_Dietz
Dave_Dietz
Flag of United States of America image

Try making sure the password for the "machine" account in the machine.config processModel section is the right password for the ASPNET account.

You can do this by checking what is set in the machine.config file and then setting that password for the ASPNET account in Local Users and Groups.

If these passwords are out of sync it can cause this issue.

Dave Dietz
Avatar of humantag
humantag

ASKER

are you talking about the machine.config file at: 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG'?
and if so can you give me a step by step on how to sync the two passwords that you are referncing...I am sorry but I dont understand.

Thanks for you help
Check your environment variable for TEMP under the OS.
Start --> Run --> command
at the command prompt, type "set"
look for temp, it should look like one of these:
TEMP = C:\temp
TEMP = C:\%systemroot%\temp
TEMP = C:\WINDOWS\temp
TEMP = C:\WINNT\temp

depending on your OS.  Grant everyone modify NTFS rights to the folder specified.
Also, the path may be invalid.  From the root of C, type "cd %TEMP%" and see where it goes.  If you get an error, that's your problem.

Best of luck,
harperse
hmmm....that it appears that when I run the 'set' command and 'cd %temp%' as you suggessted it is pointing to the temp directory within whichever profile I am currently logged in as (via terminal services:)

logged in as user1: 'C:\DOCUME~1\user1\LOCALS~1\Temp\1>'
logged in as user2: 'C:\DOCUME~1\user2\LOCALS~1\Temp\1>'

I am not sure  if this is the actual directory which ASP.NET is attempting to write to....
Hey folks.....it took me a little while but I figured it out...or at least a workaround.  Apparently it had to do with the system temp values - or rather the location of the temp directory.

1. I created a new 'TEMP' directory on my 'D:' drive
2. Changed the systems TEMP and TMP settings to point to the new directory that I created
   TEMP = D:\TEMP
   TMP = D:\TEMP
3. Gave the NETWORK SERVICE account full access to the new TEMP directory 'D:\TEMP'

Works like a charm now.

If anyone else runs into this problem
ASKER CERTIFIED SOLUTION
Avatar of DarthMod
DarthMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial