TEMP files in a hosted environment

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
5/13/2009 7:40:42 AM
Gravatar
Total Posts 5

TEMP files in a hosted environment

 I'm running (or better "attempting" to run) my site built with mojoPortal in a hosted environment that does not allow access to C:\Windows\Temp.  I can understand why, and I attempted to resolve (by adding tempDirectory = "somewhere in my file structure" to the compilation tag in web.config like this:

<compilation tempDirectory="d:\hosting\member\xxx\TEMP" debug="false" defaultLanguage="C#">

 

for some reason, I'm still getting errors when the site is loading indicating that it is still trying to utilize C:\Windows\Temp.  Am I missing something???

frustrated, Daniel

5/13/2009 7:50:19 AM
Gravatar
Total Posts 18439

Re: TEMP files in a hosted environment

mojoPortal does not use the windows temp directory. ASP.NET does use it for its JIT compilation and that is what you are trying to override on the compilation element in Web.config, but I doubt any hosting company is going to let you change the internal workings like that. 

I think you have mis-diagnosed the original problem. You should undo that setting on the compilation and post the error you originaly were dealing with and maybe then I can help.

Joe

5/13/2009 8:04:39 AM
Gravatar
Total Posts 5

Re: TEMP files in a hosted environment

Thanks.  I removed the change to web.config.  Here is the error (the name of the file changes after refreshing a few times):

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

Could not find file 'C:\Windows\TEMP\f9kyc2vs.dll'.
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.FileNotFoundException: Could not find file 'C:\Windows\TEMP\f9kyc2vs.dll'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[FileNotFoundException: Could not find file 'C:\Windows\TEMP\f9kyc2vs.dll'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +305
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1162
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +66
Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames) +5237140
Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources) +493
Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources) +53
System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources) +23
System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) +578
System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) +1902
System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) +74
System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace) +105
System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace) +489
System.Xml.Serialization.XmlSerializer..ctor(Type type) +6
mojoPortal.Business.SerializationHelper.SerializeToString(Object obj) +68
mojoPortal.Web.WebTaskManager.QueueTask() +575
mojoPortal.Web.WebTaskManager.StartOrResumeTasks(Boolean appWasRestarted) +104
mojoPortal.Web.Global.Application_Start(Object sender, EventArgs e) +316

[HttpException (0x80004005): Could not find file 'C:\Windows\TEMP\f9kyc2vs.dll'.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +2723014
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +128
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +188
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +295
System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +56
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +231

[HttpException (0x80004005): Could not find file 'C:\Windows\TEMP\f9kyc2vs.dll'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074  

5/13/2009 8:12:10 AM
Gravatar
Total Posts 18439

Re: TEMP files in a hosted environment

If you moved an existing db up to hosting I would delete all rows from the mp_TaskQueue and mp_IndexingQueue tables, then recycle the app.

Hope it helps,

Joe 

5/13/2009 8:46:42 AM
Gravatar
Total Posts 5

Re: TEMP files in a hosted environment

Thanks, Joe!  The site appears to be working now.  It's done this before and then reverted to the errors below after a few minutes, so I'm figuratively holding my breath at this point (but it's been working through 10 minutes of steady refreshes).  

I'll send an update in an hour or so if it is still up.  

Thanks, again!  Your beer is on the way!  

Daniel

5/13/2009 2:29:27 PM
Gravatar
Total Posts 5

Re: TEMP files in a hosted environment

It dropped again (same errors as before) after being online since my last post.  I ran the delete script on the two tables again (mp_TaskQueue and mp_IndexingQueue) and the site came back up immediately.  

Do I need to just set this delete script up as a scheduled task (every minute or so), or is there a better solution?

thanks, Daniel

 

5/13/2009 2:32:54 PM
Gravatar
Total Posts 18439

Re: TEMP files in a hosted environment

To be honest. I think you should file a support ticket with yourt host if you are still seeing errors about jit compiled dlls in the temp folder. Whenever I have seen those kind of errors on a dev machine a reboot fixes it. Something is funky or corrupt down in the temp folder is my best guess.

Hope it helps,

Joe 

5/13/2009 2:47:08 PM
Gravatar
Total Posts 5

Re: TEMP files in a hosted environment

Thanks, Joe.  The feedback I got from trying to resolve this issue with the hosting company was that I wasn't supposed to be using C:\Windows\TEMP (due to it being in a shared hosting environment), and to specify a temp directory within my hosting directory.  I initially tried to accomplish this by adding tempDirectory="d:\hosting\member\xxx\TEMP" to the compilation tag in web.config (as described in my initial post).  That didn't seem to resolve the issue, but apparantly clearing these two tables does.  I'll do some additional research as to how I can specify a directory to use for jit dll compiling.  

Thanks for your help,

Daniel

5/13/2009 2:54:44 PM
Gravatar
Total Posts 18439

Re: TEMP files in a hosted environment

I think your host needs to escalate to someone who knows what they are talking about. If you are still getting the same errors about C:\Windows\TEMP\f9kyc2vs.dll or some other random dll name its a runtime issue not an application code issue. I think attempts to change the location of jit compilation is not likely to work.

If the error is different now then post a new error.

Hope it helps,

Joe

6/27/2012 10:28:57 AM
Gravatar
Total Posts 192

Re: TEMP files in a hosted environment

Hi joe, I'm having this same problem, and I did also copy a dbbackup and run it in a new shared environment.

I tried deleting rows from those tables, but errors still show up after that.

note that this error doesn't hppen all the time, it just happens sometimes.

what can I do?

6/27/2012 10:42:46 AM
Gravatar
Total Posts 18439

Re: TEMP files in a hosted environment

See if this thread helps you.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.