• <dw:daniel_walzenbach runat="server" />

    Tipps & Tricks - „Eingabeaufforderung hier öffnen“ in Vista

    • 1 Comments

    Anbei ein kleiner Trick in Vista. Drückt man Shift und klickt mit der rechten Maustaste auf einen Ordner im Windows Explorer so beinhaltet das Kontextmenü zwei zusätzliche Einträge:

    1. Eingabeaufforderung hier öffnen
    2. Als Pfad kopieren

    „Eingabeaufforderung hier öffnen“ in Vista 

    Cool :-) Gute n8!

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    Wie sehe ich welche SQL Befehle eine Linq to SQL Abfrage erzeugt?

    • 4 Comments

    Mit Linq ist es sehr einfach komplexe Abfragen auf eine Liste von Objekten anzuwenden. Um einmal hinter die Kulissen zu schauen eignet sich die Property Log des DataContext die, wie in diesem Beispiel zu sehen, die SQL Query auf der Console ausgibt.

    Dim db As New NWDataClassesDataContext

    Dim result = From c In db.Customers _

                 Where c.City.StartsWith("M") _

                 Group c.City By key = c.City Into Group _

                 Select key, Group.Count

     

    db.Log = Console.Out

     

    For Each row In result

        Console.WriteLine(row)

    Next

    db.Log = Console.Out erzeugt daraufhin die folgende Ausgabe:
    Durch Linq to SQL erzeugte Query

    Für C# gibt es außerdem einen "LINQ to SQL Debug Visualizer" der die erzeugte Query im Debugger anzeigen kann.

    Happy Coding!

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    Eine Einführung in Lambda-Ausdrücke

    • 1 Comments

    In der Septemberausgabe des MSDN Magazins findet sich eine ausgezeichnete Einführung zum Thema Lambda-Ausdrücke:

    Sehr empfehlenswert ist auch der Artikel New "Orcas" Language Feature: Lambda Expressions auf Scott Guthries Blog.

    Viel Spaß beim Lesen!

      Daniel

  • <dw:daniel_walzenbach runat="server" />

    Warum ist in "Dim x = 1" x ein System.Int32?

    • 4 Comments

    Eines der neuen Features von VB9 und C# 3.0 sind "Implicitly Typed Local Variables". Bei diesem Feature leitet sich der Typ einer Variablen bei der Deklaration aus dem zugewiesenen Ausdruck ab. Verdeutlichen soll dies ein kleines Beispiel:

    Implicitly Typed Local Variables

    In diesem Zusammenhang kommt immer wieder die Frage auf woher der Compiler „weiß“ um welchen Datentyp es sich handelt. Warum ist beispielsweise x in obigem Beispiel ein System.Int32 und kein System.Int16 oder System.Int64? Ein Blick in die Visual Basic Language Specification klärt diese Frage:

    „The type of a literal is determined by its value or by the following type character. If no type character is specified, values in the range of the Integer type are typed as Integer; values outside the range for Integer are typed as Long. If an integer literal's type is of insufficient size to hold the integer literal, a compile-time error results.“

    Mit Hilfe eines Suffixes kann ein Datentyp allerdings explizit definiert werden.

    Dim x = 1S ' makes x a Short

    Dim x = 1I ' makes x an Integer - the default for smaller integers

    Dim x = 1L ' makes x a Long - the default for larger integers

     

    Dim x = 1.0F ' makes x a float (Single)

    Dim x = 1.0R ' makes x a real (Double)

    Dim x = 1D ' makes x a Decimal

     

    Dim x = "1"c ' makes x a Char (as opposed to string)

    Dim x = #12/31/1905# ' makes x a Date

    Schöne Grüße

       Daniel

    P.S.: Timothy Ng hat zwei brilliante Artikel zum dem Thema "Type inference in Visual Basic" geschrieben (Type inference in Visual Basic (part 1) und Type inference in Visual Basic (part 2)).

  • <dw:daniel_walzenbach runat="server" />

    SP1 for Windows Vista targeted for the first quarter of 2008

    • 0 Comments

    Get all the facts on Announcing Windows Vista Service Pack 1 Beta.

    Regards

       Daniel

  • <dw:daniel_walzenbach runat="server" />

    JavaScript Profiling und "Wie verwende ich IE7 mit einem lokalen Proxy (AjaxView/Fiddler/...)"?

    • 1 Comments

    Profiler für C, C++, JAVA, VB.NET, C#, etc. gibt es wie Sand am Meer. Etwas komplizierter wird es wenn es darum geht JavaScript Anwendungen auszuwerten. Außer dem excellenten FireBug, der allerdings nur auf dem Firefox lauffähig ist, sieht's recht mau aus. Glücklicherweise haben sich Emre Kiciman und Benjamin Livshits, beide Kollegen des Microsoft Research Teams, dieses Problems angekommen und Ajax View entwickelt. Ajax View ist ein kleiner Proxy der JavaScript entgegennimmt, dieses zur Laufzeit umschreibt und an den Client zurückgibt. Anhand des umgeschriebenen Codes kann der Proxy die Laufzeiten auswerten und in einer gesonderten Webseite anzeigen. Sehr, sehr COOL!

    Ressourcen

    Noch eine kleine Anmwekung am Rande: IE7 und das .NET Framework verwenden keine Proxies für localhost oder 172.0.0.1. Um dennoch lokal gehostete Anwendungen profilen zu können einfach auf http://machinename/myApp/default.aspx zugreifen.

    In diesem Sinne

    Daniel

    Nachtrag (20070827_1337): P.S.: Der IE7 ist so "schlau" (GRRRRRRR!!!!!), dass Zugriffe auf http://localhost/ - unabhängig der Konfigurationseinstellungen - nie über einen Proxy geroutet werden :-( Dieses Problem kann mit folgender Notation umgangen werden: http://localhost./ (Man achte auf den PUNKT nach localhost!!!) Vielen Dank an Dominick Baier für diesen Tipp!

    Nachtrag (20080216_1612): Alternativ zu http://localhost./ kann man auch http://127.0.0.1./ verwenden (Punkte NACH localhost und 172.0.0.1 beachten). The reason that using the 127.0.0.1. address works and Localhost doesn't is most likely that you're on Vista. The Cassini server only listens on the IPv4 address, but on Vista, Localhost maps by default to IPv6, where Cassini isn't listening.

  • <dw:daniel_walzenbach runat="server" />

    Ressourcen für die Migration von ASP nach ASP.NET

    • 1 Comments

    Anbei einige Ressourcen für die Migration von ASP nach ASP.NET:

    HTHs

    Daniel Walzenbach

  • <dw:daniel_walzenbach runat="server" />

    Spaß mit Google Earth/Google Maps

    • 3 Comments

    Google setzt bei der Erstellung von 3D Modellen, bzw. dem Mapping von Fotos auf besagte Modelle auf die Community. Mit Hilfe von SketchUp können 3D Modelle erzeugt werden, auf Google Earth hochgeladen und anschließend freigegeben werden. Interessanterweise führt das immer wieder zu lustigen Ergebnissen ;-)

    Google Maps

    Sieht fast so aus als befände sich ein schwarzes Loch mitten im Zentrum von Seattle :-)

    Wer sich die Karte im Browser anschauen möchte: http://maps.google.de/?ie=UTF8&ll=47.604601,-122.332522&spn=0.003183,0.005413&t=k&z=18&om=1

    Schöne Grüße

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    Warum funktioniert Javascript Intellisense / Intellicode nicht (mehr) in Visual Studio 2008 Beta 2?

    • 0 Comments

    Eines der richtig coolen Featurers des Visual Studio 2008 ist Javascript Intellisense / Intellicode.

    JavaScript Intellisense in Visual Studio 2008

    Leider musste ich vor einigen Tagen feststellen, dass Javascript Intellisense / Intellicode in meiner Visual Studio 2008 Beta 2 Installation nicht mehr funktionierte :-(. Wie sich herausstellte kommen für dieses Verhalten zwei Ursachen in Betracht.

    1. Es handelt sich um einen sporadisch auftauchenden Bug in ca. jeder 100sten Visual Studio 2008 Beta 2 Installation der rel. einfach zu beheben ist. Um Javascript Intellisense / Intellicode in Visual Studio 2008 Beta 2 zu aktivieren müssen die folgenden zwei Registryeinträge gesetzt sein (Installationspfade gegebenenfalls anpassen):
      1. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\CLSID\{014E9A41-54E5-44ED-B15E-EFFA8758BFFC}]
        "CodeBase"=file:///C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\Microsoft.JScript.AuthoringServices.dll
      2. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\CLSID\{014E9A41-54E5-44ED-B15E-EFFA8758BFFC}\InprocServer32\9.0.0.0]
        "CodeBase"=file:///C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\Microsoft.JScript.AuthoringServices.dll
    2. Bei der Deinstallation der Silverlight Tools for Visual Studio wird die Datei Microsoft.JScript.AuthoringServices.dll versehentlich deinstalliert. Eine Reperatur von Visual Studio 2008 behebt das Problem.

    Happy Coding!

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    SMS Server Toolkit von Microsoft Research

    • 0 Comments

    http://research.microsoft.com/research/downloads/Details/2bdeb3c6-9945-4804-a9bc-0d53704d35da/Details.aspx

    :-)

  • <dw:daniel_walzenbach runat="server" />

    MSDN Solve – wir machen eine kleine Pause für Sie

    • 1 Comments
    MSDN Solve ist die Lösung für alle Entwickler, die praxis-orientierte Hilfestellungen bei typischen Programmier-Herausforderungen suchen. MSDN Solve liefert verständliche Antworten auf immer wiederkehrende Fragen aus dem IT-Alltag und sorgt dafür, dass Sie Stolperfallen in Software-Projekten künftig leicht umschiffen. Mit täglich neuen CodeClips und How-To-Guides begrüßen wir Sie hier auf MSDN Solve. Vom 15.08. bis zum 28.08.2007 wird MSDN Solve im Rahmen eines globalen MSDN Webseiten Relaunches leider keine neuen Inhalte veröffentlichen können.

    Um Ihnen bessere Leistungen bieten zu können, stehen wir mit unseren Kunden in einem ständigen Dialog, um herauszufinden, was Ihnen als Kunde wichtig ist, was Sie stört und wie Sie unsere Angebote und Kommunikation bewerten. Als Reaktion auf Ihr Feedback und nach umfassenden Tests der Benutzerfreundlichkeit implementieren wir auf MSDN Online jetzt ein neues frisches Aussehen und strukturieren unser MSDN Portal neu – mit dem Ziel ihnen noch einfacher und schneller die gesuchten Inhalte präsentieren zu können. Ganz nach dem Motto: "Smarter. Persönlicher. Umfassender.". Derzeit werden diese Änderungen im gesamten MSDN-Bereich sukzessive umgesetzt und Anfang September 2007 sind wir hier unter http://www.msdn-solve.de wieder in gewohnter Art und Weise mit täglich frischen Antworten für Entwickler für Sie da.

    Ihr MSDN Solve Team
    www.msdn-solve.de
  • <dw:daniel_walzenbach runat="server" />

    Wie konvertiere ich ein Array von Bytes in einen String und wieder zurück?

    • 0 Comments

    Aus der Kategorie Tipps- und Tricks…

    Dim myEncoding As System.Text.Encoding = System.Text.Encoding.ASCII

    Dim myByteArray As Byte() = myEncoding.GetBytes("Hallo Welt :-)")

    Dim myText As String = myEncoding.GetString(myByteArray)

    Einfach, oder? ;-)

    Noch mehr Tipps und Tricks finden sich übrigens auf MSDN Solve und für Anregungen aus der Community habe ich jederzeit ein offenes Ohr :-) Wer also mit seinem eigenen Tipp/Trick auf MSDN Solve erscheinen möchte oder wissen will, wie etwas funktioniert... jetzt ist die Gelegenheit :-)

    Schöne Grüße

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    Some ressources to get started with LINQ

    • 1 Comments

    How Do I … LINQ?

    Get started with LINQ to XML in Visual Basic:

    .NET Framework Developer Center > LINQ:

    Prerequisites: SQL Server or SQL Server 2005 Express and Visual Studio or Visual Basic Express.

    Cheers

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    SUPERSIZE ME!

    • 1 Comments

    Ok. Hier ist es! Für alle unter uns die sich nicht mit einer "kleinen Pommes" abgeben. Für alle, die den Hals nicht voll genug bekommen. Für alle, die sich lieber den Magen verrenken als dem Wirt was zu schenken!

    Tata!!!! Das Super-Maxi-Menü! Das Feature Pack for Microsoft SQL Server 2005 :-) Und es enthält nicht ein, nicht zwei sondern sage und schreibe >>33<< (in Worten: dreiunddreißig) Pakete! Und los geht's

    Microsoft ADOMD.NET

      ADOMD.NET is a Microsoft .NET Framework object model that enables software developers to create client-side applications that browse metadata and query data stored in Microsoft SQL Server 2005 Analysis Services. ADOMD.NET is a Microsoft ADO.NET provider with enhancements for online analytical processing (OLAP) and data mining.
      Note: The English ADOMD.Net setup package installs support for all SQL Server 2005 languages.
      Audience(s): Customer, Partner, Developer

    Microsoft Core XML Services (MSXML) 6.0
      Microsoft Core XML Services (MSXML) 6.0 is the latest version of the native XML processing stack. MSXML 6.0 provides standards-conformant implementations of XML 1.0, XML Schema (XSD) 1.0, XPath 1.0, and XSLT 1.0. In addition, it offers 64-bit support, increased security for working with untrusted XML data, and improved reliability over previous versions of MSXML.
      Audience(s): Partner, Developer

    Microsoft OLEDB Provider for DB2
      The Microsoft OLE DB Provider for DB2 is a COM component for integrating vital data stored in IBM DB2 databases with new solutions based on Microsoft SQL Server 2005 Enterprise Edition and Developer Edition. SQL Server developers and administrators can use the provider with Integration Services, Analysis Services, Replication, Reporting Services, and Distributed Query Processor. Run the self-extracting download package to create an installation folder. The single setup program will install the provider and tools on x86, x64, and IA64 computers. The package includes product updates in the form of an integrated Service Pack 1. Read the installation guide and Readme for more information.
      Audience(s): Customer, Developer

    Microsoft SQL Server Management Pack for MOM 2005
      The Microsoft SQL Server Management Pack enables you to monitor SQL Server 2005 and SQL Server 2000 in an enterprise environment. Included are enterprise-level capabilities to monitor resource availability and configuration, collect performance data, and test default thresholds. Local and remote connectivity checks help ensure database availability.
      With the embedded expertise in the SQL Server Management Pack, you can identify issues and manage issues before they become critical. This Management Pack increases the security, availability, and performance of your SQL Server infrastructure.
      The Microsoft SQL Server Management Pack Guide that is included describes the content of the management pack and how to deploy it.
      Audience(s): Customer

    Microsoft SQL Server 2000 PivotTable Services
      PivotTable Services 8.0 is the OLE DB provider for SQL Server 2000 Analysis Services and is used to connect with an Analysis Services 2000 server. PivotTable Services does not work with SQL Server 2005 Analysis Services. Therefore, client applications that need connect to Analysis Services in both SQL Server 2000 and SQL Sever 2005 will need to install both PivotTable Services 8.0 and Analysis Services 9.0 OLE DB Provider in a side-by-side configuration.
      Audience(s): Customer, Partner, Developer

    Microsoft SQL Server 2000 DTS Designer Components
      The Microsoft SQL Server 2000 Data Transformation Services (DTS) package designer is a design tool used by developers and administrators of SQL Server 2005 servers to edit and maintain existing DTS packages until they can be upgraded or recreated in the SQL Server 2005 Integration Services package format. After installing this download, SQL Server 2005 users can continue to edit and maintain existing DTS packages from the Object Explorer in SQL Server 2005 Management Studio and from the Execute DTS 2000 Package Task Editor in Business Intelligence Development Studio, without needing to reinstall the SQL Server 2000 tools. The DTS package designer in this download was formerly accessed from the Data Transformation Services node in SQL Server 2000 Enterprise Manager.
      Audience(s): Customer, Developer

    Microsoft SQL Server Native Client
      Microsoft SQL Server Native Client (SQL Native Client) is a single dynamic-link library (DLL) containing both the SQL OLE DB provider and SQL ODBC driver. It contains run-time support for applications using native-code APIs (ODBC, OLE DB and ADO) to connect to Microsoft SQL Server 7.0, 2000 or 2005. SQL Native Client should be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2005 features. This redistributable installer for SQL Native Client installs the client components needed during run time to take advantage of new SQL Server 2005 features, and optionally installs the header files needed to develop an application that uses the SQL Native Client API.
      Audience(s): Partner, Developer

    Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider
      The Analysis Services 9.0 OLE DB Provider is a COM component that software developers can use to create client-side applications that browse metadata and query data stored in Microsoft SQL Server 2005 Analysis Services. This provider implements both the OLE DB specification and the specification’s extensions for online analytical processing (OLAP) and data mining.
      Note: Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider requires Microsoft Core XML Services (MSXML) 6.0, also available on this page.
      Audience(s): Customer, Partner, Developer

    Microsoft SQL Server 2005 Backward Compatibility Components
      The SQL Server Backward Compatibility package includes the latest versions of Data Transformation Services 2000 runtime (DTS), SQL Distributed Management Objects (SQL-DMO), Decision Support Objects (DSO), and SQL Virtual Device Interface (SQLVDI). These versions have been updated for compatibility with SQL Server 2005 and include all fixes shipped through SQL Server 2000 SP4.
      Audience(s): Customer, Partner, Developer

    Microsoft SQL Server 2005 Command Line Query Utility
      The SQLCMD utility allows users to connect, send Transact-SQL batches, and output rowset information from SQL Server 7.0, SQL Server 2000, and SQL Server 2005 instances. SQLCMD is a replacement for ISQL and OSQL, but can coexist with installations that have ISQL or OSQL installed.
      Note: Microsoft SQL Server 2005 Command Line Query Utility requires Microsoft SQL Server Native Client, also available on this page.
      Audience(s): Customer, Partner, Developer

    Microsoft SQL Server 2005 Datamining Viewer Controls
      The Data Mining Web Controls Library is a set of Microsoft Windows Forms controls that enable software developers to display data mining models created using Microsoft SQL Server 2005 Analysis Services in their client-side applications. The controls in this library display the patterns that are contained in Analysis Services mining models.
      Note: Microsoft SQL Server 2005 Datamining Viewer Controls requires Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider and Microsoft ADOMD.NET, also available on this page.
      Audience(s): Partner, Developer

    Microsoft SQL Server 2005 JDBC Driver
      In its continued commitment to interoperability, Microsoft has released and supports a new Java Database Connectivity (JDBC) driver for SQL Server 2005. The SQL Server 2005 JDBC Driver download is available to all SQL Server users at no additional charge and provides access to SQL Server 2000 and SQL Server 2005 from any Java application, application server, or Java-enabled applet. This is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application programming interfaces (APIs) available in J2EE (Java2 Enterprise Edition).
      Audience(s): Partner, Developer

    Microsoft SQL Server 2005 Management Objects Collection
      The Management Objects Collection package includes several key elements of the SQL Server 2005 management API, including Analysis Management Objects (AMO), Replication Management Objects (RMO), and SQL Server Management Objects (SMO). Developers and DBAs can use these components to programmatically manage SQL Server 2005.
      Note: Microsoft SQL Server 2005 Management Objects Collection requires Microsoft Core XML Services (MSXML) 6.0 and Microsoft SQL Server Native Client, also available on this page.
      Audience(s): Customer, Partner, Developer


    Microsoft SQL Server 2005 Compact Edition
      Microsoft SQL Server 2005 Compact Edition is the next version of SQL Server Mobile adding the desktop platform. SQL Server Compact extends the SQL Server Mobile technology by offering a low maintenance, compact embedded database for single-user client applications for all Windows platforms including tablet PCs, pocket PCs, smart phones and desktops. Just as with SQL Server Mobile, SQL Server Compact is a free, easy-to-use, lightweight, and embeddable version of SQL Server 2005 for developing desktop and mobile applications.
      Audience(s): Customer, Partner, Developer

    Microsoft SQL Server 2005 Notification Services Client Components
      The SQL Server 2005 Notification Services Client Components package provides client APIs that enable subscription management and event submission within custom applications that include SQL Server 2005 Notification Services functionality. The subscription management APIs allow developers to create subscriptions and subscribers, and manage subscriber devices. The event submission APIs allow users to specify events using the event APIs or stored procedures.
      Audience(s): Partner

    Microsoft SQL Server 2005 Upgrade Advisor
      Upgrade Advisor analyzes instances of SQL Server 7.0 and SQL Server 2000 in preparation for upgrading to SQL Server 2005. Upgrade Advisor identifies deprecated features and configuration changes that might affect your upgrade, and it provides links to documentation that describes each identified issue and how to resolve it.
      Audience(s): Customer, Developer

    Microsoft .NET Data Provider for mySAP Business Suite, Preview Version
      SQL Server 2005 includes support for accessing SAP data by using the Microsoft .NET Data Provider for mySAP Business Suite. This provider lets you create an Integration Services package that can connect to a mySAP Business Suite solution and then execute commands to access data via supported interfaces. You can also create Reporting Services reports against a server running the mySAP Business Suite.
      You can use the Microsoft .NET Data Provider for mySAP Business Suite in the SQL Server Import and Export Wizard and in various Integration Services features (including the Script task, the DataReader Source component, and the Script component), as well as the data processing extensions in Reporting Services.
      The Microsoft .NET Data Provider for mySAP Business Suite is not included in SQL Server 2005. The preview version is licensed as pre-release software as outlined in the License Terms. See the Readme included with the download for information on the prerequisites for using the Microsoft .NET Data Provider for mySAP Business Suite.
      Audience(s): Customer, Partner, Developer

    Reporting Add-In for Microsoft Visual Web Developer 2005 Express
      The Reporting Add-In for Microsoft Visual Web Developer 2005 Express includes a ReportViewer control, an integrated report designer, and a comprehensive API that lets you customize run-time functionality. You can use the control to add interactive real-time data reports to your ASP.NET Web applications. Reports can use data from any ADO.NET DataTable or custom Business object. You can create reports that combine tabular, matrix, and visual data in free-form or traditional report layouts. An integrated report designer is included so that you can create the custom reports that bind to the control.
      The Reporting Add-In is the same reporting component that is included with other editions of Visual Studio, but without support for Windows Forms applications. For more information including product documentation and samples, see the ReportViewer Controls (Visual Studio) topic on MSDN.
      Audience(s): Developer

    Microsoft Exception Message Box
      The exception message box is a programmatic interface that you can use in your applications for any tasks for which MessageBox may be used. The exception message box is a supported managed assembly designed to elegantly handle managed code exceptions. It provides significantly more control over the messaging experience and gives your users the options to save error message content for later reference and to get help on messages.
      Audience(s): Developer

    Data Mining Managed Plug-in Algorithm API for SQL Server 2005
      The Managed Plug-in API is a Microsoft .NET object model that enables software developers to create plug-in data mining algorithms for SQL Server 2005 by using CLI-compliant languages, such as Visual C# 2.0. The object model is available as source code and it needs to be built on the developer’s computer. The package includes a step-by-step tutorial, a compiled HTML help file (.chm), as well as a sample plug-in algorithm developed in C#.
      Audience(s): Partner, Developer

    Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologies
      Microsoft SQL Server 2005 Reporting Services Add-in for SharePoint Technologies allows you to take advantage of SQL Server 2005 Service Pack 2 (SP2) report processing and management capabilities in SharePoint. The download provides a Report Viewer web part, web application pages, and support for using standard Windows SharePoint Services.
      Audience(s): Customer, Partner, Developer

    Microsoft SQL Server 2005 Data Mining Add-ins for Microsoft Office 2007
      Microsoft SQL Server 2005 Data Mining Add-ins for Microsoft Office 2007 allow you take advantage of SQL Server 2005 predictive analytics in Office Excel 2007 and Office Visio 2007. The download includes Table Analysis Tools for Excel, Data Mining Client for Excel, and Data Mining Templates for Visio.
      Audience(s): Customer, Partner, Developer

    SQL Server 2005 Performance Dashboard Reports
      The Microsoft SQL Server 2005 Performance Dashboard Reports are a set of Reporting Services report files that run within SQL Server 2005 SP2 Management Studio and later versions. These reports let SQL Server users more easily identify when a performance problem is occurring, and to identify the most likely cause. If more assistance is needed, the administrator can accurately describe the problem to technical support. This results in faster problem resolution.
      Audience(s): Customer, Developer

    SQL Server 2005 Best Practices Analyzer
      The SQL Server 2005 Best Practices Analyzer (BPA) gathers data from Microsoft Windows and SQL Server configuration settings. BPA uses a predefined list of SQL Server 2005 recommendations and best practices to determine if there are potential issues in the database environment.
      Audience(s): Customer

     

    In diesem Sinne viel Spaß beim Download ;-)

       Daniel

  • <dw:daniel_walzenbach runat="server" />

    JavaScript in JSP, PHP oder ASP/ASP.NET Seiten mit Visual Studio 2008 debuggen

    • 2 Comments

    Zugegeben, neu ist dieses Feature nicht mehr, beeindruckend allerdings immer wieder! Mein Kollege Kirk beschreibt in seinem Blog auf http://blogs.msdn.com/kaevans/archive/2007/08/10/javascript-debugging-in-visual-studio-2008.aspx genau die notwendigen Schritte JavaScript auf einer PHP Seite zu debuggen. Beeindruckender ist nur, dass dieses Feature in dem kostenlos verfügbaren Visual Studio Express 2008 vorhanden ist...

  • <dw:daniel_walzenbach runat="server" />

    Deep Dive ASP.NET Server Controls

    • 1 Comments

    Vor einiger Zeit habe ich eine Webcastserie zum Thema Server Controls (ASP. NET Server Controls – eine Kampfansage an „Clipboard Inheritance“ in neun Teilen) gehalten. Fokus dieser Serie waren die unterschiedlichen Arten von ServerControls (Inherited Controls, Rendered Controls und Conposite Controls), deren Vor- und Nachteile und wie diese programmiert werden können. Zusätzlich wurden UserControls beleuchtet und gezeigt, wie ServerControls mit Templates erweitert werden können.

    Ergänzend zu dieser Serie fand ich gestern eine sehr interessante, dreiteilige Artikelserie welche sich mit der dynamischen Erzeugung von Server Controls befasst.

    TRULY Understanding Dynamic Controls (Part 1)
    TRULY Understanding Dynamic Controls (Part 2)
    TRULY Understanding Dynamic Controls (Part 3)

    Viel Spaß beim Abtauchen!

       Daniel

  • <dw:daniel_walzenbach runat="server" />

    How Software is built

    • 0 Comments

    Hi

    Microsoft has commissioned a project to look at the software development & delivery lifecycle of “closed source” companies and compare/contrast that to software development and delivery lifecycle of commercial “open source” companies.  The investigation will look at not only how software is designed, developed and tested – but also at  how the vendor is able to leverage the ecosystem. 

    A blog (http://www.howsoftwareisbuilt.com) has been set up to gather perspectives on both the Open Source and Closed Source Development Models and to encourage wide audience feedback and input for the study.  We have conducted interviews with various industry experts to get their insights on both the development models.

    The project has generated a lot of excitement and interest within Microsoft and the Open Source Community and we have been able to gather perspectives from various experts on both the sides.
    Some of the people interviewed on either side are as below:

    • Ryan Waite, Group Program Manager for High-Performance Computing at Microsoft.
    • Mark Gross, Engineer Open Source Technology center Intel Corporation
    • Shawn Burke, Director, Microsoft’s .NET Developer Platform group
    • Stormy Peters, Director Community and Partner Programs OpenLogic
    • Michael Howard, Senior Security Program manager at Microsoft
    • Phil Costa, Director of Product Management for Flex and ColdFusion at Adobe
    • Marc Miller, Open Source Software Evangelist in the AMD Developer Outreach Organization
    • Patrick Hogan, NASA World Wind
    • Jay Pipes, North American Community Relations Manager at MySQL
    • John McCreesh - Marketing Program Lead – OpenOffice
    • James Reinders - Chief Evangelist - Software Products Division - Intel

    Please feel free to visit the blog and share your insights.

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    Ich will es wissen! Was machen wir (als Microsoft) gut, was machen wir schlecht und was sollten wir anders machen?

    • 11 Comments

    Ok. Hier ganz unverblühmt. Der virtuelle Kummerkasten! Ich will es wissen und ich versuche Antworten zu geben warum wir machen was wir machen!

    1. Was machen wir (als Microsoft) gut
    2. was machen wir schlecht und
    3. was sollten wir anders machen?

    Jetzt ist die Gelegenheit mal Frust abzulassen, ein positives Feedback zu geben oder auch konstruktive Kritik zu üben. Und zwar in allen Bereichen! Nicht nur rund um die Softwareentwicklung. Also, los geht's!

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    Kocht ViewState meinen Kaffee oder macht er mich attraktiver für das andere Geschlecht?

    • 3 Comments

    Der wahrscheinlich umfassendste Artikel den ich zu diesem Thema je gefunden habe. Hier bleiben keine Fragen offen ;-) Definitiv ein Muss für jeden ernsthaften Webentwickler!

    http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx

  • <dw:daniel_walzenbach runat="server" />

    Automatische Sicherung für den SQL Server 2005 Express - Beta Tester gesucht

    • 0 Comments

    Ruprecht Dröge – MSDN Solve SQL Server Spezializst (http://www.microsoft.com/germany/msdn/solve/knowhow/sql/default.mspx), sucht derzeit Beta-Tester für sein Tool, das eine automatische Sicherung des SQL Server Express ermöglicht. Gesucht werden Teilnehmer, die bereit sind, das Programm intensiv zu testen und Feedback zu geben. Details finden sich unter http://blogs.sqlserverfaq.de/Lists/Beitraege/Post.aspx?ID=44.

    Schöne Grüße

    Daniel

  • <dw:daniel_walzenbach runat="server" />

    Daily .Net Feeds - ASP.Net 2.0 - Advanced - Day 15

    • 4 Comments

    Hi Everyone,

    Welcome back!!!

    As mentioned yesterday, today we will be wrapping up with the discussion about the ASP.Net 2.0 compilation machinery with the discussion about virtual path providers.

    Virtual Path Providers:

    Before the advent of ASP.NET 2.0, a source ASP.NET page could be only an .aspx file deployed on the server and located in a particular folder. A one-to-one correspondence is required between .aspx resources and files on disk. In ASP.NET 2.0, the virtual path provider mechanism allows you to virtualize a bunch of files and even a structure of directories. You can abstract web content away from the physical structure of the file system. Created to serve the needs of SharePoint (the next version of SharePoint when ASP.Net 2.0 was being designed was to be built on top of ASP.NET 2.0) virtual path providers prove extremely useful to ASP.NET developers too. For example, you can register a path provider and serve ASP.NET the source code of your pages reading from a database. (Yes, this is just what SharePoint does with its earlier version and will do, based on ASP.NET 2.0.)

    Structure of a Virtual Path Provider:

    A virtual path provider (VPP) is a class that inherits from the VirtualPathProvider class and implements a virtual file system for a Web application. In such a virtual file system, you're essentially using files and directories that a custom data store other than the file system will provide. Most files involved with the processing of an ASP.NET request can be stored in a virtual file system. The list includes ASP.NET pages, themes, master pages, user controls, custom resources mapped to a build provider, and static Web resources such as HTML pages and images.

    A VPP can't serve global resources—such global.asax and web.config—and the contents of reserved folders—such as Bin, App_Code, App_Data, App_GlobalResources, and any App_LocalResources. Below table details the members to override in a sample VPP component.

    Member

    Description

    CombineVirtualPaths

    Combines a base path with a relative path to return a complete path to a virtual resource

    DirectoryExists

    Indicates whether a directory exists in the virtual file system

    FileExists

    Indicates whether a file exists in the virtual file system

    GetCacheDependency

    Creates a cache dependency based on the specified virtual paths

    GetCacheKey

    Returns a cache key to use for the specified virtual path

    GetDirectory

    Gets a reference to a VirtualDirectory-derived class that represents the virtual directory the requested resource is mapped to

    GetFile

    Gets a reference to a VirtualFile derived class that represents the virtual file the requested resource is mapped to

    GetFileHash

    Returns a hash of the specified virtual paths

    Previous

    Protected property, gets a reference to a previously registered VPP object to ensure that the resource can be resolved either by a registered VPP or the default one

    When writing a custom VPP, it is important that you override GetFile and GetDirectory and use the Previous property carefully. Here's an example:

    public override VirtualFile GetFile(string virtualPath)

    {

        if (IsPathVirtual(virtualPath))

            return new YourVirtualFile(virtualPath, this);

        else

            return Previous.GetFile(virtualPath);

    }

    In the preceding code, IsPathVirtual is a private function that simply establishes whether your VPP is able to process the virtual path. If not, you pass the request down to the next VPP in the ASP.NET chain. If you omit the call to Previous, the request won't be processed.

    private bool IsPathVirtual(string virtualPath)

    {

        // For example

        // Check the virtual path against your data store

    }

    Structure of a Virtual File:

    A virtual path provider works by taking URLs and checking whether a VPP is registered to handle that URL. If so, the VPP is given a chance to return the ASP.NET source for that path. A VPP returns the source of a virtual path through an object that inherits from the class VirtualFile. Following table details the members to override in a virtual file class.

    Member

    Description

    IsDirectory

    Indicates whether this is a virtual resource that should be treated as a file

    Name

    Gets the display name of the virtual file

    VirtualPath

    Gets the path of the virtual file

    Open

    Returns a read-only stream that refers to the contents of the requested resource

    The key thing to do when writing a custom virtual file class is to override the Open method and make it return a read-only stream to the contents of the virtual resource. In the Open method, you use the virtual path as the key to access the data store and retrieve the source code.

    Registering a Virtual Path Provider:

    Unlike most providers, a virtual path provider is not registered through the web.config file. You can register your VPP either in the Application_Start global event or by adding a static AppInitialize method to some class deployed in App_Code. Here's a sample class you can drop in App_Code to register a VPP:

    public static class AppStart

    {

        public static void AppInitialize()

        {

            // Add a new VPP to the chain

            MyPathProvider vpp = new MyPathProvider();

            HostingEnvironment.RegisterVirtualPathProvider(vpp);

        }

    }

    The name of the surrounding class is arbitrary; the name and signature of AppInitialize are not :-). If multiple static methods with this name exist in the different classes stored in App_Code, you get a compile error.

    Important Note: It is essential that a virtual path provider be registered prior to any page parsing or compilation. If a path provider is registered in other points in the application (for example, web.config) or page life cycle, some unexpected results may show up. There's no syntax requirement that prevents you from registering a VPP, say, in Page_Load. However, if the VPP is registered after the page assembly has been generated, there's no way to invalidate the link between that page and that assembly. As a result, when requesting that page, the VPP will be bypassed. It still makes sense to register a VPP from within a page event, but only if you do that from a page that is not designed to be served by the VPP and that is invoked prior to any page served by the VPP. As you can see, it might not be a common situation and so the above method is usually used.

    That's it for today. Thanks for joining!!! See you tomorrow. Tomorrow we will start discussing about HTTP Handlers and Modules.

    Thanks,

    Sukesh Khare
    Coordinator Daily .Net Feed Program

  • <dw:daniel_walzenbach runat="server" />

    Daily .Net Feeds - ASP.Net 2.0 - Advanced - Day 14

    • 1 Comments

    Hi Everyone,

    Welcome back!!!

    Yeah, we skipped a few days again, just got a bit busy with my cases. As mentioned earlier, today we will be taking up the discussion about ASP.Net 2.0 Build Providers.

    Build Providers:

    In ASP.NET 1.x, only a few file types are dynamically compiled into assemblies—ASP.NET pages, user controls, ASP.NET Web services, and custom HTTP handlers. In ASP.NET 2.0, compilation model is extended to virtually any file type that you use in your application. In ASP.NET 2.0, commonly used file types are bound to a special breed of component—the build provider—which communicates with the ASP.NET infrastructure and provides the code representation of the contents of the specified file. Hence the build provider registered to process .aspx files will parse the .aspx markup and build a class according to the rules we identified in the session for "Day 5". This class will then be transformed into an assembly with a given scope.

    ASP.NET developers are familiar with this model. The great news is that ASP.NET 2.0 applies this same model to a wide range of file types, such as class files (.cs, .vb), resource files (.resx), Web service references (.wsdl), typed DataSet (.xsd), themes, and so on. Certain file types undergo a runtime transformation process when dropped in some reserved folders. This transformation is driven by native build providers with the same internal architecture and mechanics of providers that build ASP.NET pages.

    Essentially, a build provider is a component that can plug into the ASP.NET compilation system and provide custom compilation support for some file types. Build providers can automatically generate an appropriate proxy class by interpreting at compile time the contents of the source file. A build provider generates compilable code and keeps it in sync with the source file; as the source file changes, the build provider kicks in again and updates everything. To solidify this abstract discussion :-) of build providers let's take a look at the following excerpt from the default configuration file. It illustrates the built-in bindings between file types and native build providers:

    <compilation>

        <buildProviders>

            <add extension=".aspx"

                type="System.Web.Compilation.PageBuildProvider" />

            <add extension=".ascx"

                type="System.Web.Compilation.UserControlBuildProvider" />

            <add extension=".master"

                type="System.Web.Compilation.MasterPageBuildProvider" />

            <add extension=".asmx"

                type="System.Web.Compilation.WebServiceBuildProvider" />

            <add extension=".ashx"

                type="System.Web.Compilation.WebHandlerBuildProvider" />

            <add extension=".resx"

                type="System.Web.Compilation.ResXBuildProvider" />

            <add extension=".resources"

                type="System.Web.Compilation.ResourcesBuildProvider" />

            <add extension=".wsdl"

                type="System.Web.Compilation.WsdlBuildProvider" />

            <add extension=".xsd"

                type="System.Web.Compilation.XsdBuildProvider" />

            <add extension=".js"

                type="System.Web.Compilation.ForceCopyBuildProvider" />

        </buildProviders>

    </compilation>

    Note: All these build providers are nonpublic, internal classes defined in the System.Web.Compilation namespace inside the system.web assembly. All these classes derive from one common root—the BuildProvider class.

    We'll get into the details of BuildProviders in a moment. For now, the following figure shows the conceptual layout of the ASP.NET compilation model.

    Conceptual Layout of ASP.Net Compilation System

    The host environment receives input from external components—a client (for example, Visual Studio 2005 or precompilation utilities) using the ClientBuildManager API or the ASP.NET pipeline—and activates the build manager. The build manager, in turn, invokes the build provider in charge of the resource. When the proxy class has been generated, the assembly builder kicks in to compile the source.

    Note: Build providers are an important building block in the overall ASP.NET infrastructure, but they are certainly not the kind of component you'll have to tinker with every day. You should know that they exist and how they work. In the end, however, you'll rarely run into them unless you need to adjust the way certain files are processed by ASP.NET.

    Build providers kick in during compilation, but compilation can occur for two different reasons—to service a user request at run time and to precompile an application. A file for which a build provider is registered is passed to the provider and processed. What happens next depends on the build provider logic. Application files mapped to a .NET language (for example, .cs or .vb files) are passed to the respective compilers and processed, but they are not deployed. Files that are bound neither to compilers nor build providers are ignored during the compilation step. The precompilation for the deployment mechanism, though, copies them to the final layout.

    There are two points left open tough – a couple exceptions: What happens with .js files? And what if you want to exclude some files from deployment? ForceCopyBuildProvider addresses the former, while IgnoreFileBuildProvider is used for the latter.

    The ForceCopyBuildProvider Provider:

    Specifically designed for .js files, this provider ensures that .js files are always copied during the precompilation for deployment. The issue is that .js is the extension of a standard .NET language—JScript. According to the rules we just outlined, Javascript files wouldn't be deployed. However, a .js file is often a client-side file, the lack of which can compromise an application. To avoid that, the .js extension is bound to ForceCopyBuildProvider, and .js files are then always copied when you deploy your Web site through the Copy Web Site operation in Visual Studio 2005.

    The IgnoreFileBuildProvider Provider:

    Whereas ForceCopyBuildProvider always copies files, the IgnoreFileBuild provider always excludes files of a certain type from participating in any compiling or publishing operation. The ignore-file provider is particularly useful for development-only files you maintain for internal purposes but that have no reasons for being deployed—for example, a Microsoft Office Word document, Microsoft Office Visio diagrams, and so on. Enter the following script in your web.config file to let the compilation system ignore .doc files.

    <compilation>

        <buildProviders>

            <add extension=".doc"

                type="System.Web.Compilation.IgnoreFileBuildProvider" />

        </buildProviders>

    </compilation>

    Architecting a Custom Build Provider:

    Build providers are a constituent part of the compilation machinery and participate in build operations regardless of the starter—be it Visual Studio 2005 or the ASP.NET runtime. As a developer, you can implement your own provider to add custom semantics to ASP.NET compilation.

    An interesting example consists of adding logic to process files with a given extension whose contents represent a mapping with one or more database tables. The provider could then dynamically generate strongly typed classes to render columns in the table. Classes will be generated any time one of these files is added to the project. Nicely enough, build providers also get you full IntelliSense support within Visual Studio 2005.

    Note:

    Have you ever wondered what the magic is that allows Visual Studio 2005 to recognize control properties through IntelliSense on the code-behind class of an .aspx page? In ASP.NET 1.x, Visual Studio .NET 2003 created ad hoc members to represent controls in protected regions so that the class was complete for a .NET reflection analysis. In ASP.NET 2.0, members that represent server controls are created at compile time thanks to the mechanism of partial classes. So how can IntelliSense work correctly on code files?

    The answer is that Visual Studio 2005 has the .aspx build provider generate the dynamic source code of the class with all missing declarations. The resulting assembly is loaded in the Visual Studio 2005 process; the resulting type of the page is scanned through reflection to populate the IntelliSense drop-down lists. So the process we studied on "Day 5" about aspx markup being parsed to generate corresponding partial class definition is continuously happening as we type code. :-)

    That's it for today. Thanks for joining!!! See you tomorrow. Tomorrow we will discuss an extremely interesting new feature of ASP.Net 2.0 – Virtual Path Provider. Post that in the oncoming sessions we will be delving into HTTP Handlers and Modules.

    Thanks,

    Sukesh Khare
    Coordinator Daily .Net Feed Program

  • <dw:daniel_walzenbach runat="server" />

    Daily .Net Feeds - ASP.Net 2.0 - Advanced - Day 13

    • 7 Comments

    Hi Everyone,

    Welcome back!!!

    As mentioned earlier, today we will be wrapping up with the discussion about the ASP.Net 2.0 reserved folders. Let's take a look and understand the other ASP.Net special folders that we didn't consider yesterday.

    The App_Data Folder:

    The App_Data folder is expected to contain data stores local to the application. It typically contains data stores in the form of files such as Microsoft Access or Microsoft SQL Server Express databases, XML files, text files, and whatever else your application can support. The contents of the folder are not processed by ASP.NET. The folder is the default location where ASP.NET providers store their data.

    Note: The default ASP.NET account is granted full permissions on the folder. If you happen to change the ASP.NET account, make sure that the new account is granted read/write permissions on the folder.

    The App_GlobalResources Folder:

    Let's quickly understand what are resources? Just like other applications, an ASP.NET application can, and often should, use resources. Resources are an effective way to isolate localizable portions of the application's user interface. In general, a resource is non-executable text associated with the program. Typical resources are images, icons, text, and auxiliary files, but any serializable object can be considered a resource. Application resources are stored outside of the application so that they can be recompiled and replaced without affecting and recompiling the application itself.

    In ASP.NET 1.x, compiling resources inside an assembly (or satellite assemblies), although done by Visual Studio but was still a rather transparent task and more often developers need to be aware of several minute details to manage these resources. Basically, an ASP.NET application needs to have a primary assembly to contain the default or neutral resources for the application. In addition, we deploy a number of satellite assemblies, each containing localized resources for a particular culture we want to support. We have to manually compile XML-based resource files (those with a .resx extension) into a .resources binary file. These files can be either embedded in a .NET executable or compiled into satellite assemblies. We use the Resource File Generator (resgen.exe) utility to convert text and XML-based resource files into .resources files. The resource file names follow the naming convention baseName.cultureName.resources. Usually, the base name is the name of the application. A typical command line could be as follows:

    resgen.exe MyAppName.resx MyAppName.it.resources

    Once created, the .resources file should be embedded into an assembly, or it can even be used as is as a resource container. To embed the resource file into a satellite assembly, we use the Assembly Linker tool (al.exe). On the command line, we indicate the culture (it in our example, which represents Italian) and the name of the assembly.

    al /out:MyAppName.resources.dll /c:it /embed:MyAppName.it.resources

    After we compile our satellite assemblies, they will all have the same name. We deploy them in distinct subdirectories, each named after the culture. Fortunately, with ASP.NET 2.0, gone are the days of satellite assemblies. More precisely, satellite assemblies are still there, but they are a thing of the past for developers thanks to the App_GlobalResources reserved folder. Any .resx files located within the folder are automatically compiled to satellite assemblies. The name of the .resx file contains culture information to help the ASP.NET runtime environment with the assembly generation. The following files—resources.resx, resources.it.resx, resources.fr.resx—generate the neutral assembly and satellite assemblies for the Italian and French cultures respectively. The neutral assembly is the default culture resource used by the application if no specific culture is called for. Resource files located in the App_GlobalResources folder are global to the application and can be referenced from within any page. Resource reading results are greatly simplified as compared to ASP.NET 1.x:

    <asp:Label ID="Label1" Runat="server" Text="<%$ Resources:ResxFile, MyResName %>" />

    We can now bind global resources declaratively using the newest $-expression named Resources. (As already mentioned in one of the session, we'll cover $-expressions in more detail during one of the oncoming sessions) For now, the expression takes two parameters—the name of the .resx source file (no extension), and the name of the resource to retrieve. To access resources programmatically, you resort to the following code:

    HttpContext.GetGlobalResourceObject(resxFile, MyResName);

    Both parameters are strings and have the same role as the parameters in the $-expression. Moreover, the implementation of the $- expression Resources uses GetGlobalResourceObject internally.

    The App_LocalResources Folder:

    App_LocalResources is a subdirectory located below the folder that contains some ASP.NET pages. The folder can be filled with .resx files named after the pages located one level upper in the hierarchy. Assuming that the parent folder contains test.aspx, here are few feasible resource files you can find in the App_LocalResources folder: test.aspx.resx, test.aspx.it.resx, test.aspx.fr.resx. Obviously, resources stored in the aforementioned files have an effect only on test.aspx and are visible (and can be used) only from within the linked page.

    How do you access a page-specific resource? For programmatic access, you use the following code:

    HttpContext.GetLocalResourceObject("/ProAspNet20/ResPage.aspx", "PageResource1.Title");

    The first parameter indicates the virtual path of the page; the second parameter is the resource name. For declarative access, you use the meta:ResourceKey attribute. Here's an example:

    <asp:Button ID="Button1" Runat="server" meta:resourcekey="ButtonResource1" />

    The declaration associates a unique resource key with the specified button instance. The local .resx file will contain entries of the form prefix.name, where prefix is a resource key and name is a property name on the bound control. To give the button a localizable caption (the Text property), you simply create a ButtonResource1.Text entry in the resource file.

    Resource files found in both the local and global resource folders are compiled to create classes for satellite assemblies. The net effect is that developers create .resx files and test the page. The ASP.NET compilation machinery does the rest.

    The App_Themes Folder:

    The App_Themes folder defines themes for ASP.NET controls. Each theme takes a folder under App_Themes. Defined, a theme is a collection of files with style information. Compiled, the contents of the files in a theme folder generate a class that, invoked by the page, programmatically sets styles on themed controls.

    The App_Themes folder lists themes local to the application. An application can also inherit global themes defined in the following folder:

    %WINDOWS%\Microsoft.NET\Framework\[version]\ASP.NETClientFiles\Themes

    From the compilation perspective, there's no difference between global and local themes. If a theme with a given name exists both locally to the application and globally to the server machine, the local theme takes precedence.

    The App_WebReferences Folder:

    In Visual Studio .NET 2003, an ASP.NET application that requires access to a Web service will obtain the corresponding .wsdl file through the Add Web Reference dialog box. The Web Service Description Language (WSDL) document for the Web service is not sufficient to make the Web service usable from the page. An ASP.NET page is ultimately a managed class and needs another managed class to talk to. So the Web service is wrapped by a proxy class. The proxy class is created by Visual Studio using the services of a command-line tool—wsdl.exe. The proxy class contains as many methods as there are Web methods on the Web service, and it incorporates any custom data type defined by the public interface of the Web service.

    There are no significant costs for developers in this operation. However, developers are clearly dependent on Visual Studio to generate the proxy class. Wouldn't it be easier and simpler if you could just drop the .wsdl file somewhere in the application's tree and have ASP.NET deal with the rest? This is just what the App_WebReferences folder is for.

    It recognizes .wsdl files describing bound Web services, and it generates runtime proxy classes so that ASP.NET pages can place calls to the Web service in a type-safe manner. The App_WebReferences folder can contain subfolders. The name of the subfolder drives the namespace of the resulting proxy class, whereas the WSDL file defines the classname. For example, the samples.wsdl file in MyApp subfolder will originate a proxy class named MyApp.Samples. The dynamically created assembly is named App_WebReferences.xxx.dll, where xxx is a random sequence of characters.

    That's it for today. Thanks for joining!!! See you tomorrow. Tomorrow we will start discussing about Asp.Net 2.0 build providers.

    Thanks,

    Sukesh Khare
    Coordinator Daily .Net Feed Program

  • <dw:daniel_walzenbach runat="server" />

    CSS in Visual Studio 2008 rockt!!!

    • 2 Comments

    An CSS geht kein Weg vorbei und mit Visual Studio 2008 gibt es es nun endlich den passenden Support.

    Ein kleines, einfaches Beispiel:

    <body>

        <form id="form1" runat="server">

        <div>

            <asp:Label ID="Label1" runat="server" CssClass="xxx" Text="Test"></asp:Label>

        </div>

        </form>

    </body>

    Die Seite referenziert folgendes CSS-Stylesheet

    Body {

          font-family: Verdana;

    }

    .xxx{

          font-family: Calibri;

    }

    Frage: Welche Schriftart wird auf Label1 angewendet?

    Was in diesem Beispiel noch einfach ist wird komplizeirter, wenn mehrere, kaskadierte Stylesheets zum Einsatz kommen.

    Glücklich, wer in diesen Situationen auf Visual Studio 2008 zurückgreifen kann...

    Schöne Grüße aus Seattle!

        Daniel

  • <dw:daniel_walzenbach runat="server" />

    Daily .Net Feeds - ASP.Net 2.0 - Advanced - Day 12

    • 3 Comments

    Hi Everyone,

    Welcome back!!!

    As mentioned earlier, today we will discuss about the ASP.Net 2.0 reserved folders. There a number of reserved folders that you will see applicable to an ASP.Net 2.0 application. We will now try to understand what each of these is and what their respective purposes are. As there are many such folders, and each has its own associated concept, we will see a few today and the remaining tomorrow:

    Folder name

    File Types

    Notes

    Bin

    .dll

    Contains any prebuilt assemblies required by the application.

    App_Browsers

    .browser

    Contains application-specific browser definition files that ASP.NET uses to identify individual browsers and determine their capabilities.

    App_Code

    .cs, .vb, .xsd, custom file types

    Contains source class files to compile as part of the application. ASP.NET compiles the code in this folder when pages are requested. Code in the folder is referenced automatically in applications.

    App_Data

    .mdb, .mdf, .xml

    Contains Microsoft Office Access and SQL Express files as well as XML files or other data stores.

    App_GlobalResources

    .resx

    Contains resource files to be used programmatically in the localization of an application.

    App_LocalResources

    .resx

    Contains page-scoped resource files.

    App_Themes

    .skin, .css, .xsl, auxiliary files

    Contains a collection of files that define the appearance of ASP.NET pages and controls.

    App_WebReferences

    .wsdl

    Contains WSDL files to generate proxy classes and other files associated with using Web services in your application.

    The Bin Folder:

    The Bin folder contains all deployable assemblies required by the application for controls, components, or other code that you want to reference. Any .dll files found in the directory will be automatically linked to the application. If unused or outdated files are left around, the risk is that you'll get "ambiguous reference" exceptions. In other words, if two distinct assemblies define the same class (same namespace and class name), the ASP.NET runtime can't resolve which one to use and raises an exception. This is a common error when, at development time, you rename a project or an assembly name. To avoid that, make sure that no unnecessary assembly is found or at least remove the following line from the <assemblies> section in the configuration file:

    <add assembly="*" />

    Of all the folders listed in above table, only Bin is recognized by ASP.NET 1.x applications also.

    The App_Browsers Folder:

    This folder contains .browser files. A .browser file describes characteristics and capabilities of a browser—be it a mobile device or a desktop browser. ASP.NET installs a bunch of .browser files in the Config\Browsers folder under the installation path. These files are shared by all applications. You place under the App_Browsers folder only the browser files specific to the current application. The content of the .browser file is compiled on the fly to provide up-to-date browser information to the ASP.NET runtime. Let's briefly address a scenario in which having a custom .browser file might be helpful. Imagine that your application uses a control that doesn't render effectively under a certain browser. You can write a .browser file to force ASP.NET to use a different adapter to render that control when the host page is served by the specified browser.

    <browsers>

         <browser id="browserID">

              <controlAdapters>

                    <adapter controlType="Samples.CustomControl" adapterType="Samples.Adapters.CustomControlAdapter" />

              </controlAdapters>

         </browser>

    </browsers>

    Assuming that browserID matches one of the standard browsers recognized by ASP.NET, the .browser file just shown dictates that CustomControlAdapter be used to render CustomControl under the specified browser.

    The App_Code Folder:

    The App_Code subdirectory lives immediately underneath the Web application's root and stores all class files that should be dynamically compiled as part of the application. These class files get automatically linked to the application and don't require you to add any explicit directive or declaration in the page to create the dependency. Class files placed in the App_Code folder can contain any recognized ASP.NET component—custom controls, helper classes, build providers, business classes, custom providers, HTTP handlers, and so on.

    Note: At development time, changes to the App_Code folder cause the whole application to be recompiled. For large projects, this can be undesirable and time-consuming. For this reason, I encourage you to modularize your code into distinct class libraries in which you group logically related sets of classes. Mostly helper classes specific to the application should make their way into the App_Code folder.

    All class files dropped into the App_Code folder should use the same language. If you have class files written in two or more languages, you must create language-specific subdirectories to contain classes for each language you support. Once files have been grouped by language, you add an entry to the web.config file for each subdirectory:

    <compilation>

         <codeSubDirectories>

              <add directoryName="VBFolder" />

         </codeSubDirectories>

    </compilation>

    It is important that the language-specific subdirectory is registered in the web.config file; otherwise, all files underneath App_Code will be compiled to a single assembly regardless of the folder they belong to. The preceding configuration script delineates a situation in which all, say, C# files are in the root App_Code, and a few Visual Basic .NET class files are moved into the VBFolder directory. If a directory mentioned in the <codeSubDirectories> section doesn't exist, you'll receive a compilation error. Files in the root App_Code folder are compiled to App_Code_xxx.dll assembly, where xxx is a randomly generated sequence of characters. Files in a given subdirectory will be compiled to a dynamically created assembly named App_SubCode_xxx_yyy.dll, where xxx indicates the name of the subdirectory and yyy is a random sequence of characters. The <codeSubDirectories> section is valid only if it is set in the web.config file in the application root.

    A strongly named assembly can be created by dropping an assemblyinfo.cs file in the App_Code directory or any other subdirectory you might have. Obviously, you'll use an assemblyinfo.vb file if the folder contains Visual Basic .NET files. The assembly configuration file may refer to a .snk file to contain the key for the strong name.

    Note 1: To sign an assembly with a strong name, you must first obtain a public/private key pair. You can get such a key pair by using the Strong Name tool (sn.exe), one of the SDK binaries you'll find in the installation path of the .NET Framework. Key pair files usually have a .snk extension. You save this file to an application folder and reference it in the assemblyinfo.cs file, as shown here:

    [assembly: AssemblyKeyFileAttribute(@"yourKeyPair.snk")]

    Note 2: Visual Basic .NET looks for the key file in the directory containing the Visual Studio Solution, whereas the C# compiler looks for the key file in the directory containing the binary. In light of this, adjust the path you use with the attribute, or place the key file in the proper folder.

    On any subsequent rebuild, the names for assemblies change, and as soon as the old AppDomain requests cycle out, the old assemblies are removed. The App_Code folder can contain more than just class files. In particular, it can contain and automatically process XSD files representing a schema of data. When an XSD file is added to the folder, the compiler will parse it to a typed DataSet class, which will be added to the application scope. In ASP.NET 1.x, this work is accomplished by a Visual Studio .NET wizard and uses a command-line utility under the hood—xsd.exe.

    Note: When you register a component (for example, a custom server control or a custom HTTP handler) with the web.config file, you are typically requested to specify the name of the assembly that contains the code. If the component is defined in the App_Code folder, which name should you indicate for the assembly? In this case, you just omit the assembly information and specify only the full class name. When no assembly is specified, the ASP.NET runtime attempts to load the class from any loaded assemblies, including the dynamically created assembly for the App_Code folder.

    That's it for today. Thanks for joining!!! See you tomorrow. Tomorrow we will continue this discussion and will deal with the remaining ASP.Net 2.0 reserved folders – namely App_Data, App_GlobalResources, App_LocalResources, App_Themes, App_WebReferences. In the following days we will look at what are build providers and a sample custom build provider.

    Thanks,

    Sukesh Khare
    Coordinator Daily .Net Feed Program

Page 6 of 12 (284 items) «45678»