.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

help with this AppDomain event

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :


I've a company that use SQL CLR from IIS that connect to the SQL and insert data to tables.
every few days the server stop responding and i see those error in the sql event viewer
Unsafe assembly 'hebfilts, version=, culture=neutral, publickeytoken=null, processorarchitecture=msil' loaded into appdomain 9 (system.dbo[runtime].8).

AppDomain 9 (system.dbo[runtime].8) unloaded.
AppDomain 9 (system.dbo[runtime].8) is marked for unload due to memory pressure.

the problem is fixed only when i restart the sql server service.
now i use SQl Server 2005 SP2 build 9.0.3042
I've found an article that talks about this problem but they say that it fix in build 2153
and i'v 3042.
does my build include this fix?(i installed sp2 after RTM)
if so how can i fix this error that i have?


View Complete Post

More Related Resource Links

Getting AppDomain.UnhandledException event to work in a Windows Service

Nearly every forum thread I have found on "catching unhandled exceptions in a service" seems to end up where I am.  The supposed solution is the use of the AppDomain.CurrentDomain.UnhandledException event.  But it doesn't work for someone, who then asks why and gets no answer.  Same for me; I can't get the event to happen.  It's as if I need the ServiceProcess version of Application.SetUnhandledExceptionMode(), which doesn't exist. For diagnosing this, I start a timer in a child object of the service and then throw an exception in the timer event handler.  Simple enough to simulate the real situation.  I have tried subscribing to the UnhandledException event in at least a half dozen locations throughout the service, from the Program that runs ServiceBase.Run() to the constructor of the object that owns the Timer, but it never catches this exception. The VS debugger recognizes that the forced exception is unhandled and takes me to the place where is thrown, letting me know it is an unhandled exception. Why doesn't my handler catch it?  Running without the debugger, the exception throws, the timer thread crashes, the service continues merrily along, and nothing gets logged anywhere.  That is NOT the result I need.  What are the people for whom this works doing that I am not doing? How can I at least get the offe

AppDomain and ProcessExit event

I have write next code: class Program { static void Main(string[] args) { AppDomain appDomain1 = AppDomain.CreateDomain("NewDomain1"); AppDomain appDomain2 = AppDomain.CreateDomain("NewDomain2"); appDomain1.ProcessExit += new EventHandler(appDomain1_DomainUnload); appDomain2.ProcessExit += new EventHandler(appDomain2_DomainUnload); ThreadPool.QueueUserWorkItem(new WaitCallback(Doit), appDomain1); ThreadPool.QueueUserWorkItem(new WaitCallback(Doit), appDomain2); } static void appDomain2_DomainUnload(object sender, EventArgs e) { Console.WriteLine("Domain2 unloaded"); } static void appDomain1_DomainUnload(object sender, EventArgs e) { Console.WriteLine("Domain1 unloaded"); } static void Doit(object obj) { ((AppDomain)obj).ExecuteAssembly("2_1.exe"); } } Why i get events only when i close my CurrentDomain (close application)?

Radio Button Event

Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.

how to impose javascript event processing?


If I have some form control like textbox and I want the event handler to be located in the html instead of at the server side, how to do that? Of course I can copy paste javascript code in the aspx file. But is it possible to do that using some object oriented approach (ie programmatically in the code behind)?


Dropdown Event (Template Field)



I have grid view control that includes a dropdown control in a template field.

I wish to execute some code when the value is changed in the dropdown list.  Can't figure out how to capture this event though?

Any suggestions?

Event ID 1011 - DefaultAppPool World Wid Web Pub. Serv. fatal communication error

We have a Windows 2003 server running IIS6 1.1 Framework. We have also installed a DNS and Active Directory in the same machine.

We're randomly getting the error you can see below. Sometimes it causes the recycling of process w3wp.exe (which on my understanding represents the application pool worker processd) and other times results on this process hanging and not responding to any request. To do iisrest temporarly solves the problem.

We were pointed to a possible permissions problem between the user we were runnig the DefaultAppPool with and registry entries used by the iis. We noticed the default predifined user we used, Network Service, wasn't found in the Active Directory, so we changed it by the default configurable user, IWAM_MACHINE_NAME, which is under the IIS_WPG Active Directory Grupo, which, in theory has the correct permissions to run the application pool.

Well, none of this worked and we are still getting this error.

This is driving us crazy and think the problem might have to do with having the Domain Controller/Active Directory and the IIS6 running on the same machine. We'll try now uninstalling this DC pointing to another one to see what happens.

Any help would be appreciated.

Thanks in advance,


Event Type: Warning

Failed to create AppDomain


Recently updated my system to use Visual Studio 2010, and projects will no longer compile. All of them give the error "Failed to create AppDomain." Intellisense does not work either (except for standard HTML tags), and individual pages will also not compile.

Points of note:

  • All sites are hosted on UNC shares (although it doesn't work on a new site created on local drive either)
  • Language is mostly C#
  • No explicit code is creating AppDomain objects
  • Sites compiled fine under both VS 2005 and 2008 both before and after VS 2010 installation
  • Sites compile and run fine from the IIS server on the remote machines (one IIS 6, one IIS 7)

Things I've tried (some obviously shouldn't have any bearing on it, but I've tried just about everything that anyone suggested on any forum I could find, most of which seemed to apply to IIS, not VS):

  • renaming/deleting security.config
  • running caspol -reset
  • re-registering asp.net: aspnet_regiis.exe -ua / aspnet_regiis.exe -i
  • removing VS 2005, 2008, 2010, and then re-installing just VS 2010
  • adding the UNC path to the local intranet zone (internet options control panel)
  • adding the UNC path to LocalIntranet_Zone in the ASP.Net 2.0 control panel (runtime security policy/machine/al

Event not raised while parsing xml file



In Visual Studio 2010 ASP.NET 4.0

I want to write a procedure to validate a xml file with a xsd. I found some examples on the web but the one i chose does not work as attended. The example uses XmlReader with a XmlReaderSettings and a ValidationEventHandler.

Here is the code

Protected Sub VerifyDes(ByVal filename As String)

        Dim xslDes As XmlReaderSettings = New XmlReaderSettings()
        xslDes.Schemas.Add("", "http://www.mysite.com/xsd/ValidData.xml")
        xslDes.ValidationType = ValidationType.Schema
        xslDes.ValidationFlags = XmlSchemaValidationFlags.ReportValidationWarnings

        AddHandler xslDes.ValidationEventHandler, AddressOf xslDesValidationEventHandler

        Dim des As XmlReader = XmlReader.Create(filename, xslDes)

        While (des.Read())

        End While

    End Sub

    Protected Sub xslDesValidationEventHandler(ByVal sender As Object, ByVal e As ValidationEventArgs)

        'some code here
    End Sub

I tested this procedure with a xml file which was well formed but contained some elements which were not conform to the xsd.

No event or error occured. It said the file was valid.

Then i tested with a badly formed file. A XmlException was raised but nothing happened with the ValidationEventHandler.

It seems lik

How to set up microsoft application blocks 4.0 to talk to event viewer


I need to set up the microsoft application blocks 4.0 on the server and connect it to my web project.  I need to set it up so that all the errors are logged in the event viewer.  So far I have found out how to set up a flat file listener and send the error to a log file but, not to the event viewer.  Any suggestions would be helpful.

    Composite control: How to bubble a textbox's TextChanged event?


    I've created a composite control that contains several controls, including a textbox. I'm trying to expose the TextChanged event of the textbox as an event on the composite control. I understand that events can be bubbled up the control hierarchy and handled at a higher level, which I've attempted to do, but I can't get the bubbled event to fire. When I drop the control on an aspx I can see the TextChanged event, I can subscribe to the event, but nothing ever happens. Any suggestions? Here is what I think is the relevant code:

    // My event
    private static readonly object EventTextChanged = new object();

    //Handle the bubbled event
    EventHandler textChangedHandler = (EventHandler)Events[EventTextChanged];
    protected override bool OnBubbleEvent(object source, EventArgs e) 
        bool handled = false;

    Reporting services in 2008 r2 how to get a report in a print button click event in my c#.net page


    how to  get a report in my c#.net page button lick event also steps to call a report from asp.net to reporting services


    Thanks in advance

    Creating Event Handler in Code behind


    Hi, so I have a control that is created in the code behind and generates fine but I can't figure out how to create an event handler for it.  I've found plenty of examples for it in C sharp, but none of them seem to apply to VB.  What I want to do is essentially this:

    myDropDownList.SelectedIndexChanged = "Event to do here"

    but it doesn't seem to work for me.

    Any suggestions are appreciated.

    Subscribing to .Net event from COM



    Can somebody tell me how to subscribe to .net event from the COM through interoperability?

    namespace EventSource
        public interface IBugEvents
            void Hungry();
            void Found(string item);
        public class Bug
            public delegate void HungryEventHandler();
            public delegate void FoundEventHandler(string item);
            public event HungryEventHandler Hungry;
            public event FoundEventHandler Found;

    Can somebody tell me how to Subscribe to the Hungry and Found events from the COM?If possible help me with COM Code.

    Event Tracing For Windows: Core Instrumentation Events in Windows 7, Part 2


    In Part 2, the authors cover core OS Event Tracing for Windows (ETW) events as well as present simple scripts to demonstrate a few basic accounting techniques on some of the OS events introduced.

    Alex Bendetov, Insung Park

    MSDN Magazine October 2009

    Event Tracing for Windows: Core Instrumentation Events in Windows 7


    In the first article of a two-part series, the authors present a high-level overview of the ETW technology and core OS instrumentation.

    Alex Bendetov, Insung Park

    MSDN Magazine September 2009

    Team System: Team Foundation Server Event Service


    Use the Team Foundation Server EventService to create and manage event subscriptions or create a Web service to receive and process events.

    Brian A. Randell

    MSDN Magazine May 2008

    Event Tracing: Improve Debugging And Performance Tuning With ETW


    Event Tracing for Windows (ETW) provides general-purpose, high-speed tracing of events raised by both user-mode applications and kernel-mode device drivers. Learn how ETW can improve your development and debugging work.

    Dr. Insung Park and Ricky Buch

    MSDN Magazine April 2007

    ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
    Sql Server  SharePoint  Silverlight  Others  All   

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend