error while installing last version

Jan 30, 2011 at 5:19 PM

Line 734:            ds.Load(reader, LoadOption.OverwriteChanges, narray);
Line 735: XmlDocument doc = new XmlDocument();
Line 736: return CreateScalarNavigator(JsonHelpers.ConvertDataSetToDic(ds).ToJson());
Line 737: }
Line 738: internal static XPathNavigator GetJsonRowFromReader(IDataReader reader)

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1061: 'System.Array' does not contain a definition for 'ToJson' and no extension method 'ToJson' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

Coordinator
Jan 30, 2011 at 6:30 PM

It seems you have early version fo DNN 5 where ToJson is not implemented yet. 

To Fix your site you have to

  • Go the DNN files root and open App_Code\XsltDb\XsltDbController.cs
  • Find definiton of XsltDbExtensions class
  • Add the following extension method declaration

        public static string ToJson(this object source)
        {
            return new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(source);
        }

After that your site should be OK.

ASAP I'll issue new release that will not contain ToJson and test it on DNN 5.0 to ensure it is supported.

 

Coordinator
Jan 30, 2011 at 6:50 PM

No, that's not enough.

You have to add one more method at the same point

        public static T FromJson<T>(this string json)
        {
            return new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<T>(json);
        }

After that Your site will run.

Coordinator
Jan 30, 2011 at 7:19 PM

I have prepared a new release that I tested on DotNetNuke 05.01.00

You can download it from here http://xsltdb.com/XsltDb_02.00.49_Install.zip

I don't create a new release here now as I don't have enough time to create a description.

If you still can't get your site up - just delete all files in App_Code\XsltDb folder (the XsltDb folder itself should exist on disk!!!!). After that your site will run and you will be able to setup fresh XsltDb.

If any troubles - post a message here.

Jan 30, 2011 at 10:41 PM

working great