StrataFrame Forum

Web Sample error

http://forum.strataframe.net/Topic31182.aspx

By Ross L. Rooker, Sr. - 5/2/2012

The web sample works perfect on localhost but when I deploy to my GoDaddy Virt Dedicated Server with Full Trust I always get this error when I click on the "Search Customers" tab. I can click on the "Edit Customers" and the Grid tab which shows data. I beelieve it has something to do with the ListPopulating event of the ListView. Here is the entire error I am getting:



Server Error in '/' Application.

Value cannot be null.
Parameter name: type

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.ArgumentNullException: Value cannot be null.
Parameter name: type

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:



[ArgumentNullException: Value cannot be null.Parameter name: type]   
System.Activator.CreateInstance(Type type, Boolean nonPublic) +7468694
MicroFour.StrataFrame.UI.Web.ListView.GetFilledBusinessObject(Object[] Parameters) +173[UIException: Dynamically populating the ListView failed.
Could not create and fill the business object of type 'visualOfficeNetBO.tblIndividual']
MicroFour.StrataFrame.UI.Web.ListView.GetFilledBusinessObject(Object[] Parameters) +1152
MicroFour.StrataFrame.UI.Web.ListView.PopulateListView(Object[] Parameters) +76
MicroFour.StrataFrame.UI.Web.ListView.ListView_Load(Object sender, EventArgs e) +26
System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627




Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456
By Ivan George Borges - 5/2/2012

Apparently it is saying it cannot instanciate your BO:

Could not create and fill the business object of type 'visualOfficeNetBO.tblIndividual'
By Ross L. Rooker, Sr. - 5/3/2012

I knew that but why would it be only on the listview and why would it only happen on the deployed code. Both the one run from localhost and the deployed run against the exact same database.

The tblIndividual is the same as you Customers BO in the websample.

Also, the error occurs exactly when I click on Search Customers. Yet works on the EDIT CUSTOMERS and GRID VIEW tabs.

Full Trust is on the deployed server. Targeting framework 3.5. I did comment out the USING statment on the samples for LINQ. Not sure if this matters. But again, it works from localhost.
By Trent L. Taylor - 5/3/2012

Ross:

First, look to make sure that you have YOUR bo assemblies in the Bin folder of your deployed website.  This error doesn't have anything to do with trust I don't think.  I think this error is coming from an issue with your deployed assemblies.  So in this example, the assembly that houses "visualOfficeNetBO.tblIndividual" doesn't seem to be loaded into the AppDomain of the site.  Start there.
By Ross L. Rooker, Sr. - 5/3/2012

I checked that. What is strange is if I do not click on Search Customers tab and go right to clicking on Edit Customers, the data shows up for the top 100 rows. I can EDIT, SAVE and navigate. No matter when I click the Search Customers the code in the ListPopulating event of the ListView causes the error.
By Trent L. Taylor - 5/3/2012

Have to tried to recreate the error in an isolated area of your code.  Just create a test page that tries to create your BO through the Activator.CreateInstance (that is what we do in the SF code).  Place your test page on the same level as the page not working.  Then if you need to trap the error and get the inner exceptions, you can create a message or something to give you a heads up.

Another option is to setup a remote debugger.

But from experience, this type of issue is generally always a setup issue.  There is something missing.  Have you thought about pre-compiling your site before upload?  That can improve performance and at times will resolve remote issues like this.

I generally try and precompile the ASP.NET apps before they are published.
By Ross L. Rooker, Sr. - 5/3/2012

Thanks Trent. You have been a great help. I am still amazed at the simplicity of the web sample.
By Trent L. Taylor - 5/3/2012

Thanks for your kind words, Ross.  It really does encourage us!
By Trent L. Taylor - 5/3/2012

Funny story...I clicked "Post Reply" on the last post and then the page scrolled back to the top.  It was basically on the message you posted with the error you are getting....but when I saw it, I thought it was an error on the page and thought...sheesh...how did that happen?  I quickly came to my senses...but I thought you may want to laugh at my expense. Smile
By Ross L. Rooker, Sr. - 5/3/2012

On  my GoDaddy on my server (Virtual Dedicated) do any of the Microfour DLL's need to be registered in the GAC?
By Angela G Lee - 5/13/2012

Yeah!They need registered in the GAC.In order to maintain your idiosyncratic identity on the  web browser and provide prompt allocation.