Archive for the Asp.Net Category

Template Cache issues in Visual Studio 2005 after SP1

Posted in Asp.Net, C#, Software Development, Web Development on January 4, 2007 by Shaun

If you have installed SP1 for your visual Studio installation, you may find that some project templates are no longer available to you.There is a known issue that was reported during the Beta Phase of VS2005 SP1 but it looks like it was not fixed. I had hoped that the SP1 update would automatically refresh the template cache as part of it’s post update clean up. Ho Hum.

To correct the issue you’ll need to re-create the project template cache as follows:

Open Visual Studio 2005 Command Prompt and type devenv.exe /InstallVSTemplates, and hit Enter. This will create the template cache for you.

Tips:

  • Check you actually need to run this, if you cant see ASP.Net Web Application as a project template when the Visual C# nodeis selected then its likely your template cache is screwed.
  • Make sure Visual Studio is closed before you run the command prompt.
  • Wait a minute or so after the command prompt shows it’s completed (new cursor position), there is still stuff going on in the background.

Thanks to Guru Stop (ASP.NET Guy Blog) for putting up this issue during the SP1 Testing phase.

More Info on Visual Studio 2005 SP1

Posted in Asp.Net, Software Development, Web Development on January 2, 2007 by Shaun

First of all a Happy new year to you. I hope that you enjoyed the Christmas break (if you were lucky enough to get one) and that Santa brought you loads of presents (if that forms part of your celebrations).

I managed to somehow avoid contact with a computer for the whole Christmas period, which meant that I got a break but als that I didn’t achieve a single one of my goals for the holidays… ah well, I’m sure I have a lot of fun ahead catching up.

One post I found interesting when going through the blog backlog in RSS Bandit today was an excellent post from Scott Guthrie in which he offers up some excellent links to information regarding Visual Studio SP1, I encourage you to check out this post if you are considering SP1 or are having any particular issues. If you are still undecided about SP1 and want to know what benefit you coiuld get from it then this is one of the best (and probably only) resources for detailed information available on the web.

As usual Scott is up front and informative.

In  you were out the second half of December, you might have missed some of the VS 2005 Service Pack 1 posts that I’ve previously made:

Below are a few more recent links and blurbs of information about VS 2005 SP1 that you might also find useful:

[Via ScottGu's Blog]

More Details for Visual Studio SP1

Posted in Asp.Net, Atlas, Software Development, Web Development on December 22, 2006 by Shaun

Omar Khan has put together a pretty detailed post over on his MSDN Blog, covering some of what was fixed in SP1 to improve Web development. I was struggling to find any details of the fixes up till now so I figure the more exposure Omar’s post gets, the better it is for us all to see if our issues are fixed in the patch.

One thing I noticed though is that I learned to work around a lot of the issues, I think I’ve experienced almost all of the bugs at some point or another.

If you haven’t applied the patch yet then I suggest you do, it’s not going to be quick but it is going to cure many issues.

My First Gotcha!

Posted in Asp.Net on December 15, 2006 by Shaun

As You know I’ve just bitten the bullet and have installed Visual Studio 2005 SP1 Release version. Not being completely stupid I decided to use a VMWare session to check it out first.
Glad I did.

Once the SP1 install had finished, a painful process taking way more than an hour, I fired it up to build a simple Hello World with a label and a button in ASP.Net. All went well until I ran the project and Visual Studio dissapeared up it’s own binary equivalent ass. So round 2 try again. OK all seemed fine, project ran, click button, hello world yay!

No try something a bit more complicated, whip up a quick custom controll.

Right Click solution node in solution explorer… erm… where the frack is my solution node!
Took a bit of digging before I realised the damned check-box in the application preferences was unchecked. Solution nodes were no longer always showing. Damn!

Still… once I raved a bit and then dug around in the bowels of the property box, all was back to normal…

Just makes me wonder what’s next.

Microsoft® Visual Studio® 2005 Service Pack 1 – Released!

Posted in Asp.Net on December 15, 2006 by Shaun

Microsoft Visual Studio 2005 Service Pack 1 has finally hit the streets, download it here.
I’ve only just begun testing this release so I’ve no gotcha’s etc… just yet, as always though you can expect to see them here as soon as I know of any.

AS with the Beta version you should expect the application of the patch to be a slow process, this patches almost every file in the application. I’ve not found a list of exactly what is included in the patch though so your guess is as good as mine.

Expect to see the Web Application project type fully included though, and if the beta was anything to go by you should ensure that the pre-patch version of the Web application projects add-in is removed before applying the patch, it’s less painfull if you do.

ASP.Net Ajax 1.0 RC released.

Posted in Ajax Links, Asp.Net, Atlas, Web Development on December 15, 2006 by Shaun

The final release of Microsoft ASP.Net Ajax 1.0 (formerly Atlas) grows ever nearer, the RC (Release Candidate) is out today and available to download from the Asp.Net Ajax website.

There are a few changes in this release so you need to read the documentation, specifically the docs covering converting from Atlas CTP to Ajax RC and Converting from Beta 2 to Ajax RC. There’s some new features in there too and the Whitepaper will cover these so more reading I’m affraid.

Not sure I’ll get round to checking this release out what with Christmas on the horizon and all but it’s looking good for the final release.

    

ASP.net Control adapters V1.0

Posted in Asp.Net on November 30, 2006 by Shaun

ASP.NET 2.0 has given web application developers a lot of improvements over 1.1 despite the buggy Development Environment. One of my favorites is the Control Adapter Architecture, this gives us the ability to change the way a control renders without going to the trouble of creating our own custom control to replace the control we want to tweak.

The process is actually very simple and the results can be extremely good.

One of the big applications for this is to implement a control adapter that will render markup that will be more CSS compliant or even rewrite the rendering so that instead of tables you render using UL and LI tags. In essence you get to take control of the rendered output rather than relying on what you get ‘out of the box’.

I won’t go into technical detail in this post as frankly there are better resources out there, but in order to take advantage of this technology all you need is an adapter file, simply a class that overrides the RenderContents method, this class needs to inherit the System.Web.UI.WebControls.Adapters.WebControlAdapter class.

Now you have part two of the two part partnership required to customize your control, part one is of course the control itself. To bring the two together we have a middleman that sits in the App_Browsers folder of your application. This .browser file contains the XML that maps the control to it’s adapter and is where a lot of the ‘magic’ happens. It’s possible, using this file, to map your control to different adapters depending on the browser ASP.NET knows to check the browser and will point the control to the correct adapter as required. The browser file contents look a bit like this:

    1 <browsers>

    2   <browser refID=IE6to9>

    3     <controlAdapters>

    4       <adapter controlType=System.Web.UI.WebControls.DropDownList

    5       adapterType=AlgSoftware.Web.Controls.Adapters.DropDownListAdapter />

    6     </controlAdapters>

    7   </browser>

    8 </browsers>

If you are interested in finding out more about this then I recommend you download the latest release from here, You may also want to read through Scott Guthrie’s latest post about the adapters, as always Scott has included loads of great info as well as all the links you’ll need to get on top of this technology and improve your applications.