mayvelous

Me, Myself and Mayvelous

Archive for the ‘Technology’ Category

I deployed the Sitefinity site from local to DEV and STAGING servers and the document uploader works on DEV but suddendly disappear on the STAGING server.

Correct Screen
correct screen

Error Screen
blank document upload

I’ve created a forum post but received no good answers. The dude kept asking me to install Silverlight Tools on all the machines. I don’t understand why we have to install silverlight on all machines and which silverlight exactly to install as there’re browser plugin, silverlight tools, silverlight framwork etc. And I cannot install silverlight tools unless the prerequisites, Visual Studio 2010 and Web Developer Express 2010, been installed which I absolutely don’t want to do. Also on the DEV server, there’s not a single instance of Silverlight installation was there and the uploader’s working just fine so I really had a hard time figuring out the issue with STAGING site. The forum responds were so slow, so I created a ticket and the same dude replied as followed:

Can you enable Firebug and check what errors come up in the Net tab when you try to access the Upload section? Also is there a way to provide RDC to your server so I can inspect the settings in more depth?

Ofcos I don’t want to give RDC access but I checked the Firebug and that really helps figure out the problem.
With the help of Firebug, I got 404 file not found for Telerik.Sitefinity.Silverlight.xap file with the error below:

Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: 2104 An error has occurred.

Now that’s some good hint, so I checked the path and the file exists on the server so must be the file permission issue; I googled the error message and found out that it’s all to do with missing MIME Types on STAGING server.

mime types

I’ve added these 3 types to the server MIME types list and it fixes the problem.

.xap application/x-silverlight-app
.xaml application/xaml+xml
.xbap application/x-ms-xbap
Ref: Configuration IIS for Silverlight Applications

I wasn’t happy with the support but thank god he at least gave me a hint to check with Firebug.

According to this post, we can reference the Sitefinity built-in script libraries and/or external script files in site master page as followed:

<sf:JsFileLink id="jsLink" runat="server" ScriptType="jQuery"></sf:JsFileLink>
<sf:JsFileLink id="jsLink" runat="server" ScriptType="prototype"></sf:JsFileLink>
<sf:JsFileLink id="jsLink" runat="server" ScriptType="mooTools"></sf:JsFileLink>

To use it, reference the assembly from the project and add the following code in the master page.

<%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sf" %>

It didn’t mention which version of Sitefinity it’s used at but after testing, found out that it’s definitly not for our current 4.1 SP2 version. The “JsFileLink” property is for older version of the sitefinity 3.6 etc which comes from Telerik.Cms.Web.UI assembly.

Did a bit more digging around and got the right referencing for 4.1 version.

1. Add this to master page, immediately after Page tag.

<%@ Register TagPrefix="sf" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.PublicControls"%>

2. Place the following inside the “form” tag, NOT in the “head” section.

If you have the “JS” folder location as mention in this structure, reference as followed:

<sf:JavaScriptEmbedControl runat="server" ID="jsLink1" ScriptEmbedPosition="Head" Url="~/Sitefinity/WebsiteTemplates/YourSiteTemplates/JS/test.js"></sf:JavaScriptEmbedControl>

If you have the script folder in your website root, use the following:

<sf:JavaScriptEmbedControl runat="server" ID="jsLink2" ScriptEmbedPosition="Head" Url="~/scripts/test.js"></sf:JavaScriptEmbedControl>

For built-in JQuery library, reference as followed:

<sf:JavaScriptEmbedControl runat="server" ID="jQyeryLink" ScriptEmbedPosition="Head" ScriptType="jQuery"></sf:JavaScriptEmbedControl>

3. Must have unique “ID” and specify “ScriptEmbedPosition” fields.

The JavaScriptEmbedControl will register a script in the selected ScriptEmbedPosition (Head, InPlace, BeforeBodyEndTag). This control is also available in the page editor in the Scripts and Styles toolbox section. You can add references to scripts when editing the page through the UI, and even write inline scripts by hand. ref

IMPORTANT
Place all the external JS link or code blocks at the end of the page rather than the “Head”. ie. use “BeforeBodyEndTag” for some reason sitefinity loads it’s own copy of jquery in the middle of the markup and it tends to mess up the rest of the scripts.
eg.

<sf:JavaScriptEmbedControl runat=”server” ID=”jQyeryLink” ScriptEmbedPosition=”BeforeBodyEndTag” Url=”~/scripts/jquery.min.js”></sf:JavaScriptEmbedControl>
<sf:JavaScriptEmbedControl runat=”server” ID=”JavaScriptEmbedControl1″ ScriptEmbedPosition=”BeforeBodyEndTag” Url=”~/scripts/jquery.cycle.all.js”></sf:JavaScriptEmbedControl>

The followings are things to note while create a new sitefinity sites.

Name the solution.
Open the solution via Sitefinity Project Manager and save the solution in the project folder with proper name

Set up DB with appropriate name.
Click “Browse” on the Project Manager to set up the DB.

Add all references as solution items.
Copy all reference DLLs from the bin folder of the project to the “Lib” folder. Add them under solution folder items.

Sitefinity Initial Setup

Repoint/Rereference the dlls from “Lib” folder
Remove all sitefinity related references from the project and rereferences them from the “Lib” folder.
Tip: The easiest way to reference the sitefinity related dlls to the project file would be:
- open the project file in the notepad
- search for “bin\”
- replace the appropriate dll refernces with “..\Lib\”
DO NOT hit “Replace All” as not all places require replacement.
All sitefinity related dlls will be rereferenced to correct folder EXCLUDING AjaxControlToolkit and a few others.
Search for the followings:

..\Reference Assemblies\AjaxControlToolkit.dll
..\Reference Assemblies\Microsoft\WindowsAzure\Microsoft.WindowsAzure.Diagnostics.dll
..\Reference Assemblies\Microsoft\WindowsAzure\Microsoft.WindowsAzure.ServiceRuntime.dll
..\Reference Assemblies\Microsoft\WindowsAzure\Microsoft.WindowsAzure.StorageClient.dll

and repoint to Lib folder as well.
Note: Everytime you do the upgrade or add a custom dlls, make sure to add/update them in the Lib folder and repoint the project references to Lib.

Rename the Assembly and DefaultNameSpace with the project name
Right click on the project > Properties > Application tab > Type in project name in the “Assembly name” and “Default namespace” textboxes.

Rename Assembly

Build the solution
If the aboves are done correctly, your solution will build successfully and once browsed, will display “Thank you for visiting our web site. Please return soon for updates.”
Else you’ll get the error mentioned in the DON’T section below.

DON’T

Don’t use dots “.” in the project name.
Current version throws error when using dots in the project name.
Don’t build the solution before repointing the references.
After creating a new sitefinity site using Sitefinity Project Manager, do not build the project or solution as it will overwrite the dlls from the bin folder and throw the following error.
_”Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.”_ Ref

I was checking out this Silverlight Pivot Viewer where you can browse through 10yrs worth of MSDN Magazines; found it pretty neat fast loading interface but it’s annoying when you select an article and click either “Read Article” or “Download Code” link, it redirects you to the article page on the same viewer page. And when you want to go back, you have to relaunch the viewer and reenter the search criteria again. I wish they make the article links open in new window so we can still keep viewer open.

Below are the screenshot of the article page cloud based on the search criteria I entered and the zoom in view of it.

Silverlight Pivot Viewer Silverlight Pivot Viewer

Anyways, it’s good that we can search all MSDN articles using this thing quite easily so I’m pretty satisfy with it.

Saw this over at “In search of simplicity, quality and tranquility in software engineering“; a series of posts on SDLC – Software Development Lifecycle. Thought a good series to follow and read it over the weekend. Love the graphics on each post!

SDLC

  1. SDLC – Software Development Lifecycle … what’s the point? (part 1 of many)
  2. SDLC – Software Development Lifecycle … closer look at basics (part 2 of many)
  3. SDLC – Software Development Lifecycle … exploring common models (part 3 of many)
  4. SDLC – Software Development Lifecycle … agility strikes back with energy (part 4 of many)
  5. SDLC – Software Development Lifecycle … is prototyping  part of the good, the bad and/or the evil? (part 5 of many)
  6. SDLC – Software Development Lifecycle … analyzing the battle ahead (part 6 of many)
  7. SDLC – Software Development Lifecycle … designing the blueprint (part 7 of many)
  8. SDLC – Software Development Lifecycle … testing, the moment of truth (part 8 of many)
  9. SDLC – Software Development Lifecycle … flashback, component-level design principles (part 9 of many)
  10. SDLC – Software Development Lifecycle … Visual Process & Estimating (Guessing) Software Deliverables
  11. To scrum or to Run … that is the agile question? (new)

  • Comments Off
  • Filed under: Development, Microsoft, News, Notes, Software, Technology
  • HP Mini Vivienne Tam

    Yesterday I found this cute yet very informative review on Liz’s blog about “HP Mini Vivienne Tam” and fell in love with it instantly. It’s almost the size of my diary and has other fashion accessories, bag and scarf, to go with it. The color and the design is just so captivating that I just want to have a feel of it. The design is somewhat like a Japanese Kimono…

    HP Mini Vivienne Tam

    Check out the specifications too, not too bad isn’t it?

    Operating system: Genuine Windows XP Home with Service Pack 3
    Processor: Intel(R) Atom(TM) Processor N270 (1.60GHz)
    Memory: 1GB DDR2 System Memory (1 Dimm)
    Hard drive: 60GB 4200RPM PATA Hard Drive
    Graphics card: Intel(R) Graphics Media Accelerator 950
    Display: 10.1″ diagonal SD LED BrightView Infinity Widescreen Display (1024 x 576)
    Personalization: HP Mini Webcam with HP Imprint Finish (Vivienne Tam)
    Networking: Wireless-G Card
    Included Mobile Broadband: No Included Mobile Broadband
    Keyboard: HP Color Matching Keyboard
    Primary battery: 3 Cell Lithium Polymer Battery

    The Vivienne Tam Mini fashion accessory

    It’s perfect for everyday blogging and having a memory of 1GB and 60GB hard drive is ample enough for some simple usage. Check out detail product description on amazon.com. Oh, how I wish I could grab one and roam around in town showing it off. :P

  • Comments Off
  • Filed under: General, Technology
  • Voice and Video Chat on Gmail

    How sweet! Now you don’t even need Gtalk desktop installer for voice chat, both voice and video are available on browser based Gmail chat. All you have to do is, grab this plugin and start rolling. Well ofcos’ you need a webcam. :-)

    Voice and video chat in gmail

    Just click on the new “Video & more” menu in a Gmail chat window and select “Start video chat” or “Start voice chat.” You can switch to a full screen view or pop out the chat window and change the size and positioning as you wish. Of course, not everyone has a webcam, but even if you don’t, you can still have voice conversations alongside your email and regular chat.

    Watch the demo video and read detail here. I haven’t tried it yet. I’ll give it a shot once I get home. Not too excited about video but voice on gmail is good enough for me. That would reduce the pain of having to install a desktop program just for voice chat.
    Thanks google team for this new feature.

    Flickr Photos

    Downloads

    Twitter Status


    Goodie Links


    Mayvelous Friends


    I'm an Author for Global Voices

    Archives