Web Dev/ASP.NET/C#



News has it that Microsoft Live will be came to be used as an OpenID server so that you can use your Live ID to log into any OpenID enabled site.  That is good, BUT…  What about the other way?  Will this deal be just like Yahoo! where you will be able to use them as an OpenID server but not be able to log into them by OpenID? Come on you big guys quit playing games and allow use to use OpenID to log into Microsoft live, Yahoo! and Google!  Is that so hard?  OpenID NOW! ...




It appears Netflix has released a public API to access their information.  I have not had the time to full investigate their developer pack, but here is the link: http://developer.netflix.com/ There is a post about it here: http://josephsmarr.com/2008/10/01/using-netflixs-new-api-a-step-by-step-guide/ I do have a few ideas how I might use this in the future.   Now if I can just dig around here and find the time for it :)




For those that are unfamiliar with Odiogo, it is a site that provides free text-to-speech abilities to your blog and does a pretty good job!  The site takes your RSS feed and converts all the articles in the feed to MP3s.  It also gives you the ability to add a “Listen” button that makes it easy for people to listen to your posts.  This post will show you a method to insert the Odiogo “Listen” button to all your posts automatically.  The method used here is kind of hacked together, but seems to work.  There may be easier...




As a developer, it is obvious that Silverlight is HOT now that 2.0 betas are flowing.  There is a ton of information coming from different sources along with many demos / tutorials.  It kind of makes you wonder if WPF will remain a top-level technologies or perhaps in the future it will be absorbed into Silverlight, with all the pressure from other competing technologies for cross platform stand alone applications. Anyway, amongst all the info out there, AppDev is providing four hours of free Silverlight 2 training.  Here is the blog post I found about it: http://weblogs.asp.net/lduveau/archive/2008/07/16/4-hours-of-microsoft-silverlight-2-training-for-free.aspx   When was the last time...




Wow!  That is about all I can say, Wow!  I can even say it backwards Wow! Yahoo! is now going to support OpenID for its services.  That means millions more people will be using OpenID every day.  This could be just the boost OpenID needs to jump into prime time and consume the lead in login systems.  I know I am ready!  I have wanted OpenID to take over for some time now.   It is a simple and easy method for the consumer along with making life a LOT easier for webstie owners. WIll have to check into the state of OpenID...




Found this set of articles on LINQ to SQL.  The articles contain some interesting concepts and a good overal! Part 1: Querying View entities (ObjectDumper) View SQL statements (Log & Visualizer) Local data shaping Non-mapped properties in partial entity classes Object Relation Diagram versus Class Diagram Data shaping with non-mapped properties Change tracking Bulk operations http://www.scip.be/index.php?Page=ArticlesNET02&Lang=EN  Part 2: LINQPad Inheritance ...




Looks like Microsoft added so many features to Silverlight, they are setting it now as version 2.0.  More info in my post at: http://www.SilverlightCity.com  




Some have run into the problem where you try to use the "(?i)" in a ASP.NET RegularExpresssionValidator to ignore case in the search.  JavaScript does not understand this and will generate an error on the client side, while it still works as expected on the server side.  I do not know of a method that will allow a search to be case-insensitive by supplying a regular expression to JavaScript, due to the "i" flag being a modifer and required to be supplied as a parameter to the RegExp().  So, the soution I came up with is to replace the ASP.NET "RegularExpressionValidatorEvaluateIsValid"...




Are you planning to upgrade your Visual Studio 2008 to the RTM version?  You need to plan some time to fix a few breaking changes.  When I first started upgrading some of my sites: www.SilverlightCity.com www.TheSilverlightDirectory.com www.TheWPFDirectory.com www.WhatsNewLocally.com I found this link useful: http://weblogs.asp.net/bschooley/archive/2007/11/21/converting-web-site-projects-from-visual-studio-2008-beta-2-to-visual-studio-2008-rtm.aspx The post details changing the DataSetExtentsion referrence from 2.0 to 3.5 and changing LINQ 2 SQL Add/Remove method name changes, OneValidate method change and how to change your *.dbml files to load in the designer.  




