Today I tried to access a WorkflowService hosted in IIS on Windows 7, and got this nice little error message:
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporterError: Schema with target namespace ‘http://schemas.microsoft.com/2003/10/Serialization/’ could not be found. XPath to Error Source: //wsdl:definitions[@targetNamespace=’http://tempuri.org’]/wsdl:portType[@name=’IService’]
[… lot more stuff ]
Warning: No code was generated.If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services or because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool. Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.
Of course the message was completely misleading. It turned out that the IIS Application Pool Identity did not have access rights for c:\windows\temp ! Kent Brown had also found this error after setting an own account for the Application Pool. But it seems that sometimes Windows 7 (RC Build 7100) does not set appropriate default rights.
Posted: June 22nd, 2009 under .NET, IIS.
Comments: 1
Today I tried to start a sample program which contains a connection string like this:
const string connectionString = @”Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\SampleInstanceStore.mdf; Integrated Security=True;Asynchronous Processing=True”;
I got the following error message:
System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Users\Martin\Some more subfolders\SampleInstanceStore.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
The reason for the message is, that the SQL Server uses its own user account to access the database file. In the current case this was NetworkService - which had no access rights to the files. But it was not enough to grant NetworkService rights on the files or their folder. If AttachDbFilename is used without an additional parameter for the database name, then the database name is the path name of the database file. To get this name the SQL Server inspects -using its own account- all parent folders, up to root. So it needs at least read rights there.
Possible solutions:
- User Instances: With
user instance=true in the connection string another instance of SQL Server Express (and only Express!) will be started. This instance uses the credentials of the user. Unfortunately Microsoft intends to remove this feature in future versions.
- Server Manager: Use the server manager to create or attach the database and change the connection string appropriate.
- Local System: In theory it would be possible to run SQL Server using a less restricted account, like LocalSystem. Of course nobody will ever want to do this, as it’s a huge security leak.
- Initial Catalog: If a database/initial catalog parameter is used, in addition to the AttachDbFilename parameter, then this name is used for the database. So it is sufficient to give the the .mdf file and its containing folder appropriate access rights.
Posted: May 28th, 2009 under SQL Server.
Comments: none
The beta 1 version of Visual Studio 2010 and .NET 4.0 has been released to the general public.
On June 23, 2009 the .NET Usergroup Köln will host several short presentations about the new features (in German). My part will be to talk about the revised version of Windows Workflow Foundation. You are cordially invited. Reservation required!
Slides (pdf)
Demos
Posted: May 20th, 2009 under .NET.
Comments: none
Until very recently I did not know about the acceptance test framework Fit (Framework for Integrated Test) and its Wiki-GUI FitNesse. But now they’ve been brought to my attention both by Stefan Lieser, who made a very good presentation at Bonn-To-Code, and by a company with long experience using this system for their Java projects.
FitNesse supports two different test systems. Besides the traditional Fit there is the new Slim system. Both have advantages and disadvantages - as explaned e.g. in this video by Gojko Adzic.
It’s very easy to switch between the systems in Java. Adding !define TEST_SYSTEM {slim} selects Slim and !define TEST_SYSTEM {fit} selects Fit. Since Fit is the default, this setting could be omitted.
Using .NET it gets a bit more complicated: Fit for .NET is included in FitNesse. To use it you have to set some settings. On the other hand, to use Slim a separate Download is needed. And there are other, these, settings necessary. Also the default path (classes, fitnesse.jar) has to be removed from the root page (resulting in non-functioning Java tests…).
What a mess. I therefore developed a small utility, which acts as a proxy between FitNesse and the separate test systems. If DotNetProxy.exe and DotNetProxy.exe.config are copied, for example, into the FitNesse\dotnet folder, with the settings in DotNetProxy.exe.config adjusted to the actual system, then
!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {dotnet\DotNetProxy.exe %m %p}
is enough for Slim .NET. For Fit one only has to remove or change the TEST_SYSTEM definition from these settings.
DotNetProxy.zip
Posted: May 12th, 2009 under .NET, Java.
Comments: none
The SQL Server 2008 Management Studio has a nice little new feature which seems to be omitted from the documentation. The Script Wizard (Database - Tasks - Generate Scripts) now has a “Script Data” option. If selected the Wizard will generate INSERT statements for the data in the scripted tables. This can be very handy.
This is a feature of Management Studio, therefore it works also with older database server versions.
Posted: September 7th, 2008 under SQL Server.
Comments: 1
On very short notice I got aware of the Free and Open Source Software Conference (FrOSCon) in St. Augustin near Bonn/Germany. Unfortunately the program neglects open source projects in the .NET/Mono field. But it still looked interesting so I attended some talks there.
First day’s keynote speaker was Andrew S. Tannenbaum (his book on Distributed Systems was the textbook for the university class about this topic). He spoke about problems in the development of ever more extensive operating systems. His solution is a microkernel architecture with device drivers and services as separate, restricted, user mode processes. These processes will be supervised and, if necessary, restarted by a “resurrection manager”. Minix3 is his implementation of such a system. The performance hit caused by the numerous context switches and checks will be compensated by the gain in stability.
Heading quasi in opposite direction was second day’s keynote, Simple is Hard, by Rasmus Lerdorf. He spoke about the performance of PHP applications. In doing so he compared a web application implemented directly in PHP with applications implemented using several PHP frameworks. In his opinion, frameworks are superfluous. It is perfectly possible to create clearly structured programs without the help of a framework. The, often very high, performance costs of the overhead where unjustifiable.
Furthermore I found for example the lectures on troubleshooting, system monitoring with Nagios and on machine learning with Apache Mahout worthwhile. Also SVNChecker looks like a promising tool and one can do nice things with a wiimote.
All in all it was a valuable time to broaden one’s horizons. See you @ FrOSCon 2009 (22.-23.08.2009)!
Posted: August 27th, 2008 under General.
Comments: none
The Microsoft SQL Server 2005 Report Manager web application has help pages in several languages. They display nicely in IE, but in Firefox they are reduced to a mere 
 is the unicode byte-order mark, coded in UTF-8. A first inspection with Firebug revealed that this application does not set the charset in the http header. So IE guesses the charset, while Firefox follows the standard default ISO-8859-1, and displays 
