Category Archives: dotNET

How FAJAX saved my website – goodbye refresh flashing!

I remember Steven Smith sitting right here in my office over in the LazyBoy chair behind me a few winters ago suddenly saying “wow, look at this cool effect” and showed me a website that had pages fade in and out of each other. By the next day ASPAlliance had the same effect!

You see it a lot on sites now. Leon Bambrick wrote a funny post showing how the use of this can eliminate most of the awful page refresh flashes. He called it FAJAX (as in Fake AJAX), since it accomplishes in two lines of html much of what AJAX is aiming for.

I have spent a lot of time fiddling with the new VTdotNET v.2 site’s caching and performance. Not that I expect Amazon.com-like usage, but it’s my learning playground. But in the end I still had those godawful flashes with the entire screen, even what should look static between pages, blanking out when I went from one page to another.

So I just went over to Leon’s site, googled AJAX and found that post quickly.

After implementing FAJAX, it made a 100% difference!



Don’t Forget: www.acehaid.org

Using your own sql database for ASP.NET 2.0 membership

I seem to be getting this question through my blog and elsewhere often enough to justify a post about it even though there are many great (and more detailed) articles on this topic.

How do you use your own SQL database for ASP.NET 2.0 Membership instead of the default SQLExpress database.

The default db is configured under the covers as a membership provider. What you need to do is override this in web.config. Note that you will have to do this for roles and personalization as well if you are using that.

Start by ensuring that your connection string is set up in web.config.

    <connectionStrings>
        <add name=”MySQLConnection” connectionString=”server=MyServer;Trusted_Connection=true;database=myDB”/>
    </connectionStrings>

Inside of the <system.web> section, you need a membership provider section. I am using code from this msdn document as a base. The membership section is told to use the provider named SqlProvider as the default. This provider is defined inside of the inner section “providers”. The “remove name” element gets rid of the that AspNetSqlProvider that is set up by default when you start configuring membership in the ASPNet Web Site Tool. Then the provider with the name SqlProvider is created. You can create many providers if you like. 

Drilling further in, notice hat this provider is pointing to the System.Web.Security.SqlMembershipProvider class. That tells the provider what implemenation to follow. That is where everything abou memebership happens such as logging in, getting users, etc. You can even extend the existing providers or just write your own. In that case, you would have your own class as the value of the type for the provider.

Next you will see a ConnectionStringName parameter. This is where you plug in the name of the ConnectionString that you created above.

        <membership
             defaultProvider=”SqlProvider”
             userIsOnlineTimeWindow=”20″>
             <providers>
                <remove name=”AspNetSqlProvider” />
                <add name=”SqlProvider”
                    type=”System.Web.Security.SqlMembershipProvider”
                    connectionStringName=”MySQLConnection”
                    enablePasswordRetrieval=”false”
                    enablePasswordReset=”true”
                    requiresQuestionAndAnswer=”true”
                    passwordFormat=”Hashed”
                    applicationName=”/” />
            </providers>
        </membership>
    </system.web>
</configuration>

Note that if you are using roles or personalization in your site and you want that to be tied to your database as well, you will need to similarly configure

<roleManager>
  <providers …>
</roles>

and

<webParts>
  <personalization>
     <providers …>
  </personalization>
</webParts>

That should get you started!



Don’t Forget: www.acehaid.org

ASP.NET 2.0? Don’t forget to check cross browser support!

I did. For shame, eh?

I have been playing with a new Vermont.NET user group website and using lots of new asp.net 2.0 UI features.

I put it up and quickly got a reminder from ASPInsider, Aaron Seet, (who I’m grateful to for checking) that there were some messy areas when he opened it up in FireFox.

I don’t, well didn’t, even have FireFox on my computer. So I downloaded it and saw the mess right away. I wasn’t sure how to fix it at first, but after looking at that page in the designer for a while, I finally saw the problem. I had DIV tags that had a default height in them. When the actual content made the div larger than that default height, I.E. made the adjustment. Firefox didn’t and the content hung over the bottom of the div into the element below it. I removed the height parameters and all was well.

While I was at it, I checked the html for XHTML compliance. You can do this when in source view by changing the drop down from it’s default of Internet Explorer 6.0.

I cleaned up my html with alt’s in my images and more. I had a few i.e. specific things that I left in  such as setting the non-xhtml img border parameter to “0” so that hyperlinked images don’t get a big ugly border around them.

