This is a migrated thread and some comments may be shown as answers.

No parameterless constructor

3 Answers 498 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 26 Jan 2009, 11:36 PM
We're getting an exception thrown, when trying to load the report viewer.  The contents:

Server Error in '/' Application.

No parameterless constructor defined for this object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[MissingMethodException: No parameterless constructor defined for this object.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
   System.Activator.CreateInstance(Type type) +6
   Telerik.ReportViewer.WebForms.ServerReport..ctor(SerializationInfo info, StreamingContext context) +560

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context) +0
   System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context) +108
   System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context) +273
   System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder) +49
   System.Runtime.Serialization.ObjectManager.DoFixups() +223
   System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) +188
   System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) +203
   System.Web.Util.AltSerialization.ReadValueFromStream(BinaryReader reader) +788
   System.Web.SessionState.SessionStateItemCollection.ReadValueFromStreamWithAssert() +55
   System.Web.SessionState.SessionStateItemCollection.DeserializeItem(String name, Boolean check) +281
   System.Web.SessionState.SessionStateItemCollection.get_Item(String name) +19
   System.Web.SessionState.HttpSessionStateContainer.get_Item(String name) +13
   System.Web.SessionState.HttpSessionState.get_Item(String name) +13
   Telerik.ReportViewer.WebForms.ReportDataOperation.ReportFromQuery(NameValueCollection urlQuery) +163
   Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperation(NameValueCollection urlQuery, HttpContext context) +73
   Telerik.ReportViewer.WebForms.HttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +229
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053


We're testing with sessionState mode="StateServer", for the specific purpose of ensuring that we get an error like this whenever we try to put something in the Session that isn't serializable.  Up 'til now, the errors that have resulted have always told us which class it was that wasn't serializable.  Unfortunately, If this error is telling me which class is causing the problem, I can't see it.

"No parameterless constructor defined for this object" - which object?  Of what type?

Anyone know how to find out?

3 Answers, 1 is accepted

Sort by
0
David Silveria
Top achievements
Rank 1
answered on 27 Jan 2009, 07:48 AM
This forum seems to elaborate on the same problem: http://www.telerik.com/community/forums/reporting/telerik-reporting/binding-to-an-arraylist.aspx

Cheers
0
Jeff
Top achievements
Rank 1
answered on 27 Jan 2009, 01:29 PM
I get a "server not found" error trying to access admin.telerik.com.  Are you sure that's a user-accessible URL?
0
Accepted
David Silveria
Top achievements
Rank 1
answered on 27 Jan 2009, 02:05 PM
I've edited the url to point to the proper forum thread. Seems like the forum search engine sometimes returns invalid urls or at least "Copy link location" copy's something else.
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
David Silveria
Top achievements
Rank 1
Jeff
Top achievements
Rank 1
Share this question
or