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.H eight
intWidth = v.DefaultSize.W idth
Duration = v.Duration
v.Dispose()
Here are the errors:
? ex.Source
Run-time exception thrown : System.NullRefe renceException - Object reference
not set to an instance of an object.
? ex.InnerExcepti on
Nothing
? ex.StackTrace
" at CreateWindowExW (UInt32 , UInt16* , UInt16* , UInt32 , Int32 , Int32 ,
Int32 , Int32 , HWND__* , HMENU__* , HINSTANCE__* , Void* )
at Microsoft.Direc tX.AudioVideoPl ayback.Video.Cr eateCoverWindow ()
at Microsoft.Direc tX.AudioVideoPl ayback.Video..c tor(String fileName,
Boolean autoRun)
at MediaLibrary.Up load.getMediaFi leProperties(St ring fname, String&
strDuration, Double& Duration, Int32& intWidth, Int32& intHeight, String
ftype) in C:\Inetpub\wwwr oot\MediaLibrar y\Upload.aspx.v b:line 208"
? fname
"C:\Inetpub\www root\MediaLibra ry\Library\Slee pycabbie.wmv"
? ex.Message
"Attempted to access an unloaded AppDomain."
? ex.TargetSite.R eflectedType
Nothing
? ex.TargetSite
{System.Reflect ion.RuntimeMeth odInfo}
[System.Reflecti on.RuntimeMetho dInfo]:
{System.Reflect ion.RuntimeMeth odInfo}
Attributes: 24598
CallingConventi on: Standard
DeclaringType: Nothing
IsAbstract: False
IsAssembly: False
IsConstructor: False
IsFamily: False
IsFamilyAndAsse mbly: False
IsFamilyOrAssem bly: False
IsFinal: False
IsHideBySig: False
IsPrivate: False
IsPublic: True
IsSpecialName: False
IsStatic: True
IsVirtual: False
MemberType: Method
MethodHandle: {System.Runtime MethodHandle}
Name: "CreateWindowEx W"
ReflectedType: Nothing 1 2334
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******@bigpo nd.net.au> wrote in message
news:uu******** *****@TK2MSFTNG P12.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.H eight
intWidth = v.DefaultSize.W idth
Duration = v.Duration
v.Dispose() Here are the errors:
? ex.Source Run-time exception thrown : System.NullRefe renceException - Object
reference not set to an instance of an object. ? ex.InnerExcepti on Nothing ? ex.StackTrace " at CreateWindowExW (UInt32 , UInt16* , UInt16* , UInt32 , Int32 , Int32
, Int32 , Int32 , HWND__* , HMENU__* , HINSTANCE__* , Void* ) at Microsoft.Direc tX.AudioVideoPl ayback.Video.Cr eateCoverWindow () at Microsoft.Direc tX.AudioVideoPl ayback.Video..c tor(String fileName, Boolean autoRun) at MediaLibrary.Up load.getMediaFi leProperties(St ring fname, String& strDuration, Double& Duration, Int32& intWidth, Int32& intHeight, String ftype) in C:\Inetpub\wwwr oot\MediaLibrar y\Upload.aspx.v b:line 208" ? fname "C:\Inetpub\www root\MediaLibra ry\Library\Slee pycabbie.wmv" ? ex.Message "Attempted to access an unloaded AppDomain." ? ex.TargetSite.R eflectedType Nothing ? ex.TargetSite {System.Reflect ion.RuntimeMeth odInfo} [System.Reflecti on.RuntimeMetho dInfo]: {System.Reflect ion.RuntimeMeth odInfo} Attributes: 24598 CallingConventi on: Standard DeclaringType: Nothing IsAbstract: False IsAssembly: False IsConstructor: False IsFamily: False IsFamilyAndAsse mbly: False IsFamilyOrAssem bly: False IsFinal: False IsHideBySig: False IsPrivate: False IsPublic: True IsSpecialName: False IsStatic: True IsVirtual: False MemberType: Method MethodHandle: {System.Runtime MethodHandle} Name: "CreateWindowEx W" ReflectedType: Nothing This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 error occasionally. Our
DLL is strongly named, so I am confused as to how this could be happening.
It is a mixed-mode DLL implemented in managed C++ such that a thin managed
C++ wrapper surrounds the unmanaged C++ implementation. I've gone over every...
|
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 runs for about 2
hours, processing a smidge over 4000 of the entries and then borks with
the error:
: Attempted to access an unloaded AppDomain.
The IIS logs shows a status of 200 for that page, the Event Viewer shows
nothing unusual around...
|
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 using .NET framework 1.1)
|
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 Express Beta2. If I change
anything in any of the class files residing in App_Code, the AppDomain is
unloaded and all application data, including all sessions, is lost. Is there
anything I can do to prevent this?
This undesired side-effect...
|
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 exception of type 'System.AccessViolationException' occurred
in mscorlib.dll
Additional information: Attempted to read or write protected memory. This is
often an indication that other memory is corrupt."
The progran ends on a windows form designer...
| |
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, read out the
attributes, and unload the child app domain. But in this moment, I load
the assembly into the child app domain, the assembly occurs in the
parent app domain, too. And after unloading the child app domain the
assembly is still loaded in...
|
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
System.EventArgs) Handles btnStop.Click
Try
Player.StopWhenReady()
Catch
End Try
End Sub
|
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.
|
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 = o.GetType().GetMethod("Hello");
m.Invoke(o, null);
AppDomain.Unload(d);
after the Unload statement, the ClassLibary1 is still loaded into the
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |