Export (0) Print
Expand All

Server.SessionClosing Event

Occurs when the session between the server that has the running instance of Analysis Services and the client starts to close, but before the session is finally closed.

Namespace:  Microsoft.AnalysisServices.AdomdServer
Assembly:  msmgdsrv (in msmgdsrv.dll)

public event EventHandler SessionClosing

The following code is part of the Analysis Services Personalization Extensions (ASPE) and shows how to use the SessionClosing and SessionOpened events.

NoteNote

The following sample code can also be downloaded from the Microsoft SQL Server Samples and Community Projects Web site.

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.AnalysisServices.AdomdServer;

namespace ISV_1.ASClientExtensions

{

[PlugInAttribute]

public class ASClientExtensions

{

public ASClientExtensions()

{

Context.Server.SessionOpened += new EventHandler(this.SessionOpened);

Context.Server.SessionClosing += new EventHandler(this.SessionClosing);

//Verify and set environment for ClientExtensions.

AuthoringAndManagement environment = new AuthoringAndManagement();

}

~ASClientExtensions()

{

}

public void SessionOpened(object sender, EventArgs e)

{

// This will subscribe to the events.

SessionMgr session = new SessionMgr();

}

public void SessionClosing(object sender, EventArgs e)

{

}

}

}

Community Additions

Show:
© 2014 Microsoft