Dynamic rich media component for ASP.Net Flash, Video, Audio, FlashVideo and ToolTip / Balloon Help controls for C# and VB.Net
Welcome Guest Search | Active Topics | Members | Log In | Register

Exception thrown by the PlayList whenever I try to edit another gridview on the page Options · View
eric2820
Posted: Saturday, June 26, 2010 6:54:19 PM
Rank: Newbie
Groups: Member

Joined: 6/5/2010
Posts: 8
Points: 24
Location: Falls Church, VA
I keep getting exceptions thrown from the PlayList whenever I try to edit another gridView that's on the page.

The full excption text is:

Exception: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) at System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.backoffice_admin_musiclocker_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) - Inner Exception: System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) at System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
eric2820
Posted: Monday, June 28, 2010 11:49:12 PM
Rank: Newbie
Groups: Member

Joined: 6/5/2010
Posts: 8
Points: 24
Location: Falls Church, VA
I have tried to modify the page to remove the Grid View from the playback page, by placing the controls on two separate panals and adding a couple of radio buttons to the page to control which of the two panals gets displayed.

Of course the same exception gets thrown when I try to display either of the panels.

Here's a suggestion:

Check the state of the controls from your javascript code and only execute if the controls are Visible.
eric2820
Posted: Monday, June 28, 2010 11:58:34 PM
Rank: Newbie
Groups: Member

Joined: 6/5/2010
Posts: 8
Points: 24
Location: Falls Church, VA
Correction: The exception is only happening when I click on the radio button that displays the PlayMusic panel.

It still seems like there is something happening too early in the process.

The full text of the exception is:

Exception: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ASPNetMediaGUI.PlayListTrackDBI.GetCollection(Object playlist) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at System.Web.UI.WebControls.GridView.DataBind() at ASPNetMediaGUI.PlayListManager.a(EventArgs A_0) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.backoffice_admin_musiclocker_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) - Inner Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ASPNetMediaGUI.PlayListTrackDBI.GetCollection(Object playlist) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at System.Web.UI.WebControls.GridView.DataBind() at ASPNetMediaGUI.PlayListManager.a(EventArgs A_0) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
eric2820
Posted: Tuesday, June 29, 2010 3:53:23 PM
Rank: Newbie
Groups: Member

Joined: 6/5/2010
Posts: 8
Points: 24
Location: Falls Church, VA
In further analizes, I think I may have discovered the problem:

Exception: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ASPNetMediaGUI.PlayListTrackDBI.GetCollection(Object playlist)

It looks like someplace in the ASPNetMediaGUI.PlayListTrackDBI.GetColletion( Object playlist) you are assuming that something is actually in the playlist! This is a very bad assumption to make!
Jake
Posted: Tuesday, June 29, 2010 5:33:47 PM
Rank: Administration
Groups: Administration

Joined: 7/26/2007
Posts: 676
Points: 1,728
Location: USA
Hi Eric

Thanks for you patience and diligent analysis. Your clearly a talented developer.

All this has been forwarded to the develop who coded this module.

Lets hope for an easy fix.

If the mean time - have you ascertained a work-around??

http://www.aspnetmedia.com
eric2820
Posted: Tuesday, June 29, 2010 10:12:40 PM
Rank: Newbie
Groups: Member

Joined: 6/5/2010
Posts: 8
Points: 24
Location: Falls Church, VA
The workaround I created was to create two panels: 1) for adding music to the DB and 2) for playing music from the DB.

Don't be too concerned by the to and from DB statements above. I know how to get the music playing out of the DB and will share that code in a moment.

In the Page_Load event I have:

plMusicLocker.DataSourceID = null;
plMusicLocker.DataSource = dt;
plMusicLocker.DataBind();

plMusicLocker.StopPlayList();
plMusicLocker.TrackChangeEvent += new ASPNetMediaGUI.PlayListManager.TrackChangeEventHandler( plMusicLocker_TrackChangeEvent );


The plMusicLocker_TrackChangeEvent handler is:

void plMusicLocker_TrackChangeEvent( object sender, ASPNetMediaGUI.TrackChangeEventArgs e )
{
long id = (long) Session[ "Id" ];
int track = e.NewTrackNumber;
Response.Write( String.Format( "<br/>e.NewTrackNumber = {0}", e.NewTrackNumber ) );
Response.Write( String.Format( "<br/>id = {0}", id ) );
Response.Write( String.Format( "<br/>plMusiceLocker.Rows.Count = {0}", plMusicLocker.Rows.Count ) );

if ( track >= 0 && track < plMusicLocker.Rows.Count )
{
string title = plMusicLocker.Rows[ track ].Cells[ 2 ].Text;
string artist = plMusicLocker.Rows[ track ].Cells[ 3 ].Text;
string album = plMusicLocker.Rows[ track ].Cells[ 4 ].Text;

audioPlayer.VideoURL = String.Format( "mp3Player.ashx?id={0}&artist={2}&album={3}", id, title, artist, album );
plMusicLocker.AutoPlay = true;
}
}

I'm not yet confident in the values for title, artist and album but if they need tweeking it will be after the software is updated because I'm not even getting to these statments yet!

Dave
Posted: Wednesday, July 14, 2010 10:19:48 PM
Rank: Administration
Groups: Administration

Joined: 7/20/2007
Posts: 305
Points: -2,485
Location: Primarily in New York, USA
Eric

This is Dave, I wrote the code in question. It would be great if you could continue to help me get to the bottom of this problem. Here is the source for the ASPNetMediaGUI.PlayListTrackDBI.GetColletion method:

Code:

public PlayListTrackDataTable GetCollection(object playlist)
        {
            PlayListTrackDataTable table = new PlayListTrackDataTable();

            foreach (PlayListTrack track in playlist as PlayListTrackCollection)
            {
                PlayListTrackRow row = table.NewPlayListTrackRow();
                if (track.Name != null) row.Name = track.Name;
                row.URL = track.URL;
                table.AddPlayListTrackRow(row);
            }

            return table;
        }



Just a hunch, but what might be happening is our JavaScript might be trying to access your second gridview as though it was a playlist. I think that the null reference exception here: (System.NullReferenceException: Object reference not set to an instance of an object. at ASPNetMediaGUI.PlayListTrackDBI.GetCollection(Object playlist) ) is asserting that the PlayListTrackDBI object is null, not anything inside of the GetCollection method, but I certainly could be wrong.

Could you post your source code for the ASPX page(s) you're working with here? If you're uncomfortable posting it to a public website, shoot me an email. dave (at) aspnetmedia.com

Thanks!
eric2820
Posted: Tuesday, July 20, 2010 12:42:03 AM
Rank: Newbie
Groups: Member

Joined: 6/5/2010
Posts: 8
Points: 24
Location: Falls Church, VA
Hi Dave,

I emailed the source code you requested on Friday or Saturday. You should have seen it in your inbox sometime today if not earlier.

Any comments on what I'm trying to accomplish?

Eric
Dave
Posted: Saturday, August 07, 2010 3:07:48 AM
Rank: Administration
Groups: Administration

Joined: 7/20/2007
Posts: 305
Points: -2,485
Location: Primarily in New York, USA
Got your email, I'll get back to you there.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.