Archive for August, 2007

Free Silverlight Training Session.

Since announcing support for  silverlight hosting we’ve had a great deal of interest in it by developers and designers alike. I think we’ll see some really great things out of the developer community on silverlight in the very near future.

Today I learned that MSDN is offering a free half day training event and one of the topics is Silverlight.  You can get more information on this event at: http://www.msdnevents.com

As I learn of other training and information offers I’ll post them as well.

image.png

Holla at ya favorite blogger! Thanks to AIM WIMZI

So we can’t just pick up the phone to say “WAZZUP” (like mario and the boys above) in the blogosphere but thanks to AOL’s AIM WIMZI widget you can carry on a livechat with your blog visitors.

Embedding your own Free AIM livechat in your website

imageAOL/AIM is providing a web widget that you can embed into your website very easily using either HTML or Flash.  by using their simple web wizard it’s as easy as cut and paste to integrate into your website.

The nice thing about WIMZI is that it ties back to your AIM IM account and you receive IM’s from the web widget in your normal AIM app.  

 

 

See AIM WIMZI in action right here.

 

image The WIMZI is embedded in my blog at the footer. To integrate WIMZI with WordPress I used a HTML widget and just copied and pasted the HTML in. I’m using the flash widget because it seems to be pretty widely used.

Windows Sharepoint Services (WSS) File Extractor

We recently needed a way to extract files from a sharepoint site’s document libraries. With sharepoint all the files are stored in a SQL database so it would seem connecting to the database and pulling all the files out manually wouldn’t be such a hard thing to do. After a fair amount of time googling for such a solution I finally found it over at Mark Jen’s blog. Mark’s solution it turns out didn’t work for WSS 3.0 but in the comments a fella by the name of eric writes:

I have modified the code to work with SharePoint 07. Since the Content is stored in a new table with 07, the query piece needs to be a little different. Just replace line 24 with the sting below. It worked perfectly for me after that.

Find
com.CommandText =

links for 2007-08-15

Are You Getting ViewState Errors like: "The viewstate is invalid for this page and might be corrupted."

If you’re seeing viewstate errors like “The viewstate is invalid for this page and might be corrupted” here’s the dealio.  For security ASP.NET encrypts the viewstate using an Autogenerated Key that is generated when your application pool (or worker process) is started. At AppliedI.net (and many hosts today) each website is placed in a unique application pool so your site is isolated from the other sites on the server. If your application pool recycles for whatever reason, the viewstate key will change and when you go to post back to your application is may fail with the gloriously informative error of:

“The viewstate is invalid for this page and might be corrupted”.

What’s causing the application pool to do this?

Your application pool is recycling due most likely to a couple things:

  1. you edited your web.config and that caused the change (not likely)
  2. IIS was reset on the server and that caused the change (less likely)
  3. Your application errored out causing the application pool to recycle (possible)
  4. Your application pool reached a memory limit and was forced to recycle (I put my money on the #4 horse to win! this is probably it)

All hosts today that use dedicated application pools, isolated application pools or “website sandboxing” whatever they may called also set a memory limit on the application pool in shared hosting, some set it more aggressively than others.  The advanced web applications of today are using more and more resources as they are more and more complex, it’s not uncommon to find a web application using anywhere from 150-350MB of memory today, although the average is still just in the range of 80-120MB. 

 

The good news is you have options on how to get around this. 

  1. You can upgrade your shared hosting account to an account that has a higher memory limit. At appliedi.net we offer 4 different shared hosting accounts each with separate memory limits.
  2. You can upgrade to a VPS hosting account or dedicated hosting account and set an even higher memory limit.
  3. You can completely disable the viewstatemac by adding “enableViewStateMac=”false” in your web.config. This would be a bad thing though and you can google viewstate injection for why this is bad.
  4. You can generate a predefined key and stop using the default autogenerated key method.

#4 is probably the route you’ll want to go. My recommendation is to go with #1 first and not just because I work for a hosting company and want to see you spend more money per month. I recommend you upgrade your hosting account to an account that has a reasonable memory limit for your application because every time that application pool recycles your site is going to be slow as it recompiles and initializes the application.  You also just lost your session state information so if you’re an ecommerce site and your client was in the middle of a checkout, they probably just lost their cart contents and have to start over.

Creating a predefined viewstatemac key

The guys over at www.aspnetresources.com have a keycreator tool that makes generating your own predefined viewstatemac key effortless. To do this you’d do the following

  1. visit: http://www.aspnetresources.com/tools/keycreator.aspx and use it to build a key
  2. Copy this key into your applications web.config file between <system.web> and </system.web>
  3. Save your web.config file and test your application to make sure it still works. If for some reason it doesn’t work, you can delete the changes and revert back.

Where to learn more

There’s always google. But Microsoft has a pretty extensive article in their KB at: http://support.microsoft.com/default.aspx?scid=kb;EN-US;829743 that will also help. If this sounds like something that’s happening to you at AppliedI.net on your ASP.NET hosting account please contact our support team and they’ll be happy to help you troubleshoot the issue.