DotnetNuke: increment copyright year in the source code made it harder to identify the changes.

I’ve downloaded new 4.3.1 version and wanted to find which files were changed. Using VSS directory differences, I found that ALL files have been changed. Looking for details, I understood, that in most files only Copyright year was changed from 2005 to 2006. I think that it was a bad idea, because it make harder for users of DNN core source code to identify the changes. More…

Advertisements

DotNetNuke ResourceInstaller.Install Method parameters

DotNetNuke ResourceInstaller.Install Method has parameters that are not documented.


http://beta.dnndn.com/library/3.2.2.Core/DotNetNuke.Modules.Admin.ResourceInstaller.ResourceInstaller.Install_overload_3.html


Public Sub Install( _ 
   ByVal status As 
Boolean, _ 
   ByVal indent As 
Integer, _ 
   ByVal type As 
String _ 
)


status -if true, it sends output to HttpContext.Current.Response, otherwise it is silent.


indent-number of “ ”s inserted before output messages send to HttpContext.Current.Response. if status=false, ignored.


type -if “modules”, it only installs new modules (called from InstallDNN), otherwise installs all resources(including skins, containers etc)

Running Jscript demo functions from MSDN samples.

I’ve tried to port Query Parser written in JScript from Integrating User Search with ASP and Microsoft SQL Server Full-text Search to C#. The “Converting JScript.NET to C#” tool is quite useful, but doesn’t do all the job. I wanted to understand  RegExp properties , but MSDN JScript  help example doesn’t show output. So I’ve wrote simple exampleRun.js using WScript.Echo:


WScript.Echo (matchDemo());


function matchDemo(){


   var s;


   var re = new RegExp(“d(b+)(d)”,”ig”);


   var str = “cdbBdbsbdbdz”;


   var arr = re.exec(str);


   s = “$1 contains: ” + RegExp.$1 + “n”;


   s += “$2 contains: ” + RegExp.$2 + “n”;


   s += “$3 contains: ” + RegExp.$3 + “n”;


   s += “input returns : ” + RegExp.input + “n”;


   s += “lastMatch returns: ” + RegExp.lastMatch + “n”;


   s += “leftContext returns: ” + RegExp.leftContext + “n”;


   s += “rightContext returns: ” + RegExp.rightContext + “n”;


   s += “lastParen returns: ” + RegExp.lastParen + “n”;


   return(s);


}


Which produces the following output
$1 contains: bB


$2 contains: d


$3 contains:


input returns : cdbBdbsbdbdz


lastMatch returns: dbBd


leftContext returns: c


rightContext returns: bsbdbdz


lastParen returns: d

Update: I’ve noticed,that MSDN Jscript.NET  help includes the output, which is quite nice.

Set a property for ISSWebFile in subfolder.

Recently I posted class that I am using to Programmatically set IIS Authentication for a page. Later I found that initial implementation almost never worked because  files in subfolders usually do not have explicit entries in the metabase, but inherit all properties from the parent. I’ve added code to create metabase entry (similar to this). But if the file is in subfolder, not in the virtual directory, adding the SchemaClassNames=“IIsWebFile” doesn’t work (see discussion Creating Virtual Directories using DirectoryEntry – HRESULT: 0x8000500F).


I’ve spend a lot of time triying to workaround this and finally ADSUTIL gave me a hint:
WARNING: The Object Type of this object was not specified or was specified as IIsObject.
This means that you will not be able to set or get properties on the object until the KeyType property is set.


The solution is to create object with SchemaClassName = “IIsObject” and then set
entry.Properties[“keyType“].Value = “IIsWebFile”;
I’ve updated my class to fix the problem.

Google API returns: Exception from service object: For input string

In http://api.google.com/GoogleSearch.wsdl Google uses <xsd:element
name=”estimatedTotalResultsCount” type=”xsd:int” />  which is  32-bit
signed integer ( according to Datatype
Reference(http://books.xmlschemata.org/relaxng/ch19-77175.html)) and
expected to be less than 2,147,483,647.
However recently Google increase number of pages counted,  e.g  it
returns about 3,120,000,000 for for word “message”, which exceeded the
limit.
The value should be changed to xsd:long. Unfortunately it will break interface and client proxies will need to be rebuild against new WSDL. 
According to the
post(http://groups.google.tt/group/google.public.web-apis/msg/43def27ba969…)
Google’s aware of the problem.
They have a quick a simple option just to reduce the value to return to fit 32bit (who cares if it will not be accurate for such big numbers). 


<xsd:element
As a workaround  I am going to catch exception and if an error is like “Exception from service object: For input string: “3630000000”  re-post a query with allintitle:” at the front of your query.  <xsd:element

Configuration.Save Method parameters combination

I’ve reported to MS that documentation of Configuration.Save Method (ConfigurationSaveMode, Boolean)   is not detailed enough and they provided the clarification:

The ConfigurationSaveMode parameter can have one of the following values: 













Full


Causes all properties to be written to the configuration file. This is useful mostly for creating information configuration files or moving configuration values from one machine to another. 


Minimal


Causes only properties that differ from inherited values to be written to the configuration file. 


 Modified


Causes only modified properties to be written to the configuration file, even when the value is the same as the inherited value


 The additional forceSaveAll is sometimes needed to override the behavior as defined by the ConfigurationSaveMode and force all the configuration properties to be saved. This is a combination of inherited and locally defined or changed properties.