AudioVideoPlayback - Attempted to access an unloaded AppDomain.

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
 
B

bruce barker

your error is the video code trying to open a window, which is not allowed
from a service like asp.net. you will need to use a different library
routine that does not use direct-x.


-- bruce 9sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top