Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Release Mode Compile ErrorRelease Mode Compile Error
Previous
 
Next
New Post
1/29/2006 11:29 AM
 
Hi, I had to fix a bug with Windows authentication in 4.0.2, but the project won't compile in release mode.  The compiler complains that DotNetNuke.Common.Global is defined in a DLL in the temp ASPNET folder and in DotNetNuke.dll in the project's bin directory.  I tried moving Global.asax.vb from App_Code to the root, but that caused numerous compile errors.  Does anyone have any suggestions?

Sorry if this is anoying, but here's an explanation of the bug I found.  The bug has to due with VB's complete evaluation feature.  For example, in:
Dim x As String
x = Nothing
If Not x Is Nothing Or x.Length > 0 Then
Even though x is null, "x.Length" will still be called because VB evaluates all terms of the expression (thus "complete evaluation").  Most other language use short-cut evaluation, so when x is null the rest of the expression is skipped.

 
New Post
1/30/2006 12:16 PM
 
Necron99 wrote
Dim x As String
x = Nothing
If Not x Is Nothing Or x.Length > 0 Then


VB does have short cut versions (OrElse instead of Or, AndAlso instead of And)

Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
1/30/2006 12:25 PM
 
And since this is a 2.0 forum, the String class contins a new method that that will outperform doing it the long way:

returnValue = String.IsNullOrEmpty(value)

There are also other examples of the IsNullOrEmpty method on other classes as well, but I just can't remember off the top of my head.
 
New Post
1/30/2006 3:01 PM
 
I think it has been added to most "value" type classes, as .NET 2 now has the concept of a Nullable value-type.

Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
2/24/2006 12:39 PM
 
It turns out that a debug build DLL the references the global asax class (the cache'ing providers) was getting cached somewhere and not rebuild.  Installing fresh sources and doing a release build before making a debug build "fixes" the problem.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Release Mode Compile ErrorRelease Mode Compile Error


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out