Daily Archives: May 1, 2005

Love my new Dell Optiplex SX280

Getting this computer fulfilled some of the satisfaction of the Mac Minis, I think, since I got it for a steal!

This box has a really small footprint at about 10″ x 10″ x 3″. It has an Intel 3.2 Ghz processor and usb ports for keyboard and mouse. The video is DVI so it’s ready for digital and multi monitors. It came with 1 GB Ram, a DVD/CDRW combo drive and even a 64MB thumb drive. I got the whole thing (no tax and free shipping) for $374! Okay – so it’s refurbished from the Dell Outlet but it has a 3yr warranty. This was the best geek buy I think I have gotten away with in a long time!!

http://www.AcehAid.org

Beta2 and File Server Web Services – Some problems and solutions

I had two problems calling web services with a VS2005 app that I moved from Beta1 (Feb CTP) to Beta2.

I have a client asp.net and a web service app. Both are running on a file based web server, not IIS.

The web service was functioning properly when I ran it directly, but not when I tried to call it from the client app.

Problem #1: Web Server Port #
Error: “No connection could be made because the target machine actively refused it.”

When you set a web reference to a web service, the port number currently associated with that web service is embedded into the web.config file inside of the <app settings> section.

<add key=localhost.Service value=http://localhost:1719/MyServices/ServiceFoo.asmx/>

I had mucked around with moving my files around enough that the saved port number was still in my web.config, but the computer had assigned a new port.

You can edit the web.config to identify the correct port number or just remove and readd the web reference which will update the web.config for you.

Problem #2: Authentication problem
Error: “The request failed with HTTP status 401: Unauthorized.”

This threw me because I was not using IIS and that is such an IIS message. I had an inkling that it was because I had been trying to run vs2005 as a non-admin and I had messing with folder permissions, file sharing, etc. After hours and hours of googling to no avail, I finally noticed the new “NTLM Authentication” setting in the [still very unfamiliar feeling] property pages for the web projects (Start Options). I crossed my fingers and turned off the NTLM Authentication on the web service project, and my problem disappeared.

I believe that this might be related to something that I found listed in the VS Known Issues doc for Beta 2. There was a reference to getting 401’s when doing unit tests in asp.net and the workaround suggested is to remove the credentials.

I hope my pain and suffering saves someone else from wasting a Sunday afternoon. 🙂



http://www.AcehAid.org

Beta2 – Consuming datatables from web services…

Although you can now output DataTables from web services in .NET 2.0, there is still a problem when trying to consume them using a web reference in a client project in VS2005. (I know there are plenty of people who think this is evil anyway…)

The problem is apparently in the proxy generation.

Here is the code from the web service:

The web service functions perfectly well.

But when trying to code up the client app to consume this, it does not recognize that the function is returning a DataTable. Instead it has cobbled some of the proxy info together by mistake.

I did submit this but thought I would put it here in case someone else ran into it and thought they were doing something wrong. This worked for me up until one of the recent CTPs where it seemed to be broken.