Article Software Release Magazine

I wrote an article on MS Ajax for the Software Release Magazine with the title “De scriptmanager centraal”. Unfortunatley it’s written in dutch so only for the dutch developers it could be interesting. Take a look at a short introduction here.

Braindump 71-510 beta exam VS 2005 Team Foundation Server

Well today i did my beta exam for VSTS 2005 TFS. I think it was a pretty difficult exam. I would like to share my experience with you about the subjects that passed in this exam. below you see some subjects that made the most impression to me:

  • There were mutiple questions about the commandline tools that are available in TFS (tf.exe, bissubsriber.exe, etc)
  • Questions about customizing templates and workitems (all the XML stuff)
  • Questions about source control (branches, shelving, check-in policies)
  • Questions about security (Grand and Deny permissions for Users and Usergroup (with the commandline tool))

Well if i can give you any advise, learn the command line tools (syntax) and security!! Hope this helps and if any of you also already did the exam and has other suggestions please post them! Thanks!

The fifth and last Ajax security webcast

Tomorrow is the last webcast about Ajax security which will be presented by Microsoft and Spi dinamics, you can register here. I recommend this webcast for every web developer (even when you aren’t using MS Ajax).

Masterpages and MS Ajax

In this posting I will try to explain how masterpages work in combination with an updatepanel. I see sometimes questions about masterpages and MS Ajax and conclude that this topic could be specified a little bit more. Well a masterpage is a page that can be inherited by contentpages, you can see it as a blueprint(masterpage) and an object (contentpage). Well in my example I defined a masterpage and 3 content pages which inherited from the masterpage

solutionexplorer


When a user makes a request to your website he will never makes a request to your masterpage, only to your content pages. Below I defined a masterpage

masterpage

 

This masterpage contains the following controls:

  • Scriptmanager
  • Menu
  • ContentPlaceHolder

So the scriptmanager and the menu will be available on every contentpage that inherits from this masterpage. See the content page below.

contentpage

You can see that the menu and the scriptmanager control are grayed out, because they reside on the masterpage. Well I defined in the contentPlaceHolder an updatepanel. The thing I want to make clear is the use of an updatepanel in combination with a masterpage/contentpage.

In this situation it isn’t possible to work with partialrendering when you want to switch from ContentPage1 to ContentPage2 via the Menu which is defined on the MasterPage.Why? Well, because ContentPage1 and ContantPage2 are webpages which are self sustaining. They both got the Scriptmanager control and the menu control. These controls are inherited from the masterpage. So when you click on the menuitem (“Contentpage2”) on contentpage1 webpage. It will open a new webpage (ContentPage2). The updatepanel on contentpage1 can only be used for partialrendering on contentpage1. I hope this looks to you very simple and logical, because it is. ;-)

Bridges in MS Ajax

I see on the MS Ajax forum questions about where bridges are in the MS Ajax v1.0.  Well they are gone and probably will never be available for MS Ajax again. A few minutes ago the Security webcast of Microsoft on MS Ajax security ended. The guys of SPI dynamics showed us how bridges can be used to attack websites. Bridges do not check any incomming request they just pass on the request to the address where the bridge is pointing to. A good replacement for bridges are webservices because they can validate incomming requests. We as webdevelopers need to be smart when we develop websites/ webservices!

Live From Redmond: The Next Generation of AJAX Attacks

Tomorrow the fourth webcasts of Ajax and security will be broadcasted. I visited the first 3 webcasts and it was a very good experience. So i would recommend you to visit the fourth one. Sign up here. See you there!

Calling webservices outside a domain with Javascript

The last few days i saw some threads about calling a webservice which is outside your domain with Javascript. Because of the restriction that is made for the path property of the servicereference <servicereference Path=”"> (same domain restrictions) it isn’t possible to make a reference to an webservice which is outside your domain. Well in MS Ajax Beta 2 version we could use bridge files to solve this problem. MS Ajax v1.0 doesn’t support bridge files anymore. So we must use another workaround.

The other workaround is using a second webservice (WebserviceA) which makes the call to the webservice (WebserviceB) outside your domain. This is very simple to build.

(WebserviceA)

WebserviceA should be configured in a way that it can accept calls from Javascript, take a look here to see how. This webservice must have a reference to WebserviceB which is outside your domain. You add a reference like we .NET developers are used to. (Add webreference)

(WebserviceB)

WebserviceB can be configured like a normal webservice and there you go!

Hope this helps you!

WebResource.axd and ScriptResource.axd size!

This night i saw 2 threads on the Ajax forum. The 2 threads were about the size of the Webresource.axd and the Scriptresource.axd, the developer said that these files were to big. While i was typing my answer for the developer, Kris van der Mast was already finshed with his answer. He said that the solution to this issue was setting <compilation debug=”false”>. My solution was setting <Scriptmanager Scriptmode=”Release”>. So i decided to check these 2 solutions. Well, i came to the conclusion that is makes no difference which solution you choose, they have the same effect.

When you set <compilation debug=”false”> and you don’t set the Scriptmode (which is “Auto” by defaut) the Scriptlibaries that will be send to the client while inherit the setting debug=false (so release=true). So the smaller scriptlibraries will be send to the client.

When you set <compilation debug=”true”> and the Scriptmode=”Release” then the compilation element will be overriden and the release scriptlibraries will also be send to the client.

My preference will go the latest option. Why? Well the first option has consequences for the whole application and the second option only on the page where you are working on. I hope you agree with me! 

Ajax Performance

Again another post at the Ajax forum. There was a developer who ran into a performance issue with MS Ajax. He had an Updatepanel with a dropdownlist in it which contains 14,000 items. Personally it think that an dropdownlist with 14,000 items isn’t a very good situation and should be avoided when possible. First the developer told me that he couldn’t avoid this situation, because his design matches the business requirements. Finally he choose another solution to workaround this problem.

 

The problem he had wasn’t there when he did the exact same thing without an UpdatePanel. So this shows us that MS Ajax has his problems with the UpdatePanel. Developers can manipulate the process of partial rendering with the PageRequestManager. Take a look at it to see what kind of scenarios you can handle with the PageRequestManager.

Beta exam 71-510 Visual Studio 2005 Team Foundation Server

At the blog of Rob Caron was a post about taking a beta exam for Visual Studio 2005 Team Foundation Server (71-510) with a promotion code. Well i was just on time and will take this exam 23 feb. Hopefully i leave the exanination room with a good feeling and than i have to wait for the result. NICE!

Follow

Get every new post delivered to your Inbox.