ASP.NET 4.5 beta is finally here!

Michael OssouThis is the blog post you have been waiting for. Well, maybe not, but its the blog post I look forward to writing. If you are an ASP.NET developer, this is an exciting time, because we get the new version of the framework that we will be working with for the next X number of years. You can look at the complete ASP.NET 4.5  features and updates list for yourself. This post is about some of the features I think our hosting customers will be happy to hear about.

First off there are a number of performance improvements specifically related to ASP.NET hosting. So out of the box, this version of the runtime should provide performance improvements. Thats always good news. One of the primary improvements is the introduction of Multi-Core JIT compilation. This means an uncompiled application will spool up much faster the first time it is run. With that out the way, lets look at some specific features and why we like them.

Asynchronous Improvements

We can now asychronously Read and Write HTTP Requests and Responses. HttpRequest.GetBufferlessInputStream now has BeginRead and EndRead methods. Conversely, HttpResponse now has BeginFlush and EndFlush Methods. Additionally, there is now support for await and Task-Based Asynchronous Modules and Handlers.

Request Validation

Out of the box, the popular AntiXSS library is included. We also gain support for “lazy” validation. Previously when request validation was invoked, everything in the collection was validated. With “lazy” validation, only the item specified will be validated.

WebSocket Support

With all the buzz regarding HTML 5 lately, one of the most talked about features is WebSockets. ASP.NET 4.5 includes the System.Web.WebSockets namespace that will allow for asynchronous communication with WebSocket objects.

Bundling & Minifiaction

Bundling allows you to point to a folder and “bundle” a group of files. This is useful for javascript and CSS files. Additionally, Minification is the process of condensing CSS and javascript files into smaller versions. This is done by removing white space and refactoring the code. For example, it is common to use variable names that we can read and understand. However computers, dont need such descriptive names. Minification would condense the the variable name down to a single character.

What features are you looking forward to in the ASP.NET 4.5 release?

Dealing with the Team Foundation Server 2010 TF30063 error

Joseph JunI’ve been fielding a lot of support requests where users are reporting the “TF30063: You are not authorized to access <server>” error. With the patience of the affected customers and a lot of investigation, the following conditions may cause the problem:

  • A proxy server/firewall/IPS
  • Sleeping or hibernating a system
  • NuGet
  • A combination of the above

Proxy Server/Firewall/Intrusion Prevention System

If you’re connecting through a proxy server, a firewall or there’s an intrusion prevention system of some type involved, the error will occur at random while you’re actively connected.

If a firewall or intrusion prevention system is involved, you may need to contact your network administrator and whitelist the host name and/or IP address of your server. You can find the server name in the Account Information page in the DiscountASP.NET TFS Control Panel and if you need the IP address, please open a request with the Technical Support department using the Support Portal.

In the event that you’re connecting through a proxy server, you may want to review the connection settings on your workstation by:

  1. Disconnect from your TFS server.
  2. Open Internet Options through the Windows Control Panel or through Internet Explorer (Tools > Internet Options).
  3. Click on the “Connections” tab and then the “LAN settings” button.
  4. Try un-checking the “Use a proxy server for your LAN” option.
  5. Reconnect to the server to see if the problem persists.

Sleep/Hibernate

In some cases, if your workstation is put to sleep or into hibernation with Visual Studio running, after Windows comes out sleep/hibernation, trying to perform a source control action causes the error.

The problem is usually resolved by restarting Visual Studio and reconnecting to the server or just restarting the system completely.

NuGet

One of the unexpected reasons why the error seems to be occurring is because the installation, update, or un-installation of a NuGet Package causes the authentication-related error. If you’re using NuGet, I would highly recommend checking out: “Fixing combination of NuGet and Team Foundation in workgroup configuration: 401 Unauthorized” that was published by Miha Markic for detailed information and a resolution.

Were you duped by big technology companies into opposing SOPA and PIPA?

Michael PhillipsListening to Director’s Guild of America president Taylor Hackford on the local Southern California NPR station a couple of weeks ago made me a little crazy.

I like Taylor Hackford, don’t get me wrong, but when I hear the leaders of these Hollywood and recording industry groups talking about things like SOPA and PIPA, it’s frustrating. They seem to have no concept of why people oppose them. Do they really know what’s in the legislation?

According to Hackford, millions of people were “duped” into contacting congress to complain about SOPA/PIPA, based on scare tactics, lies and misinformation from “the big technology companies.”

