When trying to do a full text search with SQL Server 2008 I received this error:
Today I received the following warning message from Visual Studio while adding a reference in a Visual Basic project:
One of the web applications that I work on is Instant Church Directory, a website that helps churches create a church photo directory. Since the main focus of the application is to create a photo directory, customers are uploading all sorts of images into Instant Church Directory and the application needs to correctly convert and store the images and insert them in the final output, which is a PDF.
I love this. Amazon is offering free one-day shipping for their Kindle starting tomorrow December 23. This means you can buy the Kindle up until midnight (EST) on December 23, 2009 and still have it delivered in time for Christmas. (There is free 2-day shipping if you buy it today.) What an awesome way to bring in new customers.
This is pretty amazing. I asked a question on StackOverflow and 30 minutes later (while I was still trying to find the answer on my own) I found my question indexed in Google’s search results. WOW!
You can use jQuery to trigger a button click from the client. In this certain situation, I needed to make sure the button was not disabled prior to clicking. In jQuery you can use the “is” function to check if the button is disabled like this:
Back in October I heard that Amazon was introducing same day
shippingdelivery for some cities. Today I received an email for being an Amazon Prime member reminding me that Amazon has the ability to deliver an item to me within the same day. But what is really amazing is the cut-off times; in Seattle you can order an item up to 1PM and get it delivered to you that same day:
I was setting up CruiseControl.NET for the Vaasnet automated build system and I needed the Subversion binaries. This is my first project that I had used Subversion for source control and up until now I had just been using TortoiseSVN for interacting with the source control repository.
Why isn’t IIS7 authorization working in my asp.net website? I was trying to secure a folder in my asp.net application using the IIS7 system.webServer/security/authorization configuration settings. In the past you could do this through the ASP.NET configuration by adding an authorization section to the system.web section in your web.config. But now with IIS7, you can use the new system.webServer/security/authorization section to specify authorization rules. The benefit of system.webServer authorization over system.web authorization is that the former applies for all requests to that particular location, the latter only protects asp.net requests (requests that come through the asp.net pipeline).
So, since I am developing this application on IIS7, I wanted to use the new IIS7 system.webServer authorization section to protect a particular folder. To do this, I added the following section to my web.config file:
<remove users="*" roles="" verbs="" />
<add accessType="Allow" users="" roles="administrators" />
and tested the url http://localhost/admin and… it didn’t work. What should have happened is I should have been redirected to the forms authentication login page, but instead I was served the content under the /admin folder. Not what I wanted; the /admin folder should now require an authenticated user and the forms authentication identity to be part of the administrators role.
What is going on?!?!? Everything looked correct. I confirmed that IIS authentication was set correctly: anonymous and forms authentication only. I confirmed that the system.web/authorization section was working. I tried in multiple browsers to make sure it wasn’t a cookie or a caching issue. Still I was left scratching my head… why were settings in the IIS7 system.webServer/security/authorization not getting picked up?
Finally, with the help of Scott Forsyth, I checked the Server Manager IIS Roles that were enabled. Server Manager > Roles > Web Server (IIS) > Add Role Services
Notice that the URL Authorization role service is not installed.
That was it. IIS7 did not have the role service installed so it was not understanding that section of the web.config file.
After installing the IIS URL Authorization role service, a request to http://localhost/admin redirected to the forms authentication login page and required a user that was in the administrators role.
For some reason it is very difficult for me to find the CruiseControl.NET configuration reference online. Most of the time I end up on an older reference which is out of date and just not correct.
My CruiseControl.NET build system was running into an error whenever two projects were trying to build at the same time. Both of these projects try to go out to our subversion source control repository and one will win and the other gets locked out.
Here is how you can handle the event of a button from within an ASP.NET ListView control.
The IIS7 Search Engine Optimization (SEO) Toolkit is an awesome tool to review your site and indicate any problems with the html that may cause search engines not to index your website properly. Check out Scott Guthrie’s post on the IIS7 Search Engine Optimization Toolkit or you can download it from the IIS website at the tool’s home: IIS7 SEO Toolkit.
But I ran into an issue with the tool the other day where it was not returning the proper results. I ran it against a website I was working on and it only crawled one page and returned results that were just not correct:
The errors: “The title is missing.”, “The description is missing.”, and “The <h1> tag is missing.” were incorrect since I had all of those on the home page of the site I was testing, but also it was curious that it was not crawling any other urls off of that home page.
AND the content tab even showed all of these things in the html that the tool had retrieved:
Eventually I was able to track it down to using the HTML5 Doctype tag:
The HTML5 document type is not official yet but I have gone ahead and started using as recommended by many developers but apparently the IIS7 SEO Toolkit does not like this doctype yet. Temporarily I switched it to another doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
And the SEO Toolkit worked as expected. Just a heads up for any other developers that run into this when using HTML5 DOCTYPE.
Dave Cox added a comment about it not being the HTML5 DOCTYPE per say but the whitespace that comes before it. Having a line of whitespace AND the HTML5 DOCTYPE causes the IIS7 SEO Toolkit not to read the content correctly.
I am using ASP.NET MVC in this project so that means my master page will look like this; the DOCTYPE declaration on the same line as the Master page directive: