Visual Studio 2005 launched

by Sander Gerz October 27, 2005 21:48

Visual Studio 2005, SQL Server 2005You've probably read it everywhere by now. Visual Studio 2005 is available for download from the MSDN subscribers website. It may be hard to download, as everyone is trying to get their hands on the bits. In fact, you may get the following message:

Error while initiating file transfer. Error Code = 11001. Please contact customer support.
 
  Please try again later.
 
  Thank you for your patience.

At least, I got this one. Let's try tomorrow.

Oh, and SQL Server 2005 is available as well.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Customize the Default Web Page for a ClickOnce Application

by Sander Gerz October 11, 2005 20:13

In an article published recently on DevTips.NET (beware: Dutch) I discuss the benefits of ClickOnce deployment. Though a very useful feature in the .NET 2.0 Framework, it has one (ok, perhaps more) simple limitation. The webpage from which one can download and install the ClickOnce deployment installation seems to be hard coded. And that's no good, since you may want to have additional instructions, your “company style“, and comments in your own language (a reader of my article asked this specific question), etc.

 I've tried to find a way to customize this page from the available options within Visual Studio, only to find this note in the online MSDN help:  

To customize the publish Web page

  1. Publish your ClickOnce application to a Web location. For more information, see How to: Publish a ClickOnce Application.

  2. On the Web server, open the Publish.htm file in Visual Web Designer or another HTML editor.

  3. Customize the page as desired and save it.

How foolish is that! You would have to do this every time you publish a new version. There has to be a better way. For lack of finding one on the web, I created one myself.

The default publish.htm file is almost XML. Almost, since it contains the undefined entity   and XML hates that. But with this element out of the way (doing a simple .Replace() ) you can load the file in an XML document. You see where this is going? Right, XSLT transformation. So first, we figure out how to navigate to the various elements. No worry, I did that for you and placed them in tiny templates:

<xsl:template name="BannerTextApplication">
    <xsl:value-of select="//SPAN[@CLASS='BannerTextApplication']"/>
  xsl:template>
  <xsl:template name="BannerTextCompany">
    <xsl:value-of select="//SPAN[@CLASS='BannerTextCompany']"/>
  xsl:template>
  <xsl:template name="ApplicationName">
    <xsl:value-of select="//TABLE/TR[TD/B='Name:']/TD[position()=3]"/>
  xsl:template>
  <xsl:template name="ApplicationVersion">
    <xsl:value-of select="//TABLE/TR[TD/B='Version:']/TD[position()=3]"/>
  xsl:template>
  <xsl:template name="ApplicationPublisher">
    <xsl:value-of select="//TABLE/TR[TD/B='Publisher:']/TD[position()=3]"/>
  xsl:template>
  <xsl:template name="Prerequisites">
    <xsl:copy-of select="//TABLE[position()=2]//UL">xsl:copy-of>
  xsl:template>

Now you can setup the rest of the XSLT according to your own wishes. I suggest you also include the script element from the original Publish.htm file, because it contains bootstrapping code and verifies wheter the client has the .NET 2.0 Framework already installed. For your convenience, a sample XSLT can be downloaded here. As I'm not much of a designer, please take this sample as a starting point.

Now for the actual transformation, the .NET 2.0 Framework has made XslTransform obsolete. We need to use the new XslCompiledTransform class. Here's the code:

// load the original publish.htm file
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("...url to the original publish.htm file...");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream dataStream = response.GetResponseStream();        
StreamReader reader = new StreamReader(dataStream);        
string responseFromServer = reader.ReadToEnd();
// remove the   entity from the html string
responseFromServer= responseFromServer.Replace(" ", " ");
// load the string in an XML document
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();                
xml.LoadXml(responseFromServer);
// setup and perform the XSLT transformation
XslCompiledTransform xslt = new XslCompiledTransform();        
TextWriter html = new StringWriter();
xslt.Load(Server.MapPath("CustomPublish.xsl"));        
xslt.Transform(xml, null, html);
// write the result to the Response object
Response.Write(html.ToString());
Response.End();

That's it. If you put this code in a Page_Load method for your own custom page, there's no need to edit the publish.htm file everytime you deploy a new version. You may even go as far as creating a page that collects multiple ClickOnce deployable solutions. Because we get the input from the actual and updated ClickOnce webpage.

Currently rated 3.8 by 8 people

  • Currently 3.75/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Installing Team System Foundation; Error 28100.Error loading Event web service

by Sander Gerz October 10, 2005 12:31

Finally...

finally!

It took me almost a day to get it to install successfully. With all the prerequisites and carefull planning. I kept getting the “Error 28100.Error loading Event web service”. There are a few suggestions to resolve this, but none of them applied to my situation. It turned out to be an issue with the SQL reporting server. Upon accessing the url's http://localhost/reports and http://localhost/reportserver the following error appeared in the eventviewer:

It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.

After configuring the sites to use ASP.NET 2.0, the installation went on to install without additional errors. Now on to the real work.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Day Four and a quick recap

by Sander Gerz October 02, 2005 03:11

So this is it. Already. The event is over. Finished. See you next year. Hopefully.

The sessions were a continuation of yesterday's. With the product teams asking for feedback on what they have done, like with VS.NET 2005 and what they are planning to do with C# 3.0. As I mentioned in an earlier post, I still needed to get my head around all the new stuff like extension methods, lambda expressions, etc. Much of this has become clearer, although to really understand, you need a solid testing environment and documentation. We'll probably get more into that in the coming months.

It were these men (and women) in black that we had the great opportunity to discuss with.

These are the guys we have been talking to, yeah! 

Back in the hotel I had the challenge to put everything in my backpack to make sure I didn't have to check in anything for the flight home. I did succeed, although an overflow plastic bag was necessary. I hope that won't pose a problem. There's only a sixty minute window to get me from one plane to the other. Although the experience was great, I'm also eager to get home.  

Currently rated 1.5 by 8 people

  • Currently 1.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Day Three

by Sander Gerz October 01, 2005 15:16

It is great to get a chance to talk to the product group that is building the stuff we developers are going to be using. The purpose today was to discuss upcoming features in the C# language and the .NET Framework. The topics discussed were not surprisingly new, as a lot of 'cool new stuff' (™) has been shown during the PDC. But in stead of listening at it all in the middle of a 1000+ group of people, you're actively invited to have your say about it directly to the people that are going to build it. Upon my question as to the relation between (D)Linq and ObjectSpaces, I'm now pretty confident that the former is not going down the same road as the latter.

I'm not sure if I get a chance to update the blog right after the last day, so I'll just write some stuff up front. It's the same sessions as yesterday, but because all sessions are done at the same time, we can go to the ones that were missed yesterday. The summit will be ended with a BBQ, Sean's favorite hobby.  

I've updated the gallery again.

 

Currently rated 1.5 by 10 people

  • Currently 1.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen | Modified by Mooglegiant