Hear how you’ve been duped at both the 4:14 and 10:35 points of the interview.

It’s a little disappointing – if unsurprising – to hear statements like that from someone on the creative end of the entertainment spectrum. After all, don’t the DGA, RIAA and MPAA engage in scare tactics, lies and misinformation campaigns of their own?

The continuing complaint that “rogue” web sites are destroying Hollywood or the recording industry – in fact, the entire argument against piracy of any kind – is largely based on a fantasy. The fantasy being that if there were no piracy, everyone would gladly pay for the products produced by Hollywood and the recording industry.

That is incorrect.

We have known this about software piracy for years; the people who are searching for things they can get for free are not really potential customers. They are only interested in your software, movie or music if they can get it for nothing. If they had to pay for it, they would simply do without it.

So when these organizations claim to be losing billions of dollars to piracy, understand that they are using overinflated and ultimately meaningless numbers since one illegal download does not necessarily equal one lost sale. They only lose $15 to piracy if that “pirate” would have paid $15 to buy the product legitimately. And most of them would not. Therefore, the real loss to piracy on those illegal downloads is probably closer to $0.

The underlying message that the entertainment industry is failing to take from much of the piracy of their work is either; your product isn’t worth as much as you’re asking me to pay for it, or in some cases; your product isn’t worth buying at all, for any price.

Independent, creative film and music subcultures are flourishing. Isn’t it curious that we don’t hear them complaining about piracy? Mainstream comedian Louis C. K. released a self-produced concert film in a non-copyright protected download for $5, and made over a million dollars in sales in the first two weeks it was available (and it’s still selling).

There is a clear message there: give people something they want at a reasonable price, and they will gladly pay for it. But are Hollywood and the music industry listening?

Let me be perfectly clear – we oppose SOPA, PIPA and any other legislation that would make us culpable for the actions of our users because there are already effective laws in place to handle trademark and copyright infringement issues. And also for an admittedly selfish reason: we want to survive. If we and other providers are constantly faced with lawsuits that we have to spend our time and resources fighting, none of us will survive.

For the President of the Directors Guild – or anyone else for that matter –  to claim that “millions of people were duped…by the big technology companies” – well, that sort of condescension offends me to my very core, and it should offend you too.

What you are hearing are the complaints of industry groups who have spent many, many millions of dollars lobbying congress in order to introduce unnecessary and one-sided legislation, and now feel betrayed because those dollars were wasted.

Keep letting congress know that you are more than willing to vote them out if they support one-sided legislation introduced or backed by Hollywood and the recording industry.

And when you hear people like Taylor Hackford talking about why it’s a good idea to hand all the power to the big corporate entities they represent, let them know that you will not be duped by that kind of self-serving doubletalk.

Getting Started with Statistical Semantic Search in SQL Server 2012

Dmitri GropenSQL Server 2012 introduces a new beyond-relational platform called Semantic Search.  Semantic Search extends Full-Text Search capabilities by allowing querying not only for words in the text source, but also for meaning of that text.

Semantic Search builds its indexes using the indexes created by Full-Text Search. Semantic Search is also called Statistical Semantic Search because its intelligence is based on statistics.

Before you can use Statistical Semantic Search in SQL Server 2012, you will need to download, install, attach, and register Semantic Language Statistics Database.  This database contains the statistical language models that Semantic Search depends on.

Please follow this link to download msi package that contains the database.

Run the installer, and after installation is complete, find semanticsDB.mdf file in Microsoft Semantic Language Database folder under your Program Files directory. Attach this database file by right-clicking Databases folder in Object Explorer of your Management Studio, and selecting Attach button. Then click Add button and locate the database .mdf file to attach. Once the database is attached, register it by executing the following command:

USE master
GO
EXEC sp_fulltext_semantic_register_language_statistics_db @dbname = N'semanticsdb';
GO

Verify that the database is installed by running the following query:

SELECT * FROM sys.fulltext_semantic_language_statistics_database;
GO

To list the languages supported for semantic search, run this query:

SELECT * FROM sys.fulltext_semantic_languages;
GO

You can create Semantic Search indexes on a table by running T-SQL commands, Full-Text Indexing Wizard, or in Full-Text Catalog properties.

To create Semantic Search indexes in Full-Text Catalog properties, in the Object Explorer of your Management Studio navigate to YourDatabase / Storage / Full Text Catalogs.  Right click on catalog name and select Properties.

Select the Tables/Views from the left list view. Add the tables for which you want to create indexes to the Table/View objects assigned to the catalog list. Select the columns under Available Columns list. Finally, select the check boxes under Statistical Semantic list next to the columns for which you want to build Semantic Search indexes.


Full-Text Catalog properties

DiscountASP.NET Joins Microsoft Visual Studio Industry Partner Program

Takeshi Eto Visual Studio Industry PartnerWe are extremely proud to announce that DiscountASP.NET has been accepted to the Microsoft Visual Studio Industry Partner (VSIP) Program.

With our acceptance into the VSIP program, we join a group of about 200 partners who develop components, controls, Visual Studio plug-ins that help developers and developer teams be more productive. We are proud to be the first TFS hosting and web hosting provider to join the VSIP program.

Participation in the VSIP program gets us early previews of new products, insights on Microsoft developer and industry research, and allows us to take advantage of many technical benefits, such as an MSDN subscription and a series of developer labs in Redmond.

We view our VSIP membership important to show our commitment to stay on top of new Microsoft-related technologies, to  maintain a strong partnership with Microsoft, and to help strengthen  our goal to help improve application lifecycle management for Microsoft  developers.

South Florida Code Camp – This Saturday – February 18, 2012

Mark Medina DiscountASP.NET is proud to be a sponsor of this Saturday’s South Florida Code Camp which is presented by the Florida.NET User Group.  This is the 8th year for the this one day geek fest so if you’re a .NET developer in the South Florida area, then you should make your way out to Nova University.

A few of the topics that will be discussed include ASP.NET, ASP.NET AJAX, Visual Studio 2010, ASP.NET MVC, Silverlight, WPF, SQL 2008 R2 – hey, these are features that we support!!   According to the agenda, 14 rooms will each have 6 sessions throughout the day for a total of 84 sessions, so there is no doubt there will be a session for developers of all skill levels.  Oh, and don’t forget about the party after the code camp.  The after party details are only given to attendees, so if you want to party, then go to the code camp.  To register for the South Florida Code Camp, click here (it’s free to register)

DiscountASP.NET invades Google campus

Mark MedinaI have been in the online marketing trenches since 2000, having advertised web hosting services on a plethora of search engines such as Alta Vista, Lycos, Excite, GoTo/Overture, Sprinks, 7Search, Mamma, Yahoo, MSN/Bing, and obviously the mother of all search engines, Google.

Heck, I was even a beta tester of AdWords, which is one reason why I’ve received some cool Google swag, like my Google beach chair and towel that sits firmly in the marketing office.

but never had I, nor anyone else from DiscountASP.NET, been invited to the Google campus…that is until now!  That’s right, after years of blood, sweat and tears (a.k.a. Google advertising), Google finally extended an olive branch and invited me, Derek Kadota (Online Marketing Manager) and Tony Guido (Research Manager) to Mountain View, California to visit Google.

Upon arriving at the Google campus, I wasn’t overly impressed.  The campus wasn’t as big as I imagined.  Externally, the buildings weren’t anything special, nor were they even very big.  In fact, I think the tallest building was four stories.  It wasn’t until our AdWords rep, AK, met us in the lobby and directed us to the Google bowling alley that I became awestruck.

Construction for the bowling alley, located In the Sales/Ad Words building was recently completed; this where the sales and AdWords teams sometimes have meetings and presumably happy hours as the bowling alley comes equipped with DJ equipment.  This was my first time seeing a bowling alley inside a corporate office so my intrigue grew.  I thought to myself, “Ok, all the cool stuff is hidden from plain view.  What other cool perks do Google employees have available to them?”

After the bowling alley, we were then taken to the Google cafeteria (there are tons of cafeterias on the Google campus) where many employees were enjoying breakfast, buffet style.  People just grabbed a plate and tray and loaded up on food.  Not having eaten that morning, I jumped at the chance and had me some scrambled eggs, OJ and fruit.

While eating, this definitely didn’t feel like a corporate enterprise with a market cap of almost $200 billion but more like a college campus.  Maybe it was because most employees looked so young, but Google definitely has a college feel.  At breakfast there were people sitting alone with their laptops, almost as if they were cramming for an exam, and loud groups talking and laughing, clearly not discussing work.

When breakfast was over, AK introduced us to the rest of the Google team that helps manage our account. I won’t discuss the details of our meetings (I know you competitors are reading our blog!) but suffice it to say, Google has a ton of stuff that we will be testing in the future.