Omitting the charset header is never a good idea, but adding UTF-8 charset information did not solve the problem. While it shows some text in Firefox, German umlauts and other special characters where only visible in the table of contents, not in the main text. It turns out that some files (index.htm, tocParas.js, tocTab.js, noscript_toc.htm) are in UTF-8, while others are in ISO. In every language. A bulk charset converter would be handy…
Addendum 26.08.08: The same issue exists in SQL Server 2008.
Posted: March 27th, 2008 under SQL Server, IIS.
Comments: none
Posted: October 30th, 2007 under General, .NET.
Comments: none
On November the 6th, 2007 I gave a short presentation about WCF Line of Business Adapter (SDK, Blog) at the .NET User Group Köln.
Slides (in German) can be found here.
Posted: September 10th, 2007 under Biztalk, .NET.
Comments: none
BizTalk Map Add-In is a Visual Studio 2005 (professional/team) add-in for BizTalk 2006 developers. It adds two functions to the context menu of map files in the solution explorer:
Debug BizTalk Map XSLT Generate the Xslt for a map and start debugging it. This command honours extension objects, it is possible to use and debug external assemblies.
Extract Multipart Schemas Extract the schemas of maps with more than one input or output message.
Have fun!
Download: btsmapaddin.zip
Addendum 19.08.07: Jon Flanders has also developed an add-in for map debugging: I really love whidbey + BizTalk. So you have the choice.
Posted: August 9th, 2007 under Biztalk.
Comments: none