Wednesday, October 23, 2013

SQL Azure required clustered Index

A

After deploying my database to Azure, I used the Management portal to insert some rows of data, and encountered the following error.

Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered index and try again.

I found the following SO article that shows how to add a clustered index to a single table. So, I wrote the following script to generate the ddl to create a clustered index on every table.

select 'CREATE CLUSTERED INDEX CX_' + name + '_Id ON ' + name + ' (Id)' from sysobjects where xtype = 'U'

This generates output like this

CREATE CLUSTERED INDEX CX_Error_Id ON Error (Id)

CREATE CLUSTERED INDEX CX_Tournament_Id ON Tournament (Id)

CREATE CLUSTERED INDEX CX_User_Id ON User (Id)

After taking the output and running this on my SQL Azure database, now, I can successfully insert records into each table.

Tuesday, June 06, 2006

ASP.NET Ajax Toolkit Comparison

I have been working on an assignment where I will be recommending an Ajax Toolkit for ASP.NET 1.1. Some client requirements that are influencing the decision are

· The ASP.NET 1.1 Ajax implementation will be a stop-gap solution until .NET Framework 2.0 is rolled out.

· An ASP.NET 1.1 implementation is required because business projects have requirements that can be met with Ajax functionality, and business projects are scheduled to be delivered before .NET Framework 2.0 is rolled out.

· ASP.NET 2.0 implementation for asynchronous functionality will be Microsoft’s Atlas toolkit

I have already formed an opinion before I found the work of Daniel Zeiss who has put together a very detailed matrix for comparing Ajax toolkits. I had done something similar, but with fewer vendors. The good thing is that after reading Daniel’s comparison, I was even more comfortable with recommending Anthem.NET for the implementation.

I reviewed Ajax.Net Pro, Anthem.NET, and Telerik as potential stop gap solutions until Atlas can be implemented. Here are my comments on each toolkit.

· Ajax.NET Pro – This toolkit seems to be widely used with a significant user base. If you need more evidence, subscribe to the newsgroup, and you inbox will be flooded. My complaint is that the project is so active that I think it is too unstable with many builds per week. In addition, the lack of server control support and execution outside the regular ASP.NET page / control lifecycle make development with this toolkit somewhat unnatural. This toolkit also requires the developer to write a lot of JavaScript code to implement the simplest functionality.

· Anthem.NET – Anthem.NET offers a suite of ASP.NET server control that inherits from the ASP.NET web controls. Anthem.NET honors ViewState and the ASP.NET page and control lifecycle. Therefore, development with toolkit conforms to common ASP.NET development practices and habits. There seems to be a slight concession with regards to bandwidth when compared to Ajax.NET Pro, but I will concede some bandwidth for shorter development cycle. Developing with this toolkit allows the developer to write server-side code in c# rather than writing a lot of JavaScript code. This toolkit also seems to be the most consistent with ATLAS (which is the long-term implementation for my client). The Anthem.NET project supports .NET Framework 1.1 and 2.0, and uses a conditional compilation value to build the appropriate framework version.

· Telerik – Offers a suite of controls, but really looks to be overkill for a stop-gap solution that will be replaced by Atlas within 6 months.

So, Anthem.NET is my recommendation for the interim Ajax toolkit solution.

By the way, I used Fiddler to capture HTTP traffic for each Ajax implementation when I wanted to understand more detail about what was going on under the hood. This is a really cool tool that should be useful to any web developer, and one that I have been using very successfully. It is much simpler to use than some other more advanced packet sniffers such as packetyzer or etherreal. From my experience, the trace is difficult to understand when too many network protocols are captured and creating a filter to only capture HTTP traffic was more involved than I wanted it to be. So, when debugging my ASP.NET applications, Fiddler gets the job done in a fraction of the time

Thursday, April 13, 2006

"Atlas" Setup - April CTP

The April CTP of Atlas is available along with the Atlas Control Toolkit and Sample Applications.  I was impressed with the installation and samples.  This is the first CTP version of Atlas that I have installed, and the MSI installed without incident.  The same goes for the sample applications (ran the MSI, open the AtlasControlToolkit.sln, and hit F5 to run the samples without any issues).  Very impressive!!! J

 

 

Wednesday, April 12, 2006

Team Foundation Server (TFS) - Task Description links not clickable

Well, I found my first annoyance in TFS. HTML links in the description field are not hyperlinked, so it looks like you have to copy and paste the link. Anyone know a way around this or is this something developers will not do often?





Tuesday, April 11, 2006

Team Foundation Server

I finally finished installing Team Foundation Server (TFS) on a virtual machine.  My advice would be to read the installation help file provided in CHM format in the root of the installation media.  I tried installing TFS at least 10 times before admitting to thy self that instructions were necessary, or I was going to be prematurely bald from pulling my hair out.  Once I read the help files, the installation went very smooth.  I plan to start using TFS for a small project, and I am sure there will more interesting stuff to post at that time.  But, for now, this is a good milestone to have the environment up and running.

Sunday, April 09, 2006

ISA Server 2004 SP2 bails on http://www.delta.com

I recently bumped into this annoying little problem with ISA Server 2004 SP2 where you get an error message when attempting to access http://www.delta.com.  The error message is The HTTP request includes a non-supported header.

 

As described in the following news group posting, there is a hot fix available that resolved the issue for me.  When calling Microsoft reference kb article 915045.

 

http://groups.google.com/group/microsoft.public.isaserver/browse_thread/thread/139732a3cefacbda/932e408b88f8b7d3?lnk=st&q=The+HTTP+request+includes+a+non-supported+header.+Contact+your+ISA+Server+administrator.&rnum=2&hl=en#932e408b88f8b7d3

 

 

Saturday, April 08, 2006

CHM Help File - DNS Error

When attempting to open certain *.chm Help files, the table of contents displays correctly, but when selecting a topic you receive a DNS Error. The following link contains many fixes, but my problem was resolved by right-clicking on the chm file, going to properties, and clicking the “Unblock” button.

http://support.microsoft.com/kb/896358

I hope this helps you.

Friday, April 07, 2006

Windows Vista February CTP on Virtual Machine - II

So, I finally get Vista installed and running.  The first thing I do is add the machine to my domain and get a message indicating a need to re-start for the changes to take.  ARGGGH!!!! – I think this is a step backward; not forward.  Hopefully, this is something that will be fixed.

Windows Vista February CTP on Virtual Machine

If you are attempting to install the February CTP of Windows Vista on a Virtual Machine, be sure your DVD drive is configured to use the primary controller.  If you use the secondary controller (which seemed to be the default when I was installing), you may get the following error message “An internal Setup error occurred while displaying the image selection wizard”.

 

This news group posting also discusses the issue.

http://groups.google.com/group/microsoft.public.windows.developer.winfx.general/browse_thread/thread/ce587e1a30b0fad0/3cb3502d47ddd45c?lnk=st&q=An+internal+Setup+error+occurred+while+displaying+the+image+selection+wizard&rnum=1&hl=en#3cb3502d47ddd45c

 

My install is in progress, and my fingers are crossed that the install will complete successfully.

Thursday, March 02, 2006

ASP.NET 1.1 - Save ViewState in Session

The team lead for a development group came to be today asking if there was anyway to reduce the size of the rendered page. This particular page requires significant legitimate use of ViewState. I knew I had read about saving ViewState to a custom store to override the default behavior of stuffing it into the page and sending it back to the client. This application is also using SQLServer to store session state.

So, the thought occurred to me that I should be able to store ViewState in Session. Below is the implementation in my Default.aspx

private string ViewStateName = "ViewStateName";

protected override object LoadPageStateFromPersistenceMedium()

{

string m_viewState;

LosFormatter m_formatter;

object viewStateBag;

m_viewState = Session[ViewStateName] == null ? null : (string )Session[ViewStateName];

m_formatter = new LosFormatter();

try

{

viewStateBag = m_formatter.Deserialize(m_viewState);

}

catch (Exception e)

{

throw new ApplicationException("The View State is invalid or corrupted", e);

}

return viewStateBag;

}

protected override void SavePageStateToPersistenceMedium(object viewStateBag)

{

// string file = GetFileName();

StringBuilder sb =

new StringBuilder();

StringWriter sw =

new StringWriter(sb);

LosFormatter formatter =

new LosFormatter();

formatter.Serialize(sw, viewStateBag);

sw.Close();

Session[ViewStateName] = sb.ToString();

}