I’ve discovered a few other things I’m doing on the site that don’t work in FireFox. For example

  1. You can’t move ASP.NET 2.0 web parts around in FireFox. However, if you move them around in IE, the positions are stored to your user account and displayed properly in FireFox when you are logged in.
  2. I have some groovy little popup divs that are driven by html and javascript. If you go to the site in i.e. you can see these in action. There are little question marks on the page. Hover over them and you will get info on the ASP.NET 2.0 (or other interesting) tool that is used in that section of the page.
  3. I have a telerik r.a.d.panelbar on the book reviews page. That is awfully funky in FireFox. I’m sure I just have to change a few parameters and will deal with that after I get some client work done.

Bottom line is don’t assume that even .NET developers are so Microsoft-centric that they wouldn’t dream of using a non-MS browser. ๐Ÿ˜‰ And don’t be so darned lazy. Look where it got me! Spending a beautiful Sunday afternoon working on my user group’s website. Okay, I’m kidding about the nice weather.



Don’t Forget: www.acehaid.org

www.vtdotnet.org v2.0

I finally put the new ASP.NET 2.0 version of the Vermont.NET website up.

I have been using it as a playground to finally fiddle with the new UI stuff as well as recently released projects.

I have not moved all of the content over from the original site.

It doesn’t have any Atlas on it yet, but give me time. ๐Ÿ™‚

There is a page called About this Site that highlights all of the features I experimented with for the site so far.



Don’t Forget: www.acehaid.org

Portal night at Vermont.NET – June meeting

The June meeting of Vermont.NET will be “portal night”.

We have Dave Burke of telligent doing a talk on Community Server.

Paul Swider, from Burlington based OnClickSolutions will do a talk on Sharepoint.

Jon Limmer of Green Mountain Beverage, a company whos main website is based on DotNetNuke, will demo DNN for us.

This should be cool! Especially for Vermont geeks who aren’t going to TechEd. (I’m planning to drive down Tuesday morning.)

The meeting will be Monday June 12th at 6pm at Champlain College. I will get the info onto our website shortly.

Don’t Forget: www.acehaid.org

Vermont Ruby on Rails – New User Group! (and a recap of local user groups)

One of the Vermont.NET members, Sergei Serdyuk, has started a new user group for Ruby on Rails in Burlington.

The site is www.vtrails.org and the first meeting is June 6th. See the site for more information!

There are now 5 technology user groups (that I am aware of) in Burlington.

  1. Vermont.NET
  2. Our little sister, VTSQL.
  3. Green Mountain Oracle User Group
  4. Vermont Flash User Group
  5. Ruby on Rails

Outside of Burlington there are two more that I know of:

  1. NH/VT Upper Valley Microsoft Consultant Group
  2. Northern New England Macromedia User Group

And, one big cross technology group where we can all come together to talk about our business:

Don’t Forget: www.acehaid.org

Vermont Software Developer Alliance May Meeting with Thom Robbins from Microsoft!

www.vtsda.org

Wednesday, May 17, 2006

Speaker – Thom Robbins, Microsoft New England
Topic – Trends in Software Development


Software development is changing at light speed. Gone are the days of single person development. Team based development with faster cycle times and quality code are becoming a driving force in the industry. Of course that doesnโ€™t negate the need for security and standards. Well it may look murky but there are several trends that every software developer should keep an eye on as they build their careers. Join us to see what the future may hold.

Thom RobbinsSpeaker Bio: Thom Robbins is a Developer Evangelist with Microsoft in New England, and part of the MSDN Developer Program. He is a frequent speaker at events, including VS Live. Thom is also a regular contributor to various magazines including Visual Studio.Net, .NET Magazine and XML Web Services. He spends his time working with developers in New England. When not writing code he spends his time with wife Denise at their home in New Hampshire.

Date:    May 17th, 2006
Time:    12:00 – 2:00 pm
Place:    Courtyard by Marriott
            175 Hurricane Lane
            Williston, VT

Plenty of free parking
Map & directions

Agenda:
12:00 – 1:00      Lunch and Informal Networking
1:00 – 2:00        Presentation & Discussion

Lunch will be provided free of charge to members who RSVP at least 24 hours prior to the event. Non-members who RSVP at least 24 hours prior to the event can pay $10 which will cover the meeting cost and lunch cost.  To RSVP, please email [email protected]. Alternatively, feel free to bring your own lunch.

Three copies of Eric Sink’s “The Business of Software” will be given away to lucky attendees.  Thanks to A Press for donating these books. 
The Business of Software