Wednesday, April 24, 2013

Azure tutorial on web site and database omission of Key field

http://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/

If you dont have a key defined in the model you cant generate the HomeController as described.
This gets past it:

  public class Contacts
    {
        [Key]
        public int ContactId { get; set; }

Azure -- first publishing an ASP.Net MVC App -- error "using System.ComponentModel.DataAnnotations; using System.Globalization;"

If you have a database but arent publishing it immediately. You could get this error. Unticking the database earlier in the wizard makes it go away.

Visual Studio and Named pipes error: 40

http://siletum.blogspot.ie/2013/04/sql-server-2012-and-visual-studio-2012.html

linking back to the previous post, I dont know how useful it will be, my diagnosis could be compeletely wrong. WOW64 normally works perfectly and I have no idea how interprocess communication works in 32 to 64 bit Windows apps the marshalling is probably very interesting.
I also forgot to mention that I was trying to run SQL Server and VS2012 on the same development PC


Tuesday, April 23, 2013

SQL Server 2012 and Visual Studio 2012 data connection

I installed SQL Server 2012 (64 bit edition) and couldnt get any data connections to work -- except direct links to .mdf files -- no useful errors either. I remembered vaguely that with SQL Server 2008 R2 you had to use the 32 bit with Visual Studio since Visual Studio is still unaccountably 32 bit, and so I uninstalled and laboriously downloaded the 32 bit SQL Server and the new 32 bit database system was visible to Visual Studio, and the 64 bit connection actually gave an interesting error
"Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
which would suggest that maybe the firewall is the problem and that the 64 bit DBMS is showing up as an external application to Visual Studio (or something like that -- life is too short for me to follow it up since I got the 32 bit version working, but the links will be here... for me too if I ever need to come back)

the MSDN articles
http://msdn.microsoft.com/en-us/library/ms174937%28v=sql.100%29.aspx

http://msdn.microsoft.com/en-us/library/bb934283%28v=sql.100%29.aspx

http://msdn.microsoft.com/en-us/library/ms141198%28v=sql.100%29.aspx


And maybe automate opening the ports through the firewall:
http://consultantpoint.wordpress.com/2012/11/21/bat-script-to-open-sql-server-ports-in-the-firewall/ 

And if you are encountering Administrative rights pain again:
http://www.howtogeek.com/howto/windows-vista/enable-the-hidden-administrator-account-on-windows-vista/ 


And this might be useful too:
http://blog.sqlauthority.com/2012/11/30/sql-server-fix-visual-studio-error-connections-to-sql-server-files-mdf-require-sql-server-express-2005-to-function-properly-please-verify-the-installation-of-the-component-or-download-from-the/


Yes backups

My current woes are due partly to not backing up and partly by the fact that the  virtual machines I actually do have backed up dont seem to work well with VirtualBox. They were fine with Virtual PC, so my advice is upgrade your O/S and dont mess with strange virtual machine software :-)

Monday, April 22, 2013

Windows update Fail

So I keep running Windows update all the time, and waste hours and expensive band-width, and then when I try to install SQL Server it tells me I need to have Windows 7 service pack, despite the fact that I already have all the updates installed? Not good

Cockroach control

Most people who are going to try this will probably already have been caught ... I installed Visual Studio 2012 Premium 90 Day trial shortly after it came out first, and didnt use it much as can be the case -- I had enough to be going on with and it didnt look very nice (as nearly everyone says).
I uninstalled it but it didnt really seem to go away, but I started using the Express editions and they worked fine, but eventually I thought it would be more efficient to have an all-in-one solution so I bought MSDN Professional. The trouble is that if a previous version of Visual Studio 2012 has not completely uninstalled, Windows tries to use the highest edition it thinks is installed, so I kept on being told that I had an expired Visual Studio 2012 Premium instead of the Visual Studio Professional that I had just being installing. It seems that Visual Studio 2012 is like cockroaches, one it gets in there is no way of eradicating it. I spent two days on the web looking for solutions and tried all but the most bizarre suggestions but to no avail. In the end I reformatted Windows 7 in its entirety and have spent a fair chunk of the last two weeks tryiing to get everything reinstalled and back the way it was.
Moral of the story: dont try out any versions of Visual Studio above your budget, its not worth it unless you are able to stick with the Express editions

Excellent. TDD xUnit in Ruby

Somebody else usually gets there first (fortunately) :

Trying out Google App Engine

Trying Out the Google App Engine

(this quite an okld post, found in draft folder. may be out of date)
Maybe this is implicit for all hardened Pythoners, but for the uninitiated, using Python with Windows seems to be more of a struggle than it might otherwise be (I know, I should revive my Linux partition -- but what about everyone else?). I'm still suspicious about "C:\Program Files" in the path of any application -- although the problem seems to be
for other pilgrims -- you probably need to open a command line window (thats choose Start then Run then type cmd and click OK)
and type

python before anything in the App Engine documentation

eg
google_appengine/dev_appserver.py helloworld/

becomes

python google_appengine/dev_appserver.py helloworld/