Server Error

Feb 15, 2008 at 3:12 AM
On our live server the upload process runs as far as creating the zip file in the tem directory but then stops. Seems to be a permissions issue, but I don't know where. Any help would be appreciated.

Windows 2003 Server
Application Event Viewer Reports:
Event Type: Error
Event Source: ASP.NET 2.0.50727.0
Event Category: None
Event ID: 1334
Date: 2/14/2008
Time: 9:41:39 PM
User: N/A
Computer: PRIMARY
Description:
An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/1805002194/Root/videoshow

Process ID: 148

Exception: System.ApplicationException

Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

StackTrace: at System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOFileItemStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CopyStream(FileStream inputStream, Stream requestStream)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddToZip(Package zip, String localFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CreateSilverlightPackage(Video video, String videoFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddMedia(String mediaFilePath, Video video)
at VideoShow.Bll.Media.Processing.BasicVideoProcessor.Process(Video video)
at VideoShow.Bll.Media.Processing.AsyncVideoProcessor.<>c_DisplayClass1.<Process>b_0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Feb 15, 2008 at 6:39 PM
There is a table called VideoLog, where you can get detailed diagnostic information. The upload process records in detail each step that and in most cases includes the file it’s trying to access, so this should tell you what file permissions are needed. Oh, it also writes these diag messages to the stdOut, so you can also download Debugger.exe (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) to view this log in real time as you try to upload the video.

Hope this helps point you in the right direction.



JoeReynolds wrote:
On our live server the upload process runs as far as creating the zip file in the tem directory but then stops. Seems to be a permissions issue, but I don't know where. Any help would be appreciated.

Windows 2003 Server
Application Event Viewer Reports:
Event Type: Error
Event Source: ASP.NET 2.0.50727.0
Event Category: None
Event ID: 1334
Date: 2/14/2008
Time: 9:41:39 PM
User: N/A
Computer: PRIMARY
Description:
An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/1805002194/Root/videoshow

Process ID: 148

Exception: System.ApplicationException

Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

StackTrace: at System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOFileItemStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CopyStream(FileStream inputStream, Stream requestStream)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddToZip(Package zip, String localFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CreateSilverlightPackage(Video video, String videoFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddMedia(String mediaFilePath, Video video)
at VideoShow.Bll.Media.Processing.BasicVideoProcessor.Process(Video video)
at VideoShow.Bll.Media.Processing.AsyncVideoProcessor.<>c_DisplayClass1.<Process>b_0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.




Feb 16, 2008 at 4:57 AM
Thanks for the response. I've looked at the video log previously. the last message provides no useful information. I have noticed that the endocing completes and a zip file is created in the Windows/temp directory. If I try and open the zip file it tells me the zip is corrupt. It certainly looks like it is the zip process failing. The question is why? Have you run this on a Windoes 2003 Server?

Any more ideas?

This works on my workstation, running Vista. I also have the zip program installed on the machine. The server is Windows 2003 Server and I have no installed the zip program. I assumed the system zip process would take care of the zip.



mmoser wrote:
There is a table called VideoLog, where you can get detailed diagnostic information. The upload process records in detail each step that and in most cases includes the file it’s trying to access, so this should tell you what file permissions are needed. Oh, it also writes these diag messages to the stdOut, so you can also download Debugger.exe (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) to view this log in real time as you try to upload the video.

Hope this helps point you in the right direction.



JoeReynolds wrote:
On our live server the upload process runs as far as creating the zip file in the tem directory but then stops. Seems to be a permissions issue, but I don't know where. Any help would be appreciated.

Windows 2003 Server
Application Event Viewer Reports:
Event Type: Error
Event Source: ASP.NET 2.0.50727.0
Event Category: None
Event ID: 1334
Date: 2/14/2008
Time: 9:41:39 PM
User: N/A
Computer: PRIMARY
Description:
An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/1805002194/Root/videoshow

Process ID: 148

Exception: System.ApplicationException

Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

StackTrace: at System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOFileItemStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CopyStream(FileStream inputStream, Stream requestStream)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddToZip(Package zip, String localFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CreateSilverlightPackage(Video video, String videoFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddMedia(String mediaFilePath, Video video)
at VideoShow.Bll.Media.Processing.BasicVideoProcessor.Process(Video video)
at VideoShow.Bll.Media.Processing.AsyncVideoProcessor.<>c_DisplayClass1.<Process>b_0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.





Feb 17, 2008 at 3:58 AM
Hi again. I've looked closely at what happens when the error occurrs. The zip file is created. However it never contains the manifest.xml file.

The videoshow log show the following as the last entry:
Begin to create zip containing encoded video and manifest, the file is "C:\WINDOWS\TEMP\tmp7327.tmp"

This is obviously a permissions issue. If I run on development machine as localhost everything works find. The error hapepns on a live server when access via http://www.XXXX.com. I can't believe this issue is unique to me.

Debugger.exe didn't give me any clues.

In ANYONE running this program successfully on Windows 2003 Server under a domain name and not localhost?

mmoser wrote:
There is a table called VideoLog, where you can get detailed diagnostic information. The upload process records in detail each step that and in most cases includes the file it’s trying to access, so this should tell you what file permissions are needed. Oh, it also writes these diag messages to the stdOut, so you can also download Debugger.exe (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) to view this log in real time as you try to upload the video.

Hope this helps point you in the right direction.



JoeReynolds wrote:
On our live server the upload process runs as far as creating the zip file in the tem directory but then stops. Seems to be a permissions issue, but I don't know where. Any help would be appreciated.

Windows 2003 Server
Application Event Viewer Reports:
Event Type: Error
Event Source: ASP.NET 2.0.50727.0
Event Category: None
Event ID: 1334
Date: 2/14/2008
Time: 9:41:39 PM
User: N/A
Computer: PRIMARY
Description:
An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/1805002194/Root/videoshow

Process ID: 148

Exception: System.ApplicationException

Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

StackTrace: at System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOFileItemStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CopyStream(FileStream inputStream, Stream requestStream)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddToZip(Package zip, String localFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CreateSilverlightPackage(Video video, String videoFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddMedia(String mediaFilePath, Video video)
at VideoShow.Bll.Media.Processing.BasicVideoProcessor.Process(Video video)
at VideoShow.Bll.Media.Processing.AsyncVideoProcessor.<>c_DisplayClass1.<Process>b_0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.





Feb 17, 2008 at 5:43 PM
OK. I created a separate application pool for VideoShow and set the identity to run as the System Account (default is Network Service) and the program works as intended.

However, it does not seem to be a good idea at all to run this as System. Does anyone have any idea what permissions the Network Service account needs on Windows 2003 server so VideoShow will run without permissions errors?



JoeReynolds wrote:
On our live server the upload process runs as far as creating the zip file in the tem directory but then stops. Seems to be a permissions issue, but I don't know where. Any help would be appreciated.

Windows 2003 Server
Application Event Viewer Reports:
Event Type: Error
Event Source: ASP.NET 2.0.50727.0
Event Category: None
Event ID: 1334
Date: 2/14/2008
Time: 9:41:39 PM
User: N/A
Computer: PRIMARY
Description:
An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/1805002194/Root/videoshow

Process ID: 148

Exception: System.ApplicationException

Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

StackTrace: at System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOFileItemStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CopyStream(FileStream inputStream, Stream requestStream)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddToZip(Package zip, String localFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.CreateSilverlightPackage(Video video, String videoFileName)
at VideoShow.Bll.Media.Hosting.SilverlightStreamingHost.AddMedia(String mediaFilePath, Video video)
at VideoShow.Bll.Media.Processing.BasicVideoProcessor.Process(Video video)
at VideoShow.Bll.Media.Processing.AsyncVideoProcessor.<>c_DisplayClass1.<Process>b_0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.




Apr 22, 2010 at 12:45 PM

I do not know if you have been able to fix this problem but it looks like it is a problem with Permissions. The packaging/zipping part uses IsolatedStorage. For applications that run with Full Trust (like on your local machine with My Computer permission set ), this shouldn't be a problem. But if not, then you should know that Code Access Security limits the size available for IsolatedStorage for some permission sets. So it will work for small files but once the files become too large (larger than the limit set in IsolatedStorage Permission) then you get this problem. You can modify this IsolatedStorage limit (or totally remove it) in Code Access Security or by using command line caspol. Not that difficult, I must say.