February 2008 - Posts
A new introduction to .NET 3.5 is the ability to limit the size of the incoming messages when using Web services. Apparently this is to help combat Denial of Service (DoS) attacks.
However, it is not clear how to change this setting, its simple when you know how. In you App.Config, or Web.Config you should have a Bindings section for each of web services references. Within this there are all sorts of useful settings, however by default the maximum message size is quite small, so to alter this you must change maxBufferSize and maxRecievedMessageSize. Now don't go crazy just up it to what you may need, this may be quite large if you are building all your internal applications through a web service layer.
Some time ago I reported on LINQ whilst Visual Studio 2008 was still in BETA. On Monday, Nov. 19 2007, Microsoft announced that Visual Studio 2008 and the .NET Framework 3.5 was released to manufacturing (RTM). Since then I am sure many of you have had many hours playing with VS 2008, WPF, Expression Blend, and all that these new products contain. Having finally got my hands on it, and found the time, LINQ was the first stop. So we have a database that we need to run complex queries on where stored procedures just would not be flexible enough. Further to this Inline SQL is an obvious No No, so perfect scenario for a LINQ to SQL implementation.
Deciding that a DBML (Database Markup Language) structure would work best, generating this file, and getting this file to be update-able was crucial. So after some research we found a small, unknown command line application called SQLMetal. This allows you to drop and re-create DBML files, based entirely on a given database.
SqlMetal will always produce a consistent data access layer:
- SQLMetal is a command line tool that can generate the data access layer in seconds.
- SqlMetal will produce either C# or VB.Net code.
- SqlMetal generates a strongly typed data access layer. This is great for reducing runtime error. Now those runtime errors pop up in the development cycle as compile errors, reducing stress on the QA dept, Support dept and upper management, later in the life cycle.
SqlMetal can generate strongly typed interfaces for stored procedures and user-defined functions. From the developer point of view, it is now a complete breeze to call either a stored proc and/or a user-defined function.
To generate source code from SQL database directly, execute the following:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin> SqlMetal /server:baker /database:AdventureWorks /namespace:AdventureWorks /dbml:AdventureWorks.dbml
This creates a DBML file that can be added to your project:
This now gives an entire database structure accessible via LINQ, one thing to be aware of though; ensure you have a solid database design, as SQLMetal will transform you Database design identifying all keys and relationships.
And once you have the database as an object model, you can use LINQ as you wish.
LINQ to SQL uses ADO.NET under the covers but offer several additional benefits:
Fewer lines of code
This is quite a simple little thing that really hasn't been mentioned yet, maybe because it is so simple, however nevertheless less worth mentioning. You may have the requirement to be able to allow your users to forecast from where ever, and security permitting, this is a very easy thing to set up. All communication between Excel and PPS happens over basic HTTP web services, this lends itself very well to configuring PPS for remote working.
To set it up you need to open a port on your firewall to allow communication over the PPS port (46787), and then simply point your connection to your Domain that is pointing to the correct server... and it all works, no issues. So in short, PPS works over the Internet, SSL is the next challenge. Initial testing against SSL, i.e. HTTPS, looks very possible. So to begin this add a new SSL port to the setting in IIS and create a new certificate in IIS, I chose to use 46797. for testing purposes it is as simple as adding a connection to Excel PPS add-in and testing.
So, PPS can be deployed over the Internet, using SSL. This therefore also means that all PPS functions can be secured with SSL and accessed over the Internet.
OK so we should have been getting our mitts on SQL Server 2008 RTM yesterday, but it has been delayed, until Q3 which has been know for some time. Microsoft did, however, go ahead with the official release yesterday, regardless that the product has not been released to manufacture. However to keep our appetites "wet" Microsoft have released another CTP (February) which can be downloaded here: Download
SQL Server 2008 is just an enhancement to the already extremely successful end to end BI stack that delivers a well rounded platform for the majority of organisations planning, reporting and analysis needs . Their BI and performance management offering works best when it is implemented as part of a full stack of Microsoft infrastructure that includes SQL Server (including 2008), SharePoint Server 2007 and Microsoft Office (including Excel 2007). This platform is complemented by PerformancePoint Server 2007, and the obvious tight integration with Excel.
Microsoft are also making further inroads into competing with Teradata, IBM and Oracle with improving the relational database engine with features such as partitioned tables and support for partitioned table parallelism that position it more effectively within the large scale enterprise data warehousing market where IBM, Oracle and Teradata all play. Although still not ready for databases that run into the 100's of terabytes and possibly petabyte range, the company is making in-roads, it currently has customers working comfortably in the one to 15 Terabyte range and expects SQL Server 2008 to extend this into the 20 to 50 Terabyte range.