C
Charles Herring
In my asp.net application I upload a video file and then need to get the
duration and other properties.
I get "Attempted to access an unloaded AppDomain" when I instanciate the
Video object.
I am impersonating Administrator.
Here is the code:
Dim v As Video = New Video(fname, True)
intHeight = v.DefaultSize.Height
intWidth = v.DefaultSize.Width
Duration = v.Duration
v.Dispose()
Here are the errors:
? ex.Source
Run-time exception thrown : System.NullReferenceException - Object reference
not set to an instance of an object.
? ex.InnerException
Nothing
? ex.StackTrace
" at CreateWindowExW(UInt32 , UInt16* , UInt16* , UInt32 , Int32 , Int32 ,
Int32 , Int32 , HWND__* , HMENU__* , HINSTANCE__* , Void* )
at Microsoft.DirectX.AudioVideoPlayback.Video.CreateCoverWindow()
at Microsoft.DirectX.AudioVideoPlayback.Video..ctor(String fileName,
Boolean autoRun)
at MediaLibrary.Upload.getMediaFileProperties(String fname, String&
strDuration, Double& Duration, Int32& intWidth, Int32& intHeight, String
ftype) in C:\Inetpub\wwwroot\MediaLibrary\Upload.aspx.vb:line 208"
? fname
"C:\Inetpub\wwwroot\MediaLibrary\Library\Sleepycabbie.wmv"
? ex.Message
"Attempted to access an unloaded AppDomain."
? ex.TargetSite.ReflectedType
Nothing
? ex.TargetSite
{System.Reflection.RuntimeMethodInfo}
[System.Reflection.RuntimeMethodInfo]:
{System.Reflection.RuntimeMethodInfo}
Attributes: 24598
CallingConvention: Standard
DeclaringType: Nothing
IsAbstract: False
IsAssembly: False
IsConstructor: False
IsFamily: False
IsFamilyAndAssembly: False
IsFamilyOrAssembly: False
IsFinal: False
IsHideBySig: False
IsPrivate: False
IsPublic: True
IsSpecialName: False
IsStatic: True
IsVirtual: False
MemberType: Method
MethodHandle: {System.RuntimeMethodHandle}
Name: "CreateWindowExW"
ReflectedType: Nothing
duration and other properties.
I get "Attempted to access an unloaded AppDomain" when I instanciate the
Video object.
I am impersonating Administrator.
Here is the code:
Dim v As Video = New Video(fname, True)
intHeight = v.DefaultSize.Height
intWidth = v.DefaultSize.Width
Duration = v.Duration
v.Dispose()
Here are the errors:
? ex.Source
Run-time exception thrown : System.NullReferenceException - Object reference
not set to an instance of an object.
? ex.InnerException
Nothing
? ex.StackTrace
" at CreateWindowExW(UInt32 , UInt16* , UInt16* , UInt32 , Int32 , Int32 ,
Int32 , Int32 , HWND__* , HMENU__* , HINSTANCE__* , Void* )
at Microsoft.DirectX.AudioVideoPlayback.Video.CreateCoverWindow()
at Microsoft.DirectX.AudioVideoPlayback.Video..ctor(String fileName,
Boolean autoRun)
at MediaLibrary.Upload.getMediaFileProperties(String fname, String&
strDuration, Double& Duration, Int32& intWidth, Int32& intHeight, String
ftype) in C:\Inetpub\wwwroot\MediaLibrary\Upload.aspx.vb:line 208"
? fname
"C:\Inetpub\wwwroot\MediaLibrary\Library\Sleepycabbie.wmv"
? ex.Message
"Attempted to access an unloaded AppDomain."
? ex.TargetSite.ReflectedType
Nothing
? ex.TargetSite
{System.Reflection.RuntimeMethodInfo}
[System.Reflection.RuntimeMethodInfo]:
{System.Reflection.RuntimeMethodInfo}
Attributes: 24598
CallingConvention: Standard
DeclaringType: Nothing
IsAbstract: False
IsAssembly: False
IsConstructor: False
IsFamily: False
IsFamilyAndAssembly: False
IsFamilyOrAssembly: False
IsFinal: False
IsHideBySig: False
IsPrivate: False
IsPublic: True
IsSpecialName: False
IsStatic: True
IsVirtual: False
MemberType: Method
MethodHandle: {System.RuntimeMethodHandle}
Name: "CreateWindowExW"
ReflectedType: Nothing