Until The ServerSide .NET can post the sample code, I am posting it here
I am delving into WCF and AJAX (not at the same time) lately so I wanted to see if they were compatible. According to this whitepaper on ASP.NET (follow the link and scroll down to "Support for WCF Web Services"), the RTM of AJAX does not support WCF. It seems they removed it so they could make it work better in a later release. The promise is that by the Orcas release of VS, they will be compatible.
I've been scratching my head at the ASP.NET 2.0 TreeView control. This control is meant to show a tree of items and each item can have a link to it. For example, this is what I use for my menu on the left of the page.
Big thanks to Scott Guthrie in championing the Web Application for ASP.NET 2.0! I love using the old ASP.NET model (instead of the ackward Web Site project). I have now completely converted to the new format and I am very happy with the way it worked in almost every way.
I've blogged before about issues with the SqlDataSource. I've crufted up an example of the problems that can be downloaded here (with usual caveat of changing the connection string in the web.config to point to a DB with the Northwind database).
On Fritz Onion's blog, he mentions that the manuscript for Essential ASP.NET 2.0 should be done by Monday. I am itching to get a copy of that book when it comes out.
I've reworked my web site. It was looking a bit more like the uniform of a NASCAR driver than a web site, so I reworked the layout to make it cleaner. I admittedly stole many of my ideas from other web sites and templates I saw.
The other reason for the change was to eliminate ViewState. I noticed my pages ballooning from the sheer size of the HTML that was being generated, much of it as ViewState. I've eliminated ViewState in almost every case. For example, the size of the HTML of my home page was reduced from 134K to 48K. That's just HTML size, not images...so the real size change should be even more dramatic.
Trish and I are moving soon. She's been sending me links to rugs for our new living room floor. She found an interesting one today:
I recently was talking with a prominent developer in the Microsoft community as they were creating a new version of their website. They had used a code generator to create most of the code on the new site which I thought was cool, but I immediately wanted to know how much functionality was included. As I talk with other MVP's as well as Regional Directors, it seems that I am in the distinct minority. wildermuth.com is written almsot completely as custom ASP.NET code. Sure I used some components and started with someone else's HTML template, but most of the code is still C# to do much of the heavy lifting. Most of the people I talk with use community use pre-packaged systems to host their sites (including Community Server, DASBlog, etc.).
Why do I keep all that custom code? Mostly to allow me to try out new web techniques. I am facinated by CSS and like to learn how different sites do what they do. I also like to add new technologies as I can (e.g. Silverlight, LLBGenPro) as I learn them.
I was helping a friend out this evening trying to get a simple GridView working with a HyperLinkField from a database result and we ran into an interesting security feature that people might run into:
I just wanted to give a shout out to Andy Smith of MetaBuilders ASP.NET controls. I regularly use his DialogWindow and FirstFocus controls. He has a number of controls on his site that are just great, but I can only speak for those two. My $0.02 review of them are:
I hear from a lot of readers that they are creating 3-tier ASP.NET apps and I always wonder if they know where the middle tier is.
In my opinion, the web server is the middle tier and client tier is the browser. Creating another set of machines to host the data layer isn't really necessary and, in fact, hosting the data layer on the web server is easier to scale. We know how to scale out web servers. Inventing a new set of machines forces you to figure out how to scale them out and it does not increase your scalability by scaling out both the web server and a fourth tier.
I've been working on some ASP.NET 2.0 code for the last few weeks and ran into a bug that (in my opinion) is particularly nasty. If you are comfortable with the 1.x model at all, you're likely to run into it. In the 1.x model, all code-behind classes were compiled into a single assembly. So you could:
There are several blogs that have discussed how to share an auth cookie between sites in a farm and how to do a true single-signon for a domain. Mark Brooks pointed me to these that help a lot:
Now the trick is to do it between a 1.x and a 2.0 site in the same environment (but in different IIS Applications). The trick is to create a <machineKey /> entry in both web.configs. Pete Bromberg has a nifty little web page that will help you generate one to use for both:
Back in the day when ASP.NET shipped, I converted this site from the existing ASP based site. As an exercise to really bring in some new features I've wanted and to lose the ASP legacy (I actually still have a page or two that uses string concatenation to put together HTML Tables), I want to do a full re-write of the site.
I use a process where I begin with the requirements, then the data, then the code (no big surprises there). My goal is to blog through each stage of this process and hopefully help my readers learn a bit about an ASP.NET 1.x to ASP.NET 2.0 conversion.
For the new wildermuth.com, I have the following requirements:
I am sure there are more, but those are the core of the new requirements. Tune in tomorrow to start matching requirements with solutions...
I find it unfortunatle that Microsoft has made is way too difficult to write your own DataSource enabled controls. Deriving from DataBoundControl, but it still does not seem to be a way to synchronously get the data from the DataSource. In a DataBoundControl control you can get the DataSourceView like so:
This is freaking huge in my opinion. It seems that all the fuss about how hard ASP.NET 2.0 has made it for many of us has gotten through to the team (yeah!). You can download the Preview here:
As some of you know I lost the screen on my main laptop (HP ZD8000, a lovely machine at 13 lbs) so I sent it into support where they are going to fix it but take 2 weeks to do it. I took over my old laptop from my dear Tricia to try and make it work for a while.
To simplify her world, the laptop only had XP Home on it. After getting the 3,000 things installed I needed to in order to work on my current project I am going to have to upgrade it to Professional. The problem? ASP.NET 2.0.
TheServerSide.NET has finally put up the source code to my article. If you need a searchable Profile Provider for ASP.NET 2.0...check it out.
|Using Visual Studio Code for ASP.NET Core Projects (new)|
|Implementing and Securing an API with ASP.NET Core (new)|
|Building a Web App with ASP.NET Core, MVC6, EF Core and AngularJS|
|Building a Web App with ASP.NET5, MVC6, EF7, and AngularJS (Retired)|
|Best Practices in ASP.NET: Entities, Validation, and View Models|
|Front-End Web Development Quick Start|
|Lessons from Real World .NET Code Reviews|
|Node.js for .NET Developers|
|Application Name||WilderBlog||Environment Name||Production|
|Application Ver||22.214.171.124||Runtime Framework||.NETCoreApp,Version=v1.1|
|App Path||D:\home\site\wwwroot||Runtime Version||.NET Core 4.6.25211.01|
|Operating System||Microsoft Windows 6.2.9200||Runtime Arch||X86|