HomeHome Product Discus... Product Discus...SmithCartSmithCartSettings error when on 4.0 frameworkSettings error when on 4.0 framework
Previous
 
Next
New Post
12/22/2010 12:17 PM
 

I am using the latest build 3.9.7 (with the web service) and it errors when clicking Settings in the BuyNow module.

After debugging this on fresh installs of DNN, I figured out that it only happens when DNN is on the .net 4.0 framework. It works fine on the 2.0 framework.

Chad

 
New Post
12/22/2010 12:46 PM
 

What is the error you are receiving?

 
New Post
12/22/2010 12:52 PM
 

Q1) Out of curiosity, are you using IIS 6, 7, or 7.5?

Q2) Is there a specific error reported (dnn/event viewer/win app log)?

 
New Post
12/22/2010 1:23 PM
 

IIS 7.5

I apologize for not posting the error before.


AbsoluteURLReferrer: http://henslecd:4321/Default.aspx?tabid=41&error=Object+reference+not+set+to+an+instance+of+an+object.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: a8ce4115-d0b5-4910-93f3-4b61824082f9
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.UI.Containers.ActionBase.get_ActionRoot
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Containers.ActionBase.get_ActionRoot() at DotNetNuke.UI.Containers.ActionBase.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---
Source:
Server Name: HENSLECD

I had to roll my site back to 2.0 to get this to work based on customer needs. Will let you know how the web service goes also.

 
New Post
12/22/2010 2:02 PM
 

1) Add a quote to line 359

"/>

2) Add quote to line 363

"/>

3) Fix this in line 518

"optAuto">

That should get the file to work under 4.0.

 
New Post
12/22/2010 2:05 PM
 

Sorry, the filename to fix ~/DesktopModules/Smith.BuyNow/Settings.ascx

 
New Post
12/27/2010 7:13 AM
 

Perfect! I was uinclear on what to change in line 518 so I changed it to this:

<asp:RadioButtonList ID="rblAddressClass" runat="server" CssClass="SmithProdText" DataValueField="optAuto"/>

I can now get to the settings and they save!!!

Question... why were the close quotes left off? I assume mistake, but wouldn't that cause grief for everyone using this? Aagin I know enough about code to edit it... not directly wrtie from scratch...

Anyways. This is now working... now to run some tests... Will this be fixed in the new version that will be released next?

 
New Post
12/27/2010 9:50 AM
 

This problem is a double edged sword cause by progress and loose compiler settings.You can find similar issues with different browsers and versions. Consider this pseudo HTML code (tr) (td) (/td) (td) (/tr)

The intention here is two table details in a table row. The second detail does not include the second closing detail block. Some browsers fill in the blanks and display the table properly while others may not. In the case of this thread, .net 2.0 will ignore the warning and fill in the blanks at runtime. However, .net 4.0 is more strict and will cause an error. The DotNetNuke framework adds more confusion because it attemtps to hide the actual error with a message as informative as the period at the end of this sentence.

From a developer perspective, VS2008 is not as "smart" as VS2010 to recognise these issues. Some are harmless, others may cause downstream problems that can break an application at runtime. Since DotNetNuke involves many projects from different sources and compiles with all sorts of warnings, many developers simpy turn off these warnings just to get the job done.

My dream is to have a Clean Build of DotNetNuke. I have reported dozens of issues to Gemini as I find them. If we all used the "Treat all warnings as errors" compiler setting, I believe our world would be a much happier place.

AFAIK, these quote issues have been fixed.

 
New Post
12/27/2010 12:43 PM
 

Good explanation, and good troubleshooting to everyone involved.

I agree that turning off warnings is a bad, bad thing to do. A clean build of DNN would be wonderful.... and actually, should be expected. Especially if you are running the "commercial" version; I would *expect* that would be a clean build.

I'm sure that's not the case though.

 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartSettings error when on 4.0 frameworkSettings error when on 4.0 framework