This is an older article I happened to find recently that opened a few more areas of thought about LINQ.  Yes, I know LINQ is used for many things, not just data storage, XML or easy of collection handling.  That said though, I really did not thnk about it in the use of a type of logic parser.   What a good idea! This is article gives examples of how to use LINQ to reduce the coding and complexity of scoring Yahtzee results on dice.   Pretty cool! http://www.c-sharpcorner.com/UploadFile/mgold/Yahtzee LINQ07222007010520AM/YahtzeeLINQ.aspx  




Scott Guthrie has just listed part 1 of a same e-commerce storefront application using the new ASP.NET MVC framework to show off how to put things together.  Give it a looksie.. : http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx    




The word is out!  The next version of Silverlight will show why the current 1.1 is called alpha.  The juicy little taste that came out today points to Silverlight 1.1 having "many, many, many, many big features" along with new controls, layout, template/styling, databinding and much more.  Even supposed compatibility with Windows 2000! It looks like Silverlight 1.1 Beta will bring Silverlight Primetime!  I posted more information on : http://www.SilverlightCity.com  




I was pointed to a video on the new MVC for ASP.NET that came from the ALT.NET conference.  Scott Guthrie gave a preview of the new MVC for ASP.NET.  It is an interesting video and shows the drive to give more accountability to web applications using unit testing and a greater level of structure.  Here is the link: http://www.hanselman.com/blog/ScottGuMVCPresentationAnd ScottHaScreencastFromALTNETConference.aspx The biggest problem that hit me is the that there is no postback on the views.  Yes, I understand that the controller should handle those issues, it is a bit rough when you speak of web technologies such as Ajax with partial...




This last week Microsoft released the Windows Liver ID Authentication SDK so that you can now authenticate users by their Windows Live ID (passport revisited).  I was wondering just how easy/hard it will be to use and found that from that looks of it, the system is simple to get up and running.  Here is the post on Dan Wahlin's blog that makes it quick work: http://weblogs.asp.net/dwahlin/ archive/2007/08/17/ integrate-windows-live-id-authentication- into-your-website.aspx  




Managed to get the new http://www.TheWPFDirectory.com site launched today!  Does not have a lot of content yet, but hopefully soon, takes time. Now we can add that to the others that recently launched: http://www.TheWPFDirectory.com http://www.TheSilverlightDirectory.com http://www.SilverlightCIty.com Yes, they all seem to have a similar look :) Hopefully this fall we will get http://www.DevsForHire.com up and running!




Just launched http://www.TheSilverlightDirectory.com site today!  It has been a bit of work, but the site appears to be fully functional. If you happen to run into any issues, but sure to let me know! Now the real works begins, adding all the content.  Looks like a busy time for a couple of weeks If you happen to have or know of an article, product, tutorial, demo or even websites and blogs that are focused on Silverlight, adding them to the listing would be appreciated!  BTW, the http://www.TheWPFDirectory.com site will launch on July 30th.  It will have the same looks and features as the...




