October 2004 Entries

CreateProcessAsUser

Here is a solution you can use in rare circumstances and with caution. Comments are more then welcomed. Anytime someone approaches me with a design requiring the creation of a server side process – I flinch. Spinning up a process on the server is something to avoid. Having said that, I found it useful in a small Intranet applications (a build engine) to put a web service / ASP.NET interface in front of some command line CM tools. The interface is available to a small number of trusted individuals. I wanted to run these processes with the identity of the client, but this poses...

Resolving SSL Error Messages With Reporting Services

A couple people have left comments here about running into the following error in Reporting Services: The underlying connection was closed: Could not establish secure channel for SSL/TLS. There are a number of reasons this error can occur, so it will involve some digging to get to the root cause. Most of the problems revolve around a failure to verify the SSL certificate on the report server. You might see the error because: ...

Success Is Sweet!!

My impatience rushed me into tempting fate. Instead of waiting for the full moon to rise tomorrow evening, I started my BizTalk install Sunday afternoon. (There is also a lunar eclipse tomorrow evening - a blood moon, visible everywhere except from Australia - sorry John). I’m happy to say the installation went swimmingly. The HelloWorld Orchestration sample spit out an invoice, and much celebration ensued. So, what are the keys to a successful BizTalk installation? Let me tell you what worked for me. 1: Read John Elliot’s incredibly clever and Shakespearean inspired ‘Installing BizTalk 101’. (Sorry, that link is no longer available. Perhaps...

I Didn’t Expect These Features

What do MARS and the new Edit and Continue features have in common? Both were technically difficult to implement I never expected either to show up. Whenever discussions cropped up about these features the pushback always seemed to indicate both required major disruptions to the lowest level code you can imagine, and possibly changing the gravitational constant. Now these features are here in beta. Edit and continue (E&C) allows a developer to edit code in a running application and continue running the updated application without having to stop, compile, and launch the debugger again. It’s amazing the range of responses this...

SetReportParameters

Question came in today about the SetReportParameters web service method of Reporting Services. The name SetReportParameters is a bit misleading, and the documentation isn’t extremely clear. The method does not pass parameters to a report for rendering. Instead, the method has the same effect as modifying the parameter properties in the report designer. You can programmatically set valid values and prompt strings, etc. SetReportParameters is more of a “design time” method. When SSRS goes to render a report, the parameter values come from one of three sources. First, there could be a default parameter value specified in the report definition. If a...

The Lies I Tell At Work

I’m glad you are here, gentle reader. I hope you’ve arrived in an understanding mood, because I feel compelled to unburden myself at your expense. For the last four months, I’ve practiced the art of deception at work. You see, every few weeks our CEO brings up the topic of BizTalk Server 2004. We talk vaguely about how BizTalk might help us deploy solutions for our clients. A discussion ensues about XML and healthcare schemas. Eventually, someone will ask me if I’d had a chance to investigate the technology more thoroughly. “Well”, I say, “the Canadian project we picked up...

Evaluating The DataBinder

I was trying to put together a quick piece of code as an example over the weekend and remembered how much I dislike using DataBinder in ASP.NET. Let’s say a web service call gives back an array of simple objects (the sort of objects you’d see imported by a web reference): class Parameter { public string Name; public string Value; } I wanted to dump the Parameter array to a web page as easily as possible. The following will not work. <asp:Repeater id="Repeater1" runat="server"> <ItemTemplate> <tr> ...

Three Things I Learned In Boston

Navigating Boston with the aid of a speech enabled GPS device is about as useful as navigating Boston with the aid of a chatty 3 year old. “TURN LEFT”, the device says. Ok. Would that be the street 30° to the left or the street 60° degrees to the left? This happened more than once. Note to self: write down street names on next trip. I need to install Windows SharePoint Services and find out what all the hoopla is about. After hearing about SPS in the hallways and seeing it in a presentation, I want to learn more. It...

Slides and Code From The Camping Trip

Codecamp2.zip contains the slides and code from my presentation on integrating SQL Server Reporting Services with ASP.NET. The code includes one web project to demonstrate: URL access to the report server A simple demo of the ReportViewer component Building a TreeView of report items with a web service call (ListChildren) Examining report parameters – their valid values, type, dependencies, and state with multiple web service calls to GetReportParameters The second project delivers a report to a second ASP.NET application (a .Text blog) via a web service call. For more information on this project, see my post: The Blog Delivery Extension. Kudos...

Code Camp II

If you are coming to Code Camp 2 this weekend, I hope to see you at my talk Saturday afternoon on integrating SQL Server Reporting Services and ASP.NET. This session is not about designing reports, it’s all about integration: URL access, web services, and delivery extensions. These topics are useful for SSRS integration with any type of application, actually, but the session does focus in on particular points of pain in an ASP.NET environment. I’ve been through the pain, and I can pass along tips to make it easier for others. At some point next week I’ll get the code...

Some Things Just Say "Hack Me"

Everyday I pull into work I see this sign. The sign is of the type you typically see over an interstate highway, but this one sits at the end of a road, behind a government office building that leases space to private companies. I’ve often wondered why the sign was here - at the end of a road with nowhere to go but a parking lot. I’ve never seen a message appear on the sign. I don’t know who controls it. I’ve concluded someone in the government needed to spend some end of the year money in order to pad...

SQL Server Reporting Services and the Validate Path Module

FINAL UPDATE: This problem is now addressed in the following knowledge base article: You may receive error messages from Reporting Services after you install the ASP.NET ValidatePath Module. -- If you’ve installed the Validate Path Module because of the vulnerability in ASP.NET on a machine with SQL Server Reporting Services, then you’ve got troubles. Here is the exception I'm seeing: Request for the permission of type System.Web.AspNetHostingPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. I dumped the PublicKeyBlob of the new assembly with the Caspol.exe utility and granted the module Full Trust (as the other GAC'ed assemblies signed by Microsoft have been given). Place the following into...