When our meeting was over, we grabbed a shuttle (yes Google has shuttles to take people around the campus) to the main part of campus.  It was in the main part of campus that we saw the really cool stuff.  First AK showed us yet another cafeteria, and who do we see perusing the place? None other than the “You’re so money,” wedding crashing actor himself, Vince Vaughn.  Rumor has it that he and Owen Wilson are going to film a movie about the life of a Google salesman so Vaughn was getting the grand tour (Owen Wilson was not there).

Our tour continued to the Google store which looked more like a college campus bookstore.   You can buy Google shirts, hats, jackets, pens, mouse pads, and a bunch of other Google stuff.  Derek even bought himself a Google hat, but he missed out on the 10% discount that Google employees get. We also walked by the massage area where employees could pay $30 for an hour-long massage.

For lunch, we went to the cafeteria on the main part of campus, which is different than the breakfast cafeteria because of the various types of food available.  They have Italian, American, Asian, Vegan, Indian, Mexican – all buffet style – available to all employees at no cost (breakfast was free as well).  I’d also like to add that on every floor we visited there were free snacks to munch on and free beverages.

AK joked that similar to college where you gain the “Freshman 15,” at Google you gain the “Google 15.”  Google knows that well-fed employees are happy employees.  Google does provide a healthy food option, which is where Derek and I picked up a strawberry smoothie.  Next to the cafeteria is the Google fitness center, where there were a ton of employees lifting weights and running on treadmills. And rightfully so – the amount of food these people have access to could feed a third world country.

There are even personal trainers on site that employees can use (though not for free).  After our tour, we grabbed our food and ate our lunch outside on the quad while watching some employees play volleyball.

The Google campus is obviously set up so the employees don’t need to leave.  There are a ton of food options.  Not only is breakfast and lunch served for free, but dinner is also served free.  As I mentioned, there is a gym, massages are available and there is even a Laundromat.  I think the only thing missing is a supermarket and housing.  I wouldn’t be too shocked if campus housing isn’t too far away.

The highlight and most unique part of our Google trip had to be the bike ride we took around campus.  There are tons of Google bikes on the campus that people can just grab and ride. Google even has “conference bikes” that teams use (Tony calls this the Octopus Bike).  As AK explained, Google teams use the conference bike to build camaraderie so they can learn to work together.

With the conference bike, the leader of the team sits in the middle and not only steers but is also the central peddler. Those on the outside also pedal but because the bike is a fixed gear, the leader in the middle is the main peddler.  In theory, this sounds like a fun way of team building, but if you think about it, Google could lose an entire group, or a Google advertiser could lose their account team if something happened.  Not good!

After lunch there were no shuttles available to take us back to the Sales/AdWords building, so we decided to be brave and bike back.  Our bike ride was a brisk 10 minute trip, but I have to be honest, the Google bikes aren’t necessarily built for speed racing.

I’m not the world’s greatest bicyclist but I made it one piece and wasn’t too tired.  Derek, on the other hand, struggled the last part of the ride and said “I was feeling it on the last incline.”  I don’t know which route he took, but I didn’t feel much of an incline.  Unfortunately, we never got to ride a conference bike.

After we made it safely back to the Sales/AdWorlds building, we put an end to our day by visiting the Google arcade where they have tons of oldies but goodies such as Frogger, Ms. PacMan and the original 1985 classic, Gauntlet, all rigged so no quarters are necessary.

I’d just like to add that Merlin the Wizard sucks.  He is slow and is always the first one to die.  It wasn’t until I was the Valkyrie that my Gauntlet abilities came back to me and I kicked ass.  After our Gauntlet session, Tony decided to relax in the Google massage chair.

Redirecting HTTP requests to HTTPS

Michael OssouA common question that is often asked is how to auto-magically redirect HTTP requests for your web sites to HTTPS. Simply put, if someone types “http://www.yoursite.com” how can you redirect that request to “https://www.yoursite.com”?

This post is the simple answer to that question. IIS’s URL rewrite module can help us accomplish this as well as other rewrite tasks. For a complete look at how URL Rewriting works, take a look at the following MSDN article on URL Rewrite. Then look at the following as an example of what to add to your web.config:

      <rewrite>
        <rules>
          <rule name="Redirect to HTTPS" stopProcessing="true">
            <match url="(.*)" />
            <conditions>
              <add input="{HTTPS}" pattern="^OFF$" />
            </conditions>
            <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
          </rule>
        </rules>
      </rewrite>