Just spent a number of hours trying to figure out why my Linq was not updating my foreign key when adding a record with a one-to-one relationship.  Do not know if it is an issue or by design, but it took me a while to try the obvious.... Here is the simple tables I was using in this test:     Table Contacts (    Contact_ID [int] IDENTITY(1,1) NOT NULL,    CreatedAt] [datetime] NOT NUL,    FullName [nvarchar](128) NOT NULL, CONSTRAINT [PK_Contacts] PRIMARY KEY CLUSTERED (    Contact_ID ASC ) Table Comments (    Comment_ID [int] IDENTITY(1,1) NOT NULL,    Contact_ID [int] NOT NULL,    LastEditedAt [datetime] NULL,    Comment  [nvarchar](1024) NULL,  CONSTRAINT [PK_Comments] PRIMARY KEY CLUSTERED (    [Comment_ID] ASC,    [Contact_ID] ASC )  Table AdditionalInfo (    Contact_ID [int]...




Well, after a bit of work, Silverlight City (http://www.SilverlightCity.com) has finally launched.   It is basically a never ending thread of posts about blog posts, articles, or resources all about Silveright.  Got some juicy info on Silverlight?  Drop by and add a post all about it!   




Plan on getting your feet wet in teh Linq waters?  There is a ton of information out, some old and some new with some just out-of-date.  Over the last week while digging into Linq, I found that simple information is rare while more advanced is fairly common.  As an example, I was looking for a way to issue a update to a single field in LInq 2 SQL without having to read the record first, modify it and then use the SubmitChanges() method.  Af a few hours of searching (was tired, it did not help), I found the obvious, that...




I ran into another problem with Linq and the Orcas beta 1 of Visual Studio.  It seems the code generated for your data classes may not contain a limiter on update checks which can give you the error: "SQL Server does not handle comparison of NText, Text, Xml, or Image data types" In my case, the field was a nText data type.  In the designer I can see that it is set to "Update Check" as "Never", but it appears that does not get saved in the code.  To solve the issue, I simply added the setting manually to the generated code on...




Linq is pretty cool along with Linq 2 SQL.  Although  I have actually not read a great deal on Linq, I jumped in and started building out a  project to test the waters.  Much easier to see how much you can pick up before formal study. Well, many things just clicked and I found quite of bit of it fairly easy.  Select, insert, update, delete all pretty easy.  For the project I did not want to turn to one SQL statement, no stored procedures or anything like that, just the Visual Studio Orcas and Linq. I got hung up on a simple...




Although I have been working with .NET 3.5 and the Orcas for a little bit, I did not happen upon a cool feature of C# 3.0.  Automatic Properties. In the old days of C# (for most of us, within the last six months) we would write a propery such as: private int myProperty; public int MyProperty {      get      {           return myProperty;      }      set      {           myProperty = value;      } } While it is trivial, this has taken up some time just in typing, not to mention code making the code longer.  Well, C# 3.0 now comes with Automatic Properties that you can define such as: public int...




The next version of Visual Studio will bring all kinds of new goodies.  One is .NET 3.5 (maybe 4.0 by then) which will include two new controls for ASP.NET developers, the ListView and DataPager controls.  My first look at these controls had a few errors, but I quickly go the idea.  Here is the example I tried, which simply reads my RSS feed from http://blog.silverlightcity.com and displays the items. The first step is to create the web form and then drag a DataPager control and the ListView control followed by another DataPager control.  I configured the ListView control to use an XMLDataSource...




Today I was browsing around for things "Silverlight" and ran into a new service coming out from Microsoft called Popfly.  At first it just seemed like a place for kids to do mashups.  After watching the video though, I wonder where this is going and just how it will relate to developers.  It is not that I think it will take our work away, but it might be another door performing more projects.  At the very least, it is a good example of the basics of Silverlight. I have posted more on teh Silverlight blog at: http://blog.silverlightcity.com/archive/2007/05/21 /Popfly-Check-this-out.aspx  




Well, once Silverlight was announced by Microsoft, I quickly tried to grab some of the domain names I had been waiting to get.  My first choice domain name was SilverlightFiles, but it had already been taken (actually, my registrar did not find it taken when I ordered it but by the time they got the order through it was already taken).  One of the domain names I managed to get that I have planned to build out is: http://www.SilverlightCity.com While I do not have the site built out at this time, I do have the blog of the site running at: http://blog.SilverlightCity.com The plan...




This is cool news!  Not sure how I missed it, but there is a port of OpenID consumer and server in this Google project: http://code.google.com/p/dotnetopenid/ Today, I was working on the structure for my Devs4Hire.com site.  I really wanted to use OpenID for the site, but was not sure.  After this news, I think I will use OpenID for the login processs.  Should help to ensure no stolen user name/passwords. Now we just need a few big fish to use OpenID such as Google, Yahoo, eBay, etc.  




As might be obvious from my posts on web standards, there are some issues I really hate.  That said though, one of my biggest headaches comes from all browsers not being compliant with the standards already in place.  If tomorrow, the major browsers became compliant with all the standards, most developers would still be faced with supporting prior versions for at least a few years and possibly up to five or more years.  I am just currently cutting up IE5 and below.  At the present rate it looks like it will be another twenty years before we see all today's...




I really tire of dealing with so called “web standards”.  Why cannot the browsers authors come together and finally make something that works.  At the same time, “fix” the so-called standards, such as the stupid box model!  Why not have a layout element working as grids of various cell dimensions, borders and padding?   After years of battling these “standards”, I am getting frustrated at the amount of wasted time trying to make things work in different browsers and attempting to use the fragile web standards.  If it were up to me, I would scrap the standards and make IE the...




If you already know about OpenID, you might want to skip ahead to "More Thoughts" What is OpenID? OpenID is method to authenticate users on your sites.  While it can do more, it allows for a single sign in for various websites.   Under this system, a user simply uses a URL as their sign in for the site, which website will redirect the user to for signing in.  The URL is the address and often user identifier, of an OpenID server that controls their identity.  The user can then use SSL to sign into the OpenID host and then is referred back to the...




For those that do not already know, the next version of Visual Studio will pick up some enhancements to the web editor.  It seems that a great deal of the functionality of Microsoft's new Expression Web editor will be built into the next version of VS. Personally, I can hardly wait.  Just the one feature of having a split window to see code and design view at the same time would be nice, but after working with Expression Web a bit, the CSS manager will be of a great help! Scott Guthrie put out a video on LINQ with the VS Orcas...




When I made the move to Vista a little while ago, one of the key features I could hardly wait to get my hands on is IIS7.  Well, I fumbled along getting things working with Visual Studio and getting my dev environment going.  Sure wish I would have seen this article by Rick Strahl first, as it would have saved some time! http://www.code-magazine.com/Article.aspx?quickid=060103




It seems Microsoft has a bug in their ASP.NET RewritePath function.  For some reason it will generate form action tags with leading “../” if a certain user agent is used to access your site (such as the Google Bot and other search engines).  This not only generates the error but returns a 500 error to the browser.  This is also a problem only in the production code. Oh, the number of hours I wasted trying to find this HttpException with the great description “Cannot use leading .. to exit ta above the top directory“.  I searched for hours and never code...




Here is a bit of the original error message: Server Error in '/' Application.Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey...




Have you been looking at the different versions of Visual Studio and wondering what is the real differences?  Well, for some time I was wondering what the differences of the Standard version compared to the Professional or Team Solutions versions. http://msdn.microsoft.com/vstudio/products/compare/ While the site above shows some of the differences, there are some items I was not sure about such as the missing “Server“ node, “Sql Server 2005 Integration“ and mostly, the “Simplified menu options and defaults“.  The latter, had me wondering if the Standard version would have the same menu options as the Express versions.  The simple answer is no. First, here is...




Google has a beta launch of “Google Sitemaps”: https://www.google.com/webmasters/sitemaps/ Sitemaps is a feature of Google to list all the URLs on your site making it easier for Google to index your site.  Not only does it make it easier to index, it allows you to specify where the pages are so that you are insured Google finds all the pages you want them to find.  In addition to setting the location of the pages, you can specify the last date the page was modified, a value to specify the frequency the page updates along with a value specify the importance of the...




Ever have those times you are in the middle of a project and want to test out a simple one or two line method just to make sure your brain cells are still flowing, but you do not want to create a temp project just to test those few lines?  For some time now I have used the Snippet Compiler: http://www.sliver.com/dotnet/SnippetCompiler/ For just those situations.  You do not have to make a project or even save a file, right there in its basic IDE, you have the frame of a console app ready to go, just plug in your lines of code...




After spending many many many many - opps got stuck there - hours this last week trying to make a simple website xhtml 1.0 compatible across major browsers I have come to the point of wonder why we need to waste all this time. The Story: I managed to get the site looking good and working correctly under FireFox.  Then tried in IE and boom, there were several issues.  Fixed those and it rendered well on both, so I then tried Opera... Yep, looked like garbage.  One of the things I found was that for SOME reason Opera ads a margin...




The news is out, you can add a file to the root folder of your ASP.NET 2.0 called "app_offline.htm" and it will shut down the site and respond to all calls with the contents of the "app_offline.htm" file.  Now, how cool is that?  http://weblogs.asp.net/scottgu/ archive/2005/10/06/426755.aspx Normally, I keep a second website in IIS that is shut off until I need to do updates, which I would stop the real site and then start the offline message site until I was finished and then switch back.  With this new feature I no longer have to go through those hassles, all I...




Somehow, I have missed news about the new IIS version 7 coming soon.  When I noticed a video about new version, I had to drag myself to watch, I just thought it would be a few security or performance enhancements, after all it is the web server and seems to be full featured already right?  Wrong! http://channel9.msdn.com/Showpost.aspx?postid=109430 I was amazed at the new features they are adding to IIS.  If they added nothing but the ability to keep your site settings all in your web.config file, that would have been enough.  Microsoft is going far beyond that! It was not long ago, I...




Visual Studio 2005 Beta 2 has a huge number of cool features that can really make your life a lot easier.  On the other hand though, it is 'beta" software and contains numerous bugs and unconventional features that hopefully will vanish in the release. During the process of converting one of my web applications over to this new technology, I ran into a number of problems that usually requiring searching the web for many hours trying to track down the problem and the fix.  Many of these problems will supposedly be fixed on release. Today's problem is relating back to the new...




As I mentioned in a post about Visual Studio 2005 Beta 2, I recently converted a small ASP.NET 1.1 project to a 2.0 project.  While I had a number of issues with the conversion, there was a change in ASP.NET 2.0 that cost me a bit of time to figure out what happened. It seems that in ASP.NET 2.0 they have decided to kill ViewState for read only controls (at least the Textbox that I used).  That is, Textboxs for example in 2.0 do not persist their values in Viewstate if they are marked as read only.  Let us say you...




After having the Visual Studio 2005 Beta 2 for several months, I finally got around to trying out ASP.NET V2.0 and converting a small application over to it. The conversion did not go too smooth.  The project uses URL Rewriting and a custom form tag to strip the page name from the form action.  The custom form tag allows the page to postback without having the URL in the address bar of the browser expose the true page name the browser is viewing.  An example would be pages: MyWebSite.com/Home/ MyWebSite.com/About/ MyWebSite.com/Services/ In each of these folders is a default page.  When someone uses the...




There is output compression built into IIS 5.0 and later, but it is disabled by default.  Below is instructions how to enable it. With HTTP Compression enabled, IIS will compress with “gzip” or “deflate” the file types you list as it feeds the page to the browser.  On the client end it will decompress the file and will act as if it read the entire uncompressed file.  This is built into most late model browsers.  If it feeds a page to a browser which does not support compression, it will send out the uncompressed page. I have this setup on my sites...




My original .Text blog handles all my posts and any topic.  I decided to split the blog up and have just a Dev blog. Over the next few weeks I will begin to get some posts in here. One of the posts I plan for this space is a new DNN generic data store module I am woking on that allows a person to design new modules without the need of specific database data stores (tables, stored procedures, etc).  This means modules will be able to function on different databases without change.  Anyway, more on this coming shortly along with the free...