Visual Studio 2005 Web Application Project
While doing a migration from .Net 1.1 to .Net 2.0 for an ASP.NET application i stumbled on the problem of the difference between the 1.1 Web Projects (.csproj) model and the 2.0 'folder' model.
When you have a big solution with multiple projects, sometimes you only want to reference the projects or dll's directly.
In 2.0 everything inside the root folder (except the files with the extension '.exclude') is part of the project. Referenced projects result in dll's in the bin folder.
So the referenced dll's inside the application's bin folder will be placed in SourceSafe, which is not the behaviour we want, because we only want the source to be 'safe'. The bin folder was never included in the files to be placed into Soursesafe's database in my opinion.

To the rescue came the VS 2005 Web application Project. It seems the people at Microsoft also stumbled on the  same problem and this 'new' project type uses the same conceptual web project approach as VS 2003 (a project file based structure where all code in the project is compiled into a single assembly) but with all the new features of VS 2005 (refactoring, class diagrams, test development, generics, etc).
I think the possibility to use everything inside the root folder is oke for some projects, but not for all. So in my opinion the 2003 should be default and the one folder type optional.
You can downoad the msi here.
Tutorials on how to use this project can be found here (Scott Guthrie).

Visual Studio 2005 Web Deployment Projects
Now when we want to make an installer to install a Web Application the Websetup project is provided, but if we want to use the new pre-compiled dll structure we cannot directly include this in our solution.
First we must 'Publish' the application (website) and link the output to our Websetup project.
For this problem Microsoft already provides another 'new' ProjectType the Web Deployment Project.

From a Web application we can make a Deployment project for this Web application, and set a lot of extra properties (like using pre-compiled dll's) make one or more assemblies, etc.
It is nothing more than an XML file and we can directly change and tune it. If you need more indepth information visit Scott Guthrie's blog.


Henry Cordes
My thoughts exactly...


FourHour.net

Published 10/12/2005 by hendaman

Your Four minutes of fame...
Yesterday I went to MIND, the (M)icrosoft (IN)ternal up(D)ate.
An event my employer sponsors every year to give an update about the alliance with Microsoft and talk about Microsoft related issues. Also this evening is used to network with fellow employees, enjoy a nice meal and it is possible to attend breakout sessions.
The following sessions could be attended yesterday:

  • Business Intelligence in combination with SQL-Server
  • .NET Development
  • Microsoft Business Solutions
  • Infrastructure and Security

    I attended the .NET Development session where Microsoft's Lex Oskamp (a speaker I always enjoy) showed us the Visual Studio Tools For Office. This was interesting.
    But what I really would like to share is a new initiative called FourHour.net. This is a website where a community will be started along the lines of Channel9.
    Here is what they say themselves:

    "We want to show the real people behind the innovative IT-Solutions build with the .NET products. Bring fame to those who are normally behind the scenes. What keeps them awake at night? What are they proud off? Do they have a life besides IT? We know you are out there, so don’t be shy when we pay you a visit… "

    So they give developers a change to show off cool projects or stuff you do in your own time. I hope this will take off, so remember this and pay them a visit: www.fourhour.net. The site and initiative is brand new, so give them the time to built their content. In the future everybody can join and offer their "sexy shit", to quote the speaker.

    Henry Cordes
    My thoughts exactly...


  • Using subreports in a Crystal Reports XI report in a ASP.NET webapplication, with the datasource dynamically set.
    While using a Crystal Reports report which contains one or more subreports, the following syntax (the most logical) does not give the expected behaviour:

    What happens is that the main report is shown with data as expected, but the sub report(s) are always empty.
    When I googled, I found some people had the same experience. Nobody came up with an answer that solved this problem.
    A developer on my team asked Business Objects by mail and at first got some links that were not even related to the problem. After a few weeks he recieved the following code snippet, which after we changed it to fit our purpose did the trick.
    Code snippet

    The solution is to loop through all sections in the main report and than loop through all objects per section.
    In the 'objects' loop we check to find if the ObjectKind is of ObjectKind.SubreportObject.
    If this is the case we have to check if the name of this subreport matches the subreport we need.
    If this is the case the datasource is set with the following syntax:
    crSubReportDoc.Database.Tables[0].SetDataSource(ds);

    I suspect that this is the trick.
    The looping to find the right subreport object might not have any use.

    Henry Cordes
    My thoughts exactly...

    Crystal Reports XI Datasource

    Published 8/15/2005 by hendaman

    In Crystal Reports Server XI it is possible to schedule reports. Also users can be given rights to browse reports and run them ad hoc. The problem is that datasources are defined in the binary .rpt file. If you don's use Business Views it is not possible to define a datasource at a higher level. In the Management Console it is possible to change the datasource for a report, but in reality this does not always work and a nasty 'dataconnector error' is the result, instead of a report.

    The workaround we found is to change the 'hosts file' on the developing machine. The 'hosts file' can be found in '<WINDIR>\System32\etc', (<WINDIR> stands for the directory where Windows is installed "C:\WINDOWS"). In the 'hosts file' IP-Adresses are being pointed to hostnames, so the (local) machine knows which IP-Adress to look for if we use the hostname.

    Example:
    102.54.94.97     rhino.acme.com          # sourceserver
    38.25.63.10      x.acme.com              # x clienthost
    127.0.0.1        localhost

    In the hosts file we changed the developing SQL Server instance IP- adres in the production SQL Server instance name.
    If on the development network the SQL Server instance name is "Develop" with ip adress 192.168.0.10 and in production the SQL Server instance name is "Production\Instance" than we would add this in the hosts file:

    192.168.0.10        Production\Instance

    This way the names are the same as on the production machine and the reports work without having to change the datasource.
    I realize this is a work around, but we were happy we found it, because the only other way we could think of was installing a SQL Server instance with the production names.

    Henry Cordes
    My thoughts exactly...


    Recently Microsoft launched the first new Windows Operating System Vista as a Beta for the developing community.
    Here you can find more information.
    Microsoft only released this Beta to MSDN subscription members and TechNet members.
    At Erwyn van der Meer's blog  there is a lot of info about Vista, in Juli 2005 he experimented a lot with this new OS and found some interesting things he put on his blog.

    Henry Cordes
    My thoughts exactly...