Questions To Ponder

Some of these questions keep me thinking during moments of idle processing…. Q: What happens when we use partial page caching and VaryByControl in ASP.NET? A: I don’t know. The documentation says “set the VaryByControls parameter to the ID property value of the ASP.NET server control in the user control that you want to vary the user control output by”. OK … but what exactly does the runtime do with the server control you point to? Does it examine a specific property on the control? Does it examine every property on the control? What does it examine, exactly, to determine...

Q&A About the Community Starter Kit

Here are some questions I received after last night’s presentation on the Community Starter Kit. Q: Where does the WYSIWYG editor come from? A: The WYSIWYG editor is an HTML component (HTC). In the CSK, you can find a file named HtmlTextBox.htc that implements the HTML editor component. The HTC file uses a mixture of HTML, JavaScript, styles, and object tags to implement the editor. It looks as if Paul Abraham has broken out the HtmlTextBox.htc file from the CSK and repackaged the component into a standalone assembly. I haven’t tried this but it looks interesting. Another editor I've seen...

WebRequest and Binary Data

Someone sent me an email today describing a problem when downloading a binary file with the WebRequest class. There are plenty of articles (including some of mine) with screen scraping code like the following: WebRequest request = WebRequest.Create(someUrl); using(WebResponse response = request.GetResponse()) { using(StreamReader reader = new StreamReader(response.GetResponseStream())) { string result = reader.ReadToEnd(); } } Unfortunately, StreamReader is only good for reading text. When it comes to binary data the result has a good chance of...

Look For Me In January

I got word this week from Tony Elias, development editor for MSDN Magazine, that I'll be in the January issue with my article “Living The Static Life”. The article will cover all the deep, dark secrets you ever wanted to know about shared and static members of a class. Visual Basic.NET and C# code included!

And The Winner Is … Xandros

I’ve been looking for a Linux distro to run under Virtual PC so I can get the latest build of mono running again. Previous attempts at installing the most recent Linux distros all ended with kernel panics - apparently, there is a problem on VPCs with P4 Prescott processors. After reading Jerry Pournelle’s column (Chaos Manor) in last month’s Dr. Dobb’s Journal, I decided to give Xandros a try. A hard-core Linux distribution this is not. Any unix software which creates a “My Documents” directory is sure to make a true Linux fan sputter obscenities. I’m not a hard core...