473,385 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

AudioVideoPlayback - Attempted to access an unloaded AppDomain.

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.CreateC overWindow()
at Microsoft.DirectX.AudioVideoPlayback.Video..ctor(S tring 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:lin e 208"
? fname
"C:\Inetpub\wwwroot\MediaLibrary\Library\Sleepycab bie.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


Nov 18 '05 #1
1 2312
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)

"Charles Herring" <ch******@bigpond.net.au> wrote in message
news:uu*************@TK2MSFTNGP12.phx.gbl...
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.CreateC overWindow()
at Microsoft.DirectX.AudioVideoPlayback.Video..ctor(S tring 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:lin e 208"
? fname
"C:\Inetpub\wwwroot\MediaLibrary\Library\Sleepycab bie.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


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matt Fausey | last post by:
I've been plagued with an "Attempted to access an unloaded AppDomain" for several months now. We have a .NET Email Component such that for some ASP.NET customers that user our DLL will get this...
2
by: cameron | last post by:
I have a page that needs to process aproximately 7000 LDAP entries and does 10-12 SQL DB calls per entry. It is a busy, busy page. I have it schedualed to run every night at 4 am server time. It...
5
by: F. Prefect | last post by:
Hello, (sorry for reposting this.) We are having the following scenario: A ASP.NET Application (C#) is using a managed C++ assembly, which is a thin wrapper around an old C++ lib. (We are...
5
by: jake | last post by:
I've seen many articles that claim the files in the App_Code directory are treated in the same way as aspx-files in ASP 1.1. Well, this does not seem to be the case, at least in Web Developer 2005...
2
by: Ilkka | last post by:
I have created an C++ application with Windows Forms, ADO and SQL server 2005. Now I need to change something and started debugging the code. Then suddenly I receive an error. "An unhandled...
1
by: Basti | last post by:
Hello, I'm working with .Net 2.0. I tried to get attributes of an unloaded assembly. So, the sole way I know is to create a new child application domain, in this app domain I load the assembly,...
0
by: Terry Olsen | last post by:
If I have an audio file playing using DirectX.AudioVideoPlayback.Audio and I click the stop button, using the following code: Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As...
1
by: xievvv | last post by:
Hi, Is there a way to know when an AppDomain is finally unloaded? I need get notified when all objects in an unloading AppDomaing are finalized for sure. Thanks.
2
by: Ashutosh | last post by:
Hi, I have this simple code AppDomain d = AppDomain.CreateDomain("test123"); Assembly a = d.Load("ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c4510fb7f9c15154"); MethodInfo m...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.