Rants Tagged with “.NET”

<<  <  4  5  6  7  8  9  10  11  12  13  14  >  >>  (Total Pages: 17/Total Results: 165)

My First Days with the RTM

It's been about four days working with the Visual Studio 2005 RTM, and other than the issues I've been kvetching about the last couple months, it seems pretty solid.  I haven't played with the SQL Server 2005 bits yet as I have a gig I am working on that doesn't require it.  I'll continue to blog here about my observations, but it does seem better than the RC...just not sure by how much yet.

Ian Griffiths on AppDomain Isolation vs. Process Isolation

Usually I don't like to link to mailing list archives, but this is an excellent reply to a question on the Advanced .NET Mailing list Ian explains this better that I have read before.  He covers why you would choose one over the other for the security and perfomance implications of each.  It's a must read IMHO.

WWF Now Unofficially WF...

Scott Woodgate has a new blog entry that explains that they didn't copyright the WWF (as they couldn't since the protracted legal battle that World Wildlife Fund won against the World Wrestling Federation {Now called WWE}).  I vote for a whole new name since Workflow doesn't quite explain it.  If Chris Sells is having trouble getting his head around it, us mortals might have trouble understanding its real implications.

How to share Forms Authentication between a 1.x Site and a 2.0 Site in the Same Domain

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:

The only thing left to do (and this is the magic really) is change the <machineKey /> on the 2.0 site to add a decryption attribute.  This is a new attribute that is only supported on 2.0.  You need to specify the decryption attribute because the decryption method changed between 1.x and 2.0.  So for your 1.x site, the <machineKey /> would look like so  (not my real machine key):

<machineKey validationKey='301B0898AB6288CA285641FC1DAB5653B8EC18E212A05FC20AA775383EEBF84428FD68BBD09E4FAE8E921A30E69F443D320541EEF272B322FA819035333E712C'   
            decryptionKey='096C74A8F465A5CFD629CAB61D9DD77651957F100406124F'
            validation='SHA1'/>

But for the 2.0 site you just need to add the decryption attribute and specify 3DES (which was the 1.x default):

<machineKey validationKey='301B0898AB6288CA285641FC1DAB5653B8EC18E212A05FC20AA775383EEBF84428FD68BBD09E4FAE8E921A30E69F443D320541EEF272B322FA819035333E712C'   
            decryptionKey='096C74A8F465A5CFD629CAB61D9DD77651957F100406124F'
            validation='SHA1' decryption='3DES'/>

New Article: "Creating a Custom ASP.NET Profile Provider"

My first article for The Server Side .NET.  It covers how to write your own Profile provider and includes a sample provider that allows simple searching.  Hope you enjoy!

Compile ASP.NET 2.0 Site to One Assembly!

Scott Guthrie has new this response on the asp.net forums to the issue of each page compiling to its own assembly (which has a number of issues that I won't belabor here).  He announces that when VS 2005 is released, there will a tool that can be used in build scripts (but not debugging I'd guess) to merge all your assemblies into one large assembly.  One file deployment of a website?  Yeah!

Nasty ASP.NET 2.0 Bug...Postponed?

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:

MyCodeBehindClass ctrl = (MyCodeBehindClass) LoadControl("...");

In the 2.0 model, each page/control is compiled into its own assembly!  so your LoadControl doesn't know about unless you move the codebehind into a further class in the AppCode section of your website. 

Here's a response from MS in the ASP.NET forums:   http://forums.asp.net/928782/ShowPost.aspx#928782.  Also, the URL link above is the actually lady bug that they've marked as Postponed!

This seems like such a hack and is making me wish more and more for a 1.x compatibility mode.  I know of several users who are running into this with migrated projects, but it happens in 2.0 projects all the time (and the errors produced are not helpful in figuring out what went wrong).

So ASP.NET team, please tell us why this is a better model?  Please don't tell me its because you wanted to appease the ASP people in letting them drop new aspx files into fileshares.  While this is laudable, it should not be the default behavior.  It makes no sense in most large-scale web projects. 

Problems Creating Custom DataSource Enabled Controls in ASP.NET 2.0

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:

DataSourceView view = this.GetData();

Great!  Except that to actually get the code from the view requires you call view.Select() which is asynchronous.  Luckily for Microsoft, their controls use a friend/internal method called ExecuteSelect().  If you look into the code that the GridView, FormView and DetailsView use, they don't call it asynchronously, but you have to ;)

There was a LadyBug filed...but was marked as "We're not taking new suggestions for Whidbey any more". 

That leaves the control designer with two options, call it asynchronously or use reflection hackery to call ExecuteSelect.  ARG!

Visual Studio Beta 3?

There is a suggestion up on the LadyBug site to support a Beta 3 of Visual Studio as some developers are worried about the quality of the Beta 2 (and I assume the CTP's as well).  If you have an opinion (I have one), please go there and Vote.  The sheer size of the votes will help Microsoft determine if it is a fringe group believes there are issues or whether a Beta 3 is really necessary.  Please make your opinion known!

My First XAML App...

It's not finished yet, but I am working on a Font Browser using Avalon.  It's fun to work with XAML and code-behind, but without splitter or treeview controls its hard to make something really fun.  I am also working on a database browser with Avalon, but until I find a tree view that project is dead.

I will post the font browser this weekend.