Introduction

From time to time, it is natural for us to deploy BizTalk solutions with Assembly dependencies.  Usually this is because we have created helper classes (for mapping, or querying) or perhaps it reuses some common logic shared between application suites.

Whatever the reason, it can be very handy to pick up all assemblies when we export the BizTalk Application from BizTalk Administration, when we use the Export MSI feature/wizard.

The Problem

The one drawback is that, since BizTalk requires assemblies to be GAC’d (that is, strong named and added to the Global Assembly Cache), it’s hard for a tool, like the export to MSI wizard, to know what are custom assemblies which the BizTalk assemblies rely on (that aren’t system or framework assemblies).

In other words, you need a way to call out the dependencies, so that the export wizard will package the entire application.  The alternative would be that you would have to ensure any custom dependencies are already deployed to your (new) target environment.

The Solution

As you might be aware, you can view a BizTalk application’s resources (assemblies) from within BizTalk Administrator.  What you may not know is that you can add “Resources” to this location.  In particular, you can add (or call out) dependency assemblies.

Just right click in the Resources view, and select Add->Resources..

image

A dialog pops up and allows you to browse for the required assemblie(s).  You have some options here, you can force the assemblies to overwrite, you can select if and when the chosen assemblie(s) are GAC’d (registered with the GAC), registered as COM components or made visible to COM components.

image

The dependencies tab allows you to quickly see if all the dependencies for a specific assembly are to be found.  This will help you check and ensure your solution has everything it needs.

When you decide to do an “Export to MSI”, you’ll notice that it now includes any dependency resource Assemblies which you have added to your application:

image

If the assembly you are adding has a dependency on another assembly that is not included in the application, the add operation will fail.

Great, but what if I want to automate this procedure as part of an automated deployment?

I’m glad you asked.  Naturally, you can script commands which will accomplish this task for you.  You could easily script this command, to be included in automated builds or deployments.

Note that, as a general rule, it is not advised to automatically register any assemblies in the Global Assembly Cache of a build machine/build server.

Steps to add assemblies from command line:

  1. Open a command prompt as follows: Click Start, click Run, type cmd, and then click OK.

    Note: you may require elevated permissions to accomplish this, you’ll certainly need permissions to administer BizTalk Server as well.
     

  2. Type the following command, substituting the appropriate values, as described in the following table.

Command Syntax:

BTSTask AddResource [/ApplicationName:value] /Type:System.BizTalk:BizTalkAssembly [/Overwrite] /Source:value [/Destination:value] [/Options:GacOnAdd|GacOnInstall|GacOnImport] [/Server:value] [/Database:value]

Example:

BTSTask AddResource /ApplicationName:MyApplication
/Type:System.BizTalk:BizTalkAssembly /Overwrite
/Source:"C:\BizTalk Assemblies\MyOrchestration.dll"
/Destination:"C:\New BizTalk Assemblies\
MyOrchestration.dll " /Server:MyDatabaseServer
/Database:BizTalkMgmtDb

The following is a complete list of options lifted from MSDN, but they approximate what you can do via the BizTalk Administrator console.

Parameter Value

/ApplicationName

Name of the BizTalk application to which to add the BizTalk assembly. If the application name is not specified, the default BizTalk application is used. If the name includes spaces, you must enclose it in double quotation marks (").

/Type

System.BizTalk:BizTalkAssembly

/Overwrite

Option to update an existing assembly. If not specified, and an assembly already exists in the application that has the same LUID as the assembly being added, the AddResource operation fails. You can view the LUIDs for the artifacts in an application by using the ListApp Command. If another application depends on the assembly being overwritten, the AddResource operation fails, even when this parameter is specified.

/Source

Full path of the assembly file, including the file name. If the path includes spaces, you must enclose it in double quotation marks (").

/Destination

Full path of the location where the assembly file is to be copied when the application is installed from the .msi file. If not provided, the assembly file is not copied to the local file system during installation. If the path includes spaces, you must enclose it in double quotation marks (").

/Options

  • GacOnAdd: Specify to install the assembly to the global assembly cache (GAC) on the local computer during the AddResource operation.
  • GacOnInstall: Specify to install the assembly to the GAC when the application is installed from the .msi file.
  • GacOnImport: Specify to install the assembly to the GAC when the application .msi file is imported.

You must separate multiple options with a comma.

/Server

Name of the SQL Server instance hosting the BizTalk Management database, in the form ServerName\InstanceName,Port.

Instance name is only required when the instance name is different than the server name. Port is only required when SQL Server uses a port number other than the default (1433).

Examples:
Server=MyServer
Server=MyServer\MySQLServer,1533

If not provided, the name of the SQL Server instance running on the local computer is used.

/Database

Name of the BizTalk Management database. If not specified, the BizTalk Management database running in the local instance of SQL Server is used.

Further Reading

How to Add a BizTalk Assembly to an Application
http://msdn.microsoft.com/en-us/library/aa558703%28BTS.20%29.aspx

More on BizTalk Deployments
http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/1e6cd3a9-42d1-42b8-911c-c3f7bdc35145/

 

It’s been a tough week for me from a hardware and infrastructure perspective.

Late Thursday night, I lost one of the two desktop machines I own which still functioned. It had been on its way out for a while in theory, since somehow the CPU fan docking clamps were broken during transit in 2010.

I managed to squeeze about an extra eight months out of it this year when I was really in a tight bind (my main workstation was in storage).

Now, I find myself losing a weekend doing a massive reconfiguration of physical and virtual machines, to replace the loss.

One thing has changed; I blew away 4 260 GB Seagate drives and created a new RAID 0+1 drive. This left me with the decision of whether or not to load the OS onto it or not.

In the end, I rationalised that I might wish to upgrade the 4 disks at a later date to > 260 GB (which, in RAID 0+1, is a volume approaching 500 GB).

So the OS is installed onto a separate disk, but the RAID volume is still a great location for SQL Server database files and so on.

I’ll post some performance (i/o) statistics about read/write later on for comparison purposes. For now, I have a tonne of work to do..

 

Recently, I decided that I need to begin a new learning exercise.  This time around, I’ve chosen Apache Hadoop, partly because of the weird name, and partly because of how it is defined.  To add clarity, here’s the official definition from the Apache site:

What Is Apache Hadoop?

The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using a simple programming model. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-avaiability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-available service on top of a cluster of computers, each of which may be prone to failures.

I’ve actually heard of some of the sub components before (such as Cassandra) and I love the fact that the entire platform is designed for parallelism and distribution.  To get started I decided to choose a couple of the main sub components to focus on – below:

  1. Hadoop Common
  2. Hadoop Distributed File System (HDFS™)
  3. Hadoop MapReduce
  4. Cassandra™

What I’ll do is post a new article each time I’ve spent some time investigating the nuts and bolts of one of the subcomponents.  That way, you can follow my notes and pick up the salient points as I go.

For a full list of the Hadoop platform, check out the Apache site – there’s quite a number of subcomponents that are worth looking at.  I’m a little unsure what the hardware requirements might be if you wanted to play with this locally, but I’m sure you’d be able to throw something onto a cloud infrastructure for some fun time at a low cost.

In the meantime, here are the “getting started” pages for the components I’ve selected:

This really looks quite interesting Smile 

Here’s an architectural diagram of HDFS:

image

I’ve categorized this as ‘Cloud Computing’ but it’s really distributed computing.  Forgive me.  Now I’m really starting to look forward to seeing what this can do..  Check back soon.

Please note:

“Win32 is supported as a development platform. Distributed operation has not been well tested on Win32, so it is not supported as a production platform. “

I’ll setup on Windows Server 2008 or Windows 7, but Production systems are obviously GNU/Linux based.  Later I might dabble at re-installing Gentoo when my new home office is set up in a couple of weeks.

 

Part 1Setting up TFS Azure
Part 2Configuring Visual Studio to use TFS Azure
Part 3Registering Team Build controllers for TFS Azure
Part 4 

Introduction

Continuing from Part 2, now that we have the essentials set up, we’ll take a look at how to utilize the full functionality of Team Foundation Server Azure.

Before we get too deep into the article – this from Microsoft:

5. Unable to configure a TFS 2010 build agent/controller

Unfortunately, the TFS 2010 build agent and controller is not compatible with the Team Foundation Service Preview. You’ll need to use the build server software that is part of the Team Foundation Server 11 Developer Preview. You can find information about that release here.

You’ll need to install a facet of the Team Foundation Server 2011 Developer Preview in order to configure a Build Controller and Agents.

Microsoft® Visual Studio® Team Foundation Server 11 Developer Preview is the collaboration platform at the core of the Microsoft Application Lifecycle Management suite of tools, which helps teams be more agile, collaborate more effectively, and deliver better software faster.

Anyhow, you’ll have to download the installer (choose from Web Installer, .iso or self extracting EXE).  you could start downloading while continuing reading this article.

TFS Preview invite codes

I’ve had a few readers contact me in regards to invite codes for TFS Preview.  AFAIK, I was able to help them all out; and I have a couple of code/activations (2-3) left. 
So if you haven’t received your own activation code yet, and want to get started ASAP, drop me a line and I’ll send you one of the last codes I have which still has activations available.

Continuing Along

So when we left off, we’d configured Visual Studio 2010 to connect to TFS Azure, but now it is time to consume TFS Azure by using some of the functionality available.  I’ve got a sample solution that I’ll be writing about and publishing in a later series of posts, and I’ll be using it as a guinea pig (test) of TFS Azure’s service.

Open the solution you’d like to manage under TFS Azure, connect to your TFS Azure account (follow steps in Part 2), and then add your solution to Source Control as you would for a normal solution.  I prefer to add my solution structure to the source control directory before opening the solution.  This makes it easier to bind.

You can check your bindings, you should be able to bind:

binding

Now, once the solution is opened, you’ll see that the files are pending in the source control window:

source tree

As a good developer always does, I’ve run my Unit Tests and ensured that everything is peachy:

UnitTestsPass

Now that everything is ready, I’ll commit my changes to the Cloud!

commit

Assuming all goes well, you commit should work successfully, and your solution is now hosted and bound to TFS Azure.

Building

Configuring automated builds, however, pose a tougher problem to solve.  First, I tried to create a build definition myself, as I would with TFS 2010.  I navigated my way to the Team Explorer window and right clicked on Builds and tried to create a “New Build Definition”:

create build

This was met (predictably) with the following (somewhat unhelpful) error message:

“TF225001: Creating a build definition requires a build controller be defined for this team project collection.”

controller

As mentioned earlier, and according to this known issues page – you’ll need to install the Team Foundation Server 2011 Developer Preview to define build and a build controller.

So, whilst we’re sitting pretty without our solution bound to source control, we can’t create continuous integration or other automated build definitions.  A pickle.

Configuring a TFS 2011 Build Service

I’ll be the first to pose this question – what’s the point of Team Foundation Server Azure (in the Cloud) if build controllers and build agents don’t also sit in the cloud?  It seems totally redundant to me, to go to the hassle of binding to Azure if I must create and maintain my own build controller and agents in what amounts to off-cloud hosting.

It is my hope that this is rectified sooner or later.

Nonetheless, moving on..

To set up a build controller/agent you can follow along here, watch Richard Hundhausen’s video or read BHarry’s post here.

Install

Once you’ve downloaded and mounted the TFS 2011 Developer Preview image, you’ll need to run the TFS Server install.  I realise that a separate installer for the build parts would be *far* more convenient, but you have no choice in the matter, it seems:

install

Once the variety of prerequisites are preinstalled (including the ominous copying  of installers to the dreaded “installer cache” you’ll be prompted with the following screen:

image

Configure Your Build Server

Since we’re only interested in the Build Service, select it from the left hand tree, and then click on “Start Wizard”.

Once you hit the welcome page, click “Next” ton configure your Build Service installation.  On the second page you’ll have to select your Team Collection, you do this in much the same way as from Team Explorer (refer to Part 2 for details).

imageimage

image

Once connected, you’ll notice that there are no build controllers.

Clicking Next, we’ll accept the default, and have a build controller and single build agent created for us.

image

image

On the next page, we’ll be prompted to provide credentials for the Build Service to run under.  Note that you can change the default port that the service will use to communicate with TFS Azure (9191 by default).  You might want to ensure you’ve opened the port with your firewall (or other systems).  Don’t forget to click on the “Test” hyperlink to authenticate the credentials you’ve supplied.

Also note that the service will use the Windows Live credentials you specified when you connected to the Team Collection, earlier in the configuration steps, not the credentials you specify now, to connect to TFS Azure.

image

Our final page is the configuration summary page.  Once satisfied that your configuration is correct, press the Next button:

imageimage

Once the checks have completed, click on the “Configure” button..

imageimage

Once finished, you should get (hopefully) all successes.  Your Build Controller is now registered with your TFS Azure account.

image

Finally – A Build Configuration

Now that we’ve configured a Build Controller.. we can return to Visual Studio 2010.  I refreshed my Team Explorer, then right clicked on the Build item and selected “New Build Definition”.  This time, a different result – success.

imageimage

Now I can configure my build as I normally would.  For my first build, I’m not going to bother with a drop folder, so I unchecked this option (above) and also in the Process configuration:

image

Building

Now I’ve saved my build configuration, I’m going to run a test build.  I right click on the build definition and select “Queue New Build”:

image

image

My initial build built, but failed the unit testing.  This was caused by one of the tests which launches an interactive WinForm.  Commenting out this form, and checking in, triggers the automatic Continuous Integration build.  With luck, everything passes the second time:

imageimage

Returning to our browser, if you log into your TFS console, ensuring you aren’t in the Administration section, you can browse and see the build history now:

image

Conclusion

TFS Azure represents a tantalizing option for teams to share their workspaces and automated builds, but until Build Controllers and Build Agents can be hosted in the Cloud too, build services are a major weakness.   It is also somewhat disappointing that the Build Server software isn’t packaged and made available as a separate installation package (less than 1 GB).

That said, I had no trouble at all in configuring the Build Service 2011 (Developer Preview) and the whole process from Visual Studio 2010 to TFS Azure to Team Build worked seamlessly the first time through, with no errors or installation show stoppers.

In the next article, we’ll look at some ways we can customize the build as well as set some more meta data, such as Areas/Iterations and team security settings.  We’ll also look at how we can link build definitions into our work items and how the registered builds play a part in our overall SDLC.

Check out http://www.tfspreview.com for more information, or the community message boards located here.

Part 1Setting up TFS Azure
Part 2Configuring Visual Studio to use TFS Azure
Part 3Registering Team Build controllers for TFS Azure
Part 4 
 

Introduction

It is important to understand what a network load balanced cluster is and what it does. The cluster is made up of member hosts, and each host is bound to a public IP address (or addresses) which resolve to the cluster itself.

Each host in the cluster must have Network Load Balancing installed, and bound to the network interface(s) of choice.

When you initially install the cluster, you configure both an initial member host, and then the cluster settings. This can be a little confusing at first! After the cluster is created (with a single member host) you then add additional host members separately.

An example Network Load Balancing Cluster:

image

Note how each host in the cluster has a network interface card which is bound to the cluster’s IP address (10.2.194.100).

What follows is a set-by-step guide to installing and configuring a Network Load Balancing cluster on Windows Server 2008 (R2 x64).  You’ll need to be (at minimum) a local Administrator on each machine which will participate in the cluster, to install and configure.

Installation and Configuration

1. Install Network Load Balancing

Open Server Manager, click on Features and then click on the Add Features link. In the “Add Features Wizard” scroll to, and select “Network Load Balancing”:

clip_image004

Confirm and install.

2. Start Load Balancing Administration

clip_image006

3. Create a new Cluster

Right click on the root tree element on the left hand column marked “Network Load Balancing Clusters” and select “New Cluster”

1. For Host, enter the computer name (or IP Address) of a host to add to Network Load Balancing
    note: Network Load Balancing must be installed on this machine beforehand!

2. Select the interface on the machine you wish to configure for NLB (you might have more than one) – click Next

clip_image008

3. Give the Priority to the host (it reflects the priority order for the host in the cluster). For the initial host, you might leave it as 1 (the highest priority) – Click Next

clip_image010

4. Cluster Configuration (not host-specific!)

Add a public IP address which will be resolved to the NLB cluster

You will have this address bound to each of the selected interface(s) of hosts in the cluster – i.e. multiple hosts will be configured with a static binding to the IP address(es) of the cluster IP address(es).

clip_image012

clip_image014

You may bind the cluster to a specific host name (or leave it blank). You can have multiple IP addresses for a NLB cluster (I’m using just one).

On the last page, you may configure port rules (which ports are routed by the NLB, on the specified cluster IP address(es))

clip_image016

Clicking finish will see the cluster created for the specified host you selected at the beginning. If for some reason, there are errors, you can simply bind the selected interface of a host to the public IP address of the cluster yourself, manually, and then just refresh/”start” the host again.

Here is an example of a configured NLB cluster:

image

The final piece of the puzzle might be to add a DNS record to allow us to resolve resources which are Network Load Balanced with a nice friendly URI:

image

Troubleshooting

If you get the error message "NLB not bound” on a cluster host, access the host machine and simply add the cluster’s IP address(es) to the selected interface on the machine manually:

clip_image019

You might also need to review the firewall settings on each cluster host, to ensure that traffic is reaching each host as expected.

 

Recently I conducted a mini-audit of some of our less used servers and virtual machines, mainly hunting for some candidates to participate in load testing (hosts for Test Agents).

Upon one server I was *amazed* to find a virtual server which had been running for 1,862 days!  We’re talking over five years, without so much as a reboot.

image

It will be a sad moment when I have to end this server’s reign of uninterrupted uptime..

Later, I came across a VM which was in a bit of grief:

image

 

Not too long ago I wrote an article about Team Foundation Server licensing.  Now that it is 2011, and after some recent access requests for TFS, I’ve decided it is time for an update.

Does TFS cover SQL Server Licensing?

One instance of Microsoft SQL Server 2008 Standard Edition or SQL Server 2008 R2 Standard Edition can be used as the Team Foundation Server 2010 database.

That’s right – TFS 2010 includes a Standard Edition license for SQL Server but only when used exclusively as the data store for TFS and nothing else.  The paper doesn’t stipulate if the license is only valid for single tier or dual tier configurations, but since the database instance must be used exclusively by TFS, I can’t see why it wouldn’t cover dual tier deployments.  Note that if you want to use a different version of SQL (Enterprise, DataCenter) you need a separate license.

How about TFS user licensing?

A few years ago, Microsoft eased up a little bit on the licensing restrictions which caused a user to require a Client Access License (which are expensive).  The clause in the TFS licensing is explicitly:

Client Access License Exception for Certain Work Items
A user does not need a CAL or External Connector License to create new work items or to update work items that that same user has created. This exception applies only to work items related to defect filing or enhancement requests. However, a CAL is required when a user views or modifies a work item created by another user or interacts with Team Foundation Server in any other way.

Which opens up TFS for people who wish to create defects (bugs) and feature requests.  Accessing TFS for this purpose is fairly obvious and easy to open to a large host of users – via Web Access.  However, how does a TFS Administrator set permissions appropriately?  It turns out that, via the TFS Administration Console, Active Directory groups and users can be added to a special group called the “Work Item Only View Users”.  For more information on configuring this, see the following article: Work Item Only View (WIOV) Users in TFS 2010

Members of the Work Item Only View Users group are restricted to a limited view, which is indicated by the “Work Item Only View” tag in the top right hand corner of the web application page:

image

By default, I noticed that restricted use users did not automatically have permissions to create work items!  This rendered the whole exercise rather pointless.  Digging deeper, I realised I’d have to grant permissions on a per-Team Project basis so that the limited permission group could create work items.  Given that each Team Project could have a different template base, I believe you’ll also have to grant permissions separately for work item types as well – where the work item type relates to a defect or enhancement.

Note that external users (users who do not belong to the parent organization) are required to be licensed both with a CAL (if working beyond the scope of the CAL exception) and an External Connector License (which is a nice way of raising some extra revenue).

I can think of ways around that licensing model..

Now, don’t think that “multiplexing” or pooling access to TFS will avoid the need for CALS for your users!

End users or devices that access Team Foundation Server in any way-other than the Client Access License Exception for Certain Work Items exception noted above-are required to have the appropriate licenses, regardless of whether they are using a direct or indirect connection to the software.

Which translates into: “no matter how a user accesses TFS or TFS data, Microsoft want their money”.  Even automated builds aren’t devoid of licensing creep.  An automated deployment or build which does basically anything other than compile requires a Visual Studio license:

CAL Requirements for Builds
Users who merely execute and review builds are only required to have a Team Foundation Server CAL; however, users who author tests or other types of validation and include them as part of a build must be licensed for the appropriate Visual Studio 2010 individual development tool.

This extends to the execution of: unit tests, code coverage tests, web or load testing, architectural tests (validations) or any code analysis or coded UI or database unit testing.

Also note that the following shows the many ways TFS can be accessed:

Accessing Team Foundation Server
The Team Foundation Server 2010 data can be accessed in several ways, including:

  • Visual Studio Team Explorer 2010, which is included with Visual Studio 2010 Ultimate, Visual Studio 2010 Premium, Visual Studio 2010 Professional, and Visual Studio Test Professional 2010, and available for download to the general public. Team Explorer also can be installed as a standalone client, and on as many physical devices as you like.
  • Visual Studio Team Web Access 2010, which is a browser-based version of the Team Explorer client.
  • Microsoft Office ExcelR or Microsoft Office Project, which can access Team Foundation Server using add-ins for those programs that are provided with Team Explorer.
  • Microsoft Expression Blend. 3, which can access Team Foundation Server without requiring Team Explorer.
  • Microsoft Expression Studio 4 (all editions), which can access Team Foundation Server without requiring Team Explorer.
  • Programmatically, as enabled through the Team Foundation Server 2010 application programming interfaces (APIs) or by other means.

For more information, why not check out the whitepaper directly?  See below for further reading.

Visual Studio

Further Reading

Visual Studio 2010 and MSDN Licensing White Paper
Work Item Only View (WIOV) Users in TFS 2010
Team Foundation Server Permissions
Visual Studio 2010 and MSDN Licensing White Paper (updated)


F8S7T93JTXQR

 

We love it when a good patch comes around – so here is a cumulative patch for the .NET Framework 4.0.

There is a fairly long and extensive list of changes included in the GDR, here is a list of fixes and new features which have been added (from the Microsoft Knowledge Base Article):

Issues that this update rollup package resolves are as follows.

Issue 1

Consider the following scenario:

  • You create a Visual Studio 2010-based add-in application. The add-in application enumerates several projects by using a background thread.
  • You run an instance of Microsoft Visual Studio 2010 and the add-in application.
  • Garbage collection runs.

In this scenario, the instance of Visual Studio 2010 may crash.

Issue 2

Consider the following scenario:

  • You develop a .NET Framework 4-based add-in application for Microsoft Office Excel.
  • You run the add-in application, and then the Application.WorkbookBeforeSave event occurs.

In this scenario, the SaveAsUI parameter in this event is always set to the TRUE value.

Issue 3

If the focus is set to a window of a Visual Studio 2010-based application when the computer enters sleep mode, a memory leak occurs when the computer resumes from sleep mode.

Issue 4

When a .NET Framework 4-based Windows Presentation Foundation (WPF) application tries to load some text from a .ttf file, the text is displayed incorrectly. Additionally, an access violation occurs, and then the application crashes.
Note The stack trace resembles the following:

06bdeafc 71086dd5 dwrite!TrueTypeRasterizer::Implementation::ReleaseSfntFragment()+0x1f
06bdeb5c 7108d327 dwrite!sfac_GetSbitBitmap()+0×428
06bdec10 7108d4d8 dwrite!GetSbitComponent()+0xb5

Issue 5

When you perform a touch manipulation in a .NET Framework 4-based WPF application on a multitouch screen, the application crashes, or the *.vshost.exe process crashes. For example, the application crashes when you try to scroll up or to scroll down.

Issue 6

When you try to select multiple items in the Pending Changes window in Visual Studio 2010, the Visual Studio IDE disappears, and a Dr. Watson error is not generated.

Issue 7

Consider the following scenario:

  • You run Visual Studio 2010 on a 64-bit operating system.
  • You debug an application.
  • You enable the managed debugging assistants (MDA).
  • You try to close the application in the IDE.

In this scenario, the raceOnRCWCleanup MDA incorrectly runs.

Issue 8

When you scroll in a .NET Framework 4-based WPF application while the text in a tab control is being formatted, the application runs slowly.

Issue 9

When you try to host a webpage that has the targetFramework property set as the .NET Framework on a Server Core, you receive the following error message:

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The ‘targetFramework’ attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ‘<compilation targetFramework="4.0">’). The ‘targetFramework’ attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.
Source Error:
Line 2: <configuration>
Line 3: <system.web>
Line 4: <compilation debug="false" targetFramework=".NETFramework, version=v4.0" />
Line 5: </system.web>Line 6: </configuration>

Issue 10

Symptom

Consider the following scenario:

  • You create a Visual Studio 2010 application that contains a Dataset database.
  • You drop some tables from Dataset Designer.
  • You check the order of the tables in Dataset Designer.

In this scenario, the tables are sorted incorrectly.
Cause
This issue occurs because of an error in the TableAdapterManager class in Visual Studio 2010.

Issue 11

When a client requests the RESTful web service in an .asmx or a .svc file by using the ASP.NET pipeline and by using the extension-less URL handling, the state of the request might incorrectly change.

Issue 12

In the .NET Framework 4, the Application_Start and PreAppStart methods do not have access to the HttpUtility.HtmlEncode method and to the related APIs.

Issue 13

When you try to run a Microsoft Visual C# or Microsoft Visual Basic application, the application does not run if an Entity Data Model (EDM) references a database project. Additionally, the debugging features of the application do not work.

Issue 14

When you use SQL providers, the following issues occur:

  • An exception is thrown on the garbage collection thread.
  • A Dr. Watson error occurs, and you receive an error message that resembles the following:

    Application: webdev.webserver20.exe

    Blamed Symbol:

    SYSTEM.DATA.NI.DLL!System.Data.ProviderBase.DbConnectionInternal.PrePush

    Exception code: system.invalidoperationexception

    Event Sub type: Clr20r3

  • The w3wp.exe process crashes.
    Note The w3wp.exe process is a web-hosting process.
Issue 15

Symptom
The SqlDataSource class does not support a parameter that is used to access data in a Microsoft SQL Server Compact Edition database.
Cause
This issue occurs because Microsoft SQL Server Compact Edition cannot support a parameter in the SqlDataSource class.

Issue 16

Symptom
When you try to run an ASP.NET webpage, you receive the following error message:

HttpContext.User is supposed to be a MyWindowsPrincipal.

Cause

The issue occurs because the Extensionless URL handler passes the parent IHttpUser interface to the child requests. Therefore, the child requests skip the authentication process.

Issue 17

Consider the following scenario:

  • You have a Visual Studio 2010-based project that has an Entity Data Model (EDM). The EDM references a database that is of medium or large size. For example, the database contains 500 tables.
  • You try to reverse-engineer the tables.

In this scenario, reverse-engineering the tables requires a long time. For example, reverse-engineering 500 tables requires 14 minutes.

Issue 18

Consider the following scenario:

  • You install Visual Studio 2010 Service Pack 1 (SP1) Beta on a computer that is running Internet Information Services (IIS) 6.0.
  • You set the isolation mode to IIS 5.0.
  • You host a webpage in IIS 6.0.

In this scenario, you receive the following error message when you try to access the webpage:

503 – Service unavailable.

Issue 19

After you install a hotfix package that applies the .NET Framework 4, all services that are hosted on Windows Process Activation Services (also known as WAS) may be turned off. Additionally, the services cannot be restarted until you restart the computer. An example of a service is a WAS-hosted Windows Communication Foundation (WCF) service.
The following are the affected activation services:

    Non-HTTP Activation
    • Message Queuing Activation
    • Named Pipes Activation
    • TCP Activation
  • TCP Port Sharing
Issue 20

Consider the following scenario:

  • You have an ASP.NET website that contains a WCF service. The website targets an earlier version of the .NET Framework 4.
  • You do not click to select the Allow this precompiled site to be updatable check box in the Publish Web Site wizard in Visual Studio 2010.
  • You publish the website.
  • A client tries to access the WCF service.

In this scenario, the WCF service does not respond to the client request. Additionally, the .svc.compile file incorrectly references the .NET Framework 4.
Note The .svc.compile file is generated by the publishing process.

Issue 21

Consider the following scenario:

  • You bind the Windows.AutoHide command to a keyboard shortcut.
  • You focus on a toggled tool window in Visual Studio 2010. For example, the focus is located on the Solution Explorer window.
  • You press the keyboard shortcut.

In this scenario, the window hides. However, when you press the key again, the window does not return as toggled.

Issue 22

When you use Visual Studio 2010 to debug an application, many verbose messages that resemble the following are shown in the Output window:

*** HR originated: -2147024774
*** Source File: d:\iso_whid\x86fre\base\isolation\com\copyout.cpp, line 1302
*** HR propagated: -2147024774
*** Source File: d:\iso_whid\x86fre\base\isolation\com\enumidentityattribute.cpp, line 144

Issue 23

Assume that you build a web application on a computer and then publish the application on a different computer. When you use Visual Studio 2010 to attach the application, managed methods cannot be shown because of missing symbols for assemblies.
This problem occurs because the .pdb file that contains the information about symbols is not copied from the bin folder to the shadow copy folder.

Issue 24

You use the My namespace in a Visual Basic project. When you add an explicit reference to the Microsoft.VisualBasic.dll component to the project, the My namespace cannot work correctly. For example, you may receive the following error message:

‘Application’ is not a member of ‘My’.

Issue 25

When you install an ASP.NET 4.0 hotfix, the aspnet_regiis –iru command is triggered. Then, some ASP.NET registry keys are removed.

Issue 26

When you request an .xap file through the Cassini in Visual Studio 2010, the MIME type of the returned response is "application/octet-stream" instead of the expected "application/x-silverlight-app."

Issue 27

In the Visual Studio 2010 IDE, you attach the debugger to a sqlservr.exe process. You set a breakpoint at a managed SQL function or at a managed stored procedure. The symbol file is loaded correctly, and a solid red dot appears. However, Visual Studio does not break at the breakpoint.

Issue 28

You run a Visual Basic application that contains a Visual Basic Core assembly on an operating system that does not have the Visual Basic runtime. If the application contains a SyncLock statement on a variable of type Object, you may receive an error message that resembles the following:

error BC35000: Requested operation is not available because the runtime library function ‘Microsoft.VisualBasic.CompilerServices.ObjectFlowControl.CheckForSyncLockOnValueType’ is not defined.

Issue 29

If you run a Visual Basic application that contains a Visual Basic core, the code that uses constants in the Microsoft.VisualBasic.Constants class cannot run correctly. For example, you may receive the following error message when the code is executed:

error BC30059: Constant expression is required.

This problem occurs because the constants are embedded as normal fields instead of as constant fields.

Issue 30

You deploy a .NET Framework 4-based ASP.NET website in a legacy Code Access Security (CAS) mode. You configure the website with a partial trust. When you try to request this website, you may receive the following error message:

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=<Token ID>’ failed.]

Issue 31

You install the security update that is described in KB974417 when directories in the GAC folder, including the System.EnterpriseServices.dll assembly, are locked or the assembly is being used. In this scenario, the security update installation fails, and the computer becomes corrupted.
For more information about the issue, click the following article number to view the article in the Microsoft Knowledge Base:
2260913  FIX: Updating the .NET Framework may fail and some files in the GAC may be deleted

Issue 32

Some unrestricted asserts from ASP.NET types may bring a risk that a partial-trust user can be elevated as a full-trust user.

Issue 33

The simplified web application paradigm that is called Plan 9 MVC is released more frequently than ASP.NET. However, beginning with version 2, versions are not set as full trust. Therefore, many features that require full trust cannot work correctly.
This update sets the versions of Plan 9 later than version 2 to fully trust.

Issue 34

A constant in a device-level enumeration type in source code differs from that in the specification.
The update keeps the constant in a consistent way.

Issue 35

When you install the security update that is described in the following Knowledge Base article, a Windows Communication Foundation (WCF) service is forcibly closed by the remote host. This problem occurs when the trust level is set to High or to Medium in the Web.config file of the WCF service.

2449742  MS11-NNN: Description of the security update for the Microsoft .NET Framework 2.0 Service Pack 2 and Microsoft .NET Framework 3.5 Service Pack 1 on Windows Vista SP2 and Windows Server 2008 SP2: February 8, 2011

Features that this update rollup package introduces

This update rollup package introduces the following features that are related to the .NET Framework 4.

Feature 1

This update rollup enables ASP.NET to support multiple IIS configuration systems in a design mode. Therefore, Visual Studio Web Designer supports IIS Express. Additionally, Visual Studio Web Designer lets different Visual Studio Solution projects target different versions of IIS.

Feature 2

When a shadow cache assembly that is turned into a symbolic link to the same file is validated, the size of the assembly is not checked. Therefore, ASP.NET uses Optimization for Shared Web Hosting.

Feature 3

New syntax lets you define a TextBox control that is HTML5 compatible. For example, the following code defines a TextBox control that is HTML5 compatible:

<asp:TextBox runat="server" type="some-HTML5-type" />

Feature 4

A new switch is added for the Visual Basic compiler that allows for server control output of HTML5-friendly elements. For example:

<asp:TextBox runat="server" type="some-HTML5-type" />

In earlier versions of the .NET Framework, all Visual Basic applications automatically had a runtime dependency added. The dependency was with the Visual Basic Runtime library file, Microsoft.VisualBasic.dll. With this update, a command-line option can be set to remove this dependency. Some functionality of the Visual Basic Runtime is embedded in the application, and other functionality is no longer available with the switch set.

Feature 5

Changes to the support portable libraries. These changes include API updates and binder modifications. This update enables the CLR to bind successfully to portable libraries so that a single DLL can run on the .NET Framework 4, on Silverlight, on Xbox, or on the Windows Phone. This update adds public Silverlight APIs to the .NET Framework 4 in the same location. The API signatures will remain consistent across the platform. All modifications are 100 percent compatible and will not break any existing code.

Feature 6

The update extends the support of the portability files to compile Silverlight 5 XAML files.

Support Links

http://support.microsoft.com/kb/2468871

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3556

 

A permalink, or permanent link, is a URL that points to a specific blog or forum entry after it has passed from the front page to the archives.


Gosh, those permalinks can be so important for search engine optimization.  If you’ve taken WordPress out-of-the-box, you might find it curious that pages and posts, by default, are referenced by a quirky /?p=<postID> instead of a more SEO-friendly syntax.

As an example:
http://www.sanderstechnology.com/?p=9864 vs.
http://www.sanderstechnology.com/2008/breaking-news-ssl-broken/9864/

As you probably can tell, even this site is powered by WordPress (as at time of writing around version 3.2.1) so my pain in supporting a custom permalink structure is all too recent (but, if you are in the same situation – quite fortunate).

Now my pain is partially augmented by the fact that (I’d reasonably assert) most WordPress instances are installed on an Apache web server.  Mine (and probably a few others) is actually hosted on Internet Information Services (IIS) on a Windows Server.  Most of the supporting documentation on how to support customized permalinks relates to adjusting on Apache and the .htaccess approach.

This isn’t valid for an IIS hosted WordPress blog.

You might even consider that IIS makes supporting custom permalinks a little easier – but no less baffling.  Last night I migrated one of my WordPress sites across to a new permalink structure /year/post-title/post-id/ (such as in the example above).  I was following steps from a forum or some such place.  After a little digging around it all seemed to work fine.

Then, I tried to make the exact same configuration changes to this site, and was rewarded with a blank page.  Interesting.  It is (of course) fixed now (many thanks to the consult from @pwae).

So now I’m going to document what I did, in case it helps you.

You need three essential settings:

  1. Permalinks settings panel in the (WordPress) Administration console
  2. Access to the IIS server (or to the site) using IIS Manager (to change both version 6.x and 7.x)
  3. A custom redirect page

First, you should set up the redirect page.  This will help all the traffic which is referring to the old ?p=<ID> format find its way to the newly defined structure.  I’ve added the page I came across on this site (which is missing a brace in their example, so better to use mine).  It’s a PHP file which you must map as the 404 page handler (for resource not found errors):

<?php
// Default file for WordPress site, generally "index.php"
$wpdefault = ‘index.php’;
// The name of this file.
$tempfile = ’404_wp.php’;
$_SERVER['SCRIPT_FILENAME'] = str_replace($tempfile, $wpdefault, $_SERVER['SCRIPT_FILENAME']);
$_SERVER['ORIG_PATH_INFO'] = str_replace($tempfile, $wpdefault, $_SERVER['ORIG_PATH_INFO']);
$_SERVER['SCRIPT_NAME'] = str_replace($tempfile, $wpdefault, $_SERVER['SCRIPT_NAME']);
$_SERVER['PHP_SELF'] = str_replace($tempfile, $wpdefault, $_SERVER['PHP_SELF']);
$_SERVER['PATH_INFO'] = false;
$querystr =& $_SERVER['QUERY_STRING']; $requesturl =& $_SERVER['REQUEST_URI'];
$position = strrpos($querystr, ‘://’);
$position = strpos($querystr, ‘/’, $position + 4);
$_SERVER['URL'] = $requesturl = substr($querystr, $position);
$querystr = trim(stristr($requesturl, ‘?’), ‘?’);
// Required for WordPress 2.8+
$_SERVER['HTTP_X_ORIGINAL_URL'] = $requesturl;
// Fix GET vars
foreach ( $_GET as $var => $val ) {
if ( substr($var, 0, 3) == ’404′) {
if ( strstr($var, ‘?’) ) {
$nv = substr($var, strpos($var, ‘?’) + 1);
$_GET[$nv] = $val;}
unset($_GET[$var]);}
break;}
include($wpdefault);
?>

Now if you copy this code into a file and save it as 404_wp.php (as suggested in the source article), upload it to your IIS server site in the same location as your wp-config.php file is (perhaps the site root?).

Gain access to your IIS server (or equivalent console for managing error/event mapping) and assign your 404 handler with the URL “/404_wp.php” (assuming the file is in your site root).

Internet Information Services v5.x/6.x

On IIS 5.x and 6.x this is done this way:

  1. Right click your site in IIS\Web Sites\<your site>
  2. In the properties dialog, click on Custom Errors
  3. Scroll to 404 and click Edit
  4. Change Message Type to URL
  5. Insert the path to the 404_wp.php file (don’t forget a forward slash at the start)

image image

image
[screen grabs above C/- http://wpveda.com/change-permalink-structure-iis-6-server/ ]


Internet Information Services v7.x

On IIS 7.x it’s a little different:

  1. Select your site from the tree on the left hand side
  2. In the “Features View” double click on “Error Pages”
  3. Select 404 and on the right hand side action window click “Edit”
  4. Select the “Execute a URL on this site” radio button
  5. Enter the absolute URI to your 404_wp.php file

image image
image

Next, time to configure that custom permalink format:

  1. Log into the Admin site
  2. Select “Permalink” under the Settings menu
  3. Select “Custom Structure” radio button
  4. Add your custom permalink structure – mine is: /%year%/%postname%/%post_id%/

image image

Once you hit the “Save Changes” button, all your posts will resolve according to the permalink structure you’ve set.

All your old references should resolve based on the previous format too.

Hopefully.

 

Troubleshooting:

My problem here was the default document order.  You might have to ensure that only one matching document is in your site root, and ensure it loads by default once you have implemented the custom 404 redirection.

 

If you have a Windows Server 2008 installation of the Server Core, you might run into a few nasty surprises when it comes time to administer the nuts and bolts of the configuration. 

The reliance on GUI tools causes some pain from an administration perspective, and when you come to remotely administer the machine you might fund some surprises in store.


Common Error Messages

A common error message (when trying to access Device Manager remotely) is:

Unable to access the computerComputerName” Make sure that this computer is on the network, has remote administration enabled, and is running the “Plug and Play” and “Remote registry” services.

The error was: Access Denied

Another common error message, when trying to view the server’s Event Log:

Event Viewer cannot connect to computer “ComputerName”. The error reported is: The RPC server is unavailable

..or how about the Disk Management view?

Disk Management could not start Virtual Disk Service (DS) on “ComputerName”. This can happen if the remote computer does not support VDS, or if a connection cannot be established because it was blocked by Windows Firewall.

Which requires some changes to the Core installation configuration. 

Configuring Remote Administration – Firewall Rules

You’ll need local Administration rights and if the machine is on a Domain, you’ll need a domain account (but not necessarily Domain Administration rights).  You can also be a member of the Network Operators group, provided you have delegated permission to run netsh advfirewall commands.

To set the firewall rules, you’ll need shell access to the remote system.  Once at the command prompt, you can issue the following netsh commands to allow remote access through the server firewall.

To enable remote firewall administration:

Netsh advfirewall firewall set rule group=”Windows Firewall Remote Management” new enable =yes

To enable remote administration:

Netsh advfirewall firewall set rule group=”remote administration” new enable=yes

To allow remote management via specific MMC snap-ins, run the following command:

Netsh advfirewall firewall set rule group=”<rulegroup>” new enable=yes

So, for example, to enable Remote Volume Management:

Netsh advfirewall firewall set rule group=”Remote Volume Management” new enable=yes

Additional Configuration

Now, we’re not exactly out of the woods yet.  Believe it or not, there are some extra settings for some remote access.  In addition to allowing the MMC snap-ins through the firewall, the following MMC snap-ins require additional configuration:

Device Manager

To allow Device Manager to connect, you must first enable the “Allow remote access to the PnP interface” policy

1. On another machine open an MMC console (easiest way is Start->Run->mmc <enter>), start the Group Policy Object MMC snap-in (you might need to add it)

2. Connect to the Server Core installation

3. Navigate to Computer Configuration\Administrative Templates\System\Device Installation

4. Enable “Allow remote access to the PnP interface”

5. Restart the Server Core installation

Disk Management

You must first start the Virtual Disk Service (VDS) on the Server Core installation

IPSec Mgmt

On the Server Core installation you must first enable remote management of IPSec. This can be done using the scregedit.wsf script:

Cscript \windows\system32\scregedit.wsf /im 1


Driver Installation

While we’re discussing it – driver installation is a little tricky too on Windows Server Core.  To install, you’ll need to get shell access (RDP works well) and then you’ll need to copy the drivers somewhere (preferably onto the system).

  • Navigate to the folder containing the INF files, and type in this command:
  • pnputil -i -a C:\Drivers\LAN\filename.inf – where filename.inf is the name of the file containing the driver
  • If you’re not sure which file it is, you can use a wildcard, like this: pnputil.exe -i -a C:\Drivers\LAN\*.inf – this will install all INF files.
  • You can also do pnputil /? to see all the options
  • References:

    http://blogs.technet.com/b/askds/archive/2008/06/05/how-to-enable-remote-administration-of-server-core-via-mmc-using-netsh.aspx
    http://blogs.technet.com/b/server_core/archive/2008/01/14/configuring-the-firewall-for-remote-management-of-a-workgroup-server-core-installation.aspx
    http://social.technet.microsoft.com/Forums/en/winservercore/thread/48542fe8-a365-4306-bac6-a71cab867cc5
    http://ortuno2k.wordpress.com/2011/02/11/installing-drivers-on-windows-server-core/

    Aussie Wine Guy


    © 2012 Rob Sanders: Sanders Technology Suffusion theme by Sayontan Sinha
    WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera