none
"2" Folder Does not exist under User\Profile\AppData\Temp in Windows Server 2008 R2 RRS feed

  • Question

  • Prior to patching Windows Server 2008 R2, a folder labeled "2" was created under users\Profile\AppData\Temp on servers with SQL Server 2008 R2 when a user logged on for the first time.  Post SP1 for Windows Server 2008 R2 (and a handful of other KB's) this folder no longer gets created.  Also, some new process that was introduced during the same server remediation is deleting all file and folders under users\Profile\AppData\Temp causing the same issue for previously created users.  When this folder does not exist, SQL Server Management Studio gives the following error message:

    ************** Exception Text **************

    Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializationException: Serialization operation on ServerGroup[@Name='SqlServerCompactEditionServerGroup'] has failed. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Profile\AppData\Local\Temp\2\lqtla430.tmp'.

       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

       at 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)

       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)

       at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()

       at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)

       at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension)

       at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)

       at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)

       at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)

       at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)

       at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)

       at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)

       at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)

       at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)

       at System.Xml.Serialization.XmlSerializer..ctor(Type type)

       at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.WriteInternal(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces)

       at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces)

       --- End of inner exception stack trace ---

       at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces)

       at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.WriteAllInstances()

       at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter xmlWriter)

       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore.Serialize()

       at Microsoft.SqlServer.Management.RegisteredServers.ServerGroup.Create()

       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore.get_SqlServerCompactEditionServerGroup()

       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServerControl.RegisteredServerControl_Load(Object sender, EventArgs e)

       at System.Windows.Forms.UserControl.OnLoad(EventArgs e)

       at System.Windows.Forms.UserControl.OnCreateControl()

       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

       at System.Windows.Forms.Control.CreateControl()

       at System.Windows.Forms.Control.WmShowWindow(Message& m)

       at System.Windows.Forms.Control.WndProc(Message& m)

       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

       at System.Windows.Forms.ContainerControl.WndProc(Message& m)

       at System.Windows.Forms.UserControl.WndProc(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    I have verified the permissions on this folder and am able to manually create the "2" folder which resolves the issue until logoff.  Does anyone know what process should be creating this folder for first time logons?

    Monday, June 27, 2011 6:46 PM

Answers

  • Hi Erik,
    I cannot find folder '2' after searching all the folders on my machine. But the SQL Server Management Studio could work properly. Did you mean this folder will be created only for the first time user log-in SQL Server Management and  be removed  after log-off ?


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Peja Tao Wednesday, July 6, 2011 1:07 AM
    Wednesday, June 29, 2011 7:19 AM
  • From reading your question it appears that you (not the system) have created the "2" folder in users\Profile\AppData\Temp.  This directory is what it states; TEMPORARY and NOT a location you should using to store data.

    It also appears that the files in this directory relate to SQL Server ServerGroups, specifically SqlServerCompactEditionServerGroup.

    Try resetting the SSMS window layout (On the SSMS Windows menu, click Reset Window Layout)

    Also try and select a folder more appropriate for the task at hand


    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    MC ID: Microsoft Transcript

    Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    • Marked as answer by Peja Tao Wednesday, July 6, 2011 1:07 AM
    Thursday, June 30, 2011 7:53 AM

All replies

  • Hi Erik,
    I cannot find folder '2' after searching all the folders on my machine. But the SQL Server Management Studio could work properly. Did you mean this folder will be created only for the first time user log-in SQL Server Management and  be removed  after log-off ?


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Peja Tao Wednesday, July 6, 2011 1:07 AM
    Wednesday, June 29, 2011 7:19 AM
  • From reading your question it appears that you (not the system) have created the "2" folder in users\Profile\AppData\Temp.  This directory is what it states; TEMPORARY and NOT a location you should using to store data.

    It also appears that the files in this directory relate to SQL Server ServerGroups, specifically SqlServerCompactEditionServerGroup.

    Try resetting the SSMS window layout (On the SSMS Windows menu, click Reset Window Layout)

    Also try and select a folder more appropriate for the task at hand


    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    MC ID: Microsoft Transcript

    Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    • Marked as answer by Peja Tao Wednesday, July 6, 2011 1:07 AM
    Thursday, June 30, 2011 7:53 AM
  • The system makes C:\Users\Profile\AppdData\Local\Temp\2 (numbers will increase depending on the session number) when you log in through a RDP session but deletes it after you log off.  Chances are good that you installed the application through an RDP session.  When you logged off RDP deleted the directory but kept the configuration somewhere.

    It is best practice to never install programs through an RDP session for that exact reason.

    • Proposed as answer by Jo Jacobs Monday, July 16, 2012 11:23 AM
    Monday, July 11, 2011 4:29 PM