Friday, January 10, 2014

DNN Edit Page and Menu Not Working

 

After upgrading to DNN 7.2.0 the Edit Page button and the Admin Menu did not work. A quick check with Fiddler discovered that the JQuery scripts did not load

  • .../resources/libraries/jquery/1.9.1/jquery.js?cdv=236
  • .../resources/libraries/jquery-ui/1.10.3/jquery-ui.js?cdv=236
  • .../resources/libraries/jquery-migrate/1.2.1/jquery-migrate.js?cdv=236

Checked the existence of the files in the DNN Web directory on the IIS Server, all files were present.

The next check was the IIS log files, and here the solution was discovered:

GET /Rejected-By-UrlScan ~/resources/libraries/jquery-ui/1.10.3/jquery-ui.js?cdv=236

The IIS UrlScan rejected all paths that included a ‘dot’ in the pathname.

Note: The UrlScan.ini should be updated with caution, in this case the solution was to set AllowDotInPath=1  and to make sure that the double dots, dot slash and dot backslash also was rejected. By enabling dots in path names the PATH_INFO variable can be interpreted wrong. The rule of thumb is that if AllowDotInPath=1 is set, then rules based on the file extension may do unexpected things, including allowing requests that you intend to block .

Consider the url libraries/jquery/1.9.1/jquery.js

This can be converted into file = 1.9.1 parameter is /jquery.js

Or Download/Files.new/test.doc

Can be translated to

Get files.new with parameter test.doc

For versioning paths I always use hyphen or underscore

Wednesday, April 24, 2013

TFS 2012 Web Access Can’t load your extension


In Team Foundation Server 2012 you can develop extensions to the web interface, there extensions are javascripts (JQuery) that can be easily installed from the TFS Web Access Control Panel.
For information about the scripts and how to make a package and manifest se Serkan's Blog
After creating a package and trying to run my scripts I go a error message:

Module ‘mymodule’ cannot be loaded. This may be due to lost connectivity or an incomplete or corrupted download of the file. Try refreshing your browser or clearing your browser cache to retrieve the file again.

By turning on Web Access Script Debug Mode I found that a script called mymodule.debug.js is mandatory by using Fiddler (Be sure to include a .debug script if you plan to ship your extension or your extension will fail if debug is turned on)

OK so the .debug file was missing, adding that file (An empty one in my case solved the problem) – So the message was telling the truth… the file is not found

So I turned off Web Access Script Debug Mode and looked at Fiddler again, OK here is the solution: My script file was not minified and not called .min.js hence the file was not found.

By renaming the .js file to .min.js the file was loaded and all works as expected.

TFS Web Access expects the extension script to be named your.module.min.js regardless of what files that are in your zipped package.

Thursday, May 31, 2012

Make dOOdads understand SQL Datatype Date


For you that are using the  dOOdads .NET architecture and are generating source based on tables that use the datatypes Date or Time and are getting Unknown in your code. Here is a simple solution to make MyGeneration create code that supports SQL data types Date and Time:

Locate your DbTargets.xml and add

<Type From="date" To="SqlDbType.Date" />
<Type From="time" To="SqlDbType.Time" />
 
Locate your Languages.xml and add

<Type From="date" To="DateTime" />
<Type From="time" To="TimeSpan" />
 
The dOOdads allready known the datatype TimeSpan so the rest is handlesd by the framework.
To add a Date in code use DateTime.TimeOfDay to get the TimeSpan

Wednesday, February 15, 2012

Error when adding a Record Center site

When adding a Record Center to a SharePoint Server installation you may see the error “Dependency feature ‘DocumentRoutingResources’ … is not Activated

DocumentRoutingResources_Error

The feature is a hidden feature and can not be enabled in the GUI’s

To enable this feature start the “SharePoint 2010 Management Shell” (Power Shell) located in the start menu in “Microsoft SharePoint 2010” folder.

Copy/type the following command to enable:

Enable-SPFeature -Identity "DocumentRoutingResources" -Url http://yoursiteurl

 

RecordsCenter

Thursday, May 26, 2011

Create a TFS Field that contains Assigned Date

The default TFS workitems does not have a field that records last “Assigned To” date. You can easily create a new field to record this date

Start by creating a new Field Definition

AssignedToDateField_Create

Create a new rule of type WHENCHANGED

SNAGHTML8f39e02

Select Field System.AssignedTo

WhenChanged

Create a new rule of type SERVERDEFAULT

SNAGHTML8f5a976

Select from “clock”

SNAGHTML8f63fbc

The field Assigned Date is now created and will be updated when the workitem is assigned or re-assigned.

If you prefer to modify the XML directly here is the snippet:

 <FIELD name="Assigned Date" refname="NTS.AssignedDate" type="DateTime" reportable="dimension">
        <WHENCHANGED field="System.AssignedTo">
          <SERVERDEFAULT from="clock" />
        </WHENCHANGED>
      </FIELD
>

Tuesday, May 10, 2011

Workflow - Use url when creating a link in workflow steps

This may be obvious, but if you choose text instead of url in a link that you create in SharePoint Designer you can get an invalid link since the text version also includes the title

Ex: “http://mysite.mydom.com, Link Title”

In my case a link already existed in a SharePoint ListItem as a valid URL. But when added as a link in a mail the url got the trailing comma and title. Which in turn gave the webserver an invalid parameter.

The link that should have been:

…/wi.aspx?pcguid=d6d9eacb-0d67-4b19-ad62-626ab5cc1cf0&id=916

became

…/wi.aspx?pcguid=d6d9eacb-0d67-4b19-ad62-626ab5cc1cf0&id=916,%20Click%20to%20open%20the%20WorkItem%20in%20TFS

and the TFS Web did not like ID’s with comma and text…

Url

Friday, May 6, 2011

Remember to modify default.aspx after enabling “Wiki Page Home Page”

When enabling this feature you are modifying the default homepage of your site. The homepage will go from …/Default.aspx to …/SitePages/Home.aspx

When users have added bookmarks using the default.aspx homepage the users will still use your old homepage.

Quickfix edit the default.aspx file using SharePoint Designer and make a redirect to the new page. Or just add a Content editor and insert a script or descriptive text to update bookmarks