I've been doing some work with SQL Server replication over the last few days, and in order to acheive this I was replicating between one of our DB servers and a SQL Server Express instance on my desktop. To my surprise, setting up remote connections to Express is actually a major pain in the butt, so I thought I'd document it here.
The first step is to ensure that remote connections are allowed through your firewall. I was using the default Windows firewall, so I set up a new exception: I called it "SQL Server", Port number 1433, Protocol TCP, and I changed the scope to be "My network (subnet) only"
There are some hidden settings that you need to enable before SQL Server express will allow remote connections. You will need to load up the SQL Server Configuration Manager and do the following:
The next step is to ensure SQL Server itself allows remote connections. From within SQL Server, go to the SQL Server instance, click Properties, Connections, "Allow remote connections to this server"). Finally, restart the express service and you should be able to connect to your machine's SQL Server instance remotely.
The ASP.NET life cycle is as much a fantastic model for web developers as it is a pain the butt. Ok, it's mostly just a pain in the butt - what possessed the Microsoft Developers to implement a desktop applications development model on the web I will never know. Anyway, whenever I change jobs, I encounter different approaches to implementation of pages and controls, rarely with any regard to the correct order of doing things and usually with code that is very difficult to maintain as a result. If you can't rely on your controls to obey the page life cycle in terms of rendering, you've got a problem. For example, setting presentation properties during page load may cause trouble if developers set that property on events firing or during PreRender.
So, when should you do things? As a rule of thumb, I try to do data binding early (OnInit) and presentation setting late (OnPreRender, or in controls that output custom markup in the Render override). It's a tricky topic and something that seems to catch most developers - the concept of top-down development with classic ASP and PHP just doesn't apply.
There's an excellent article on MSDN about the order of events here: http://msdn.microsoft.com/en-us/library/ms178472.aspx.
For my future reference, some items to consider: