Category Archives: dotNET

Next Vermont SQL Meeting : May 16th

 

Vermont SQL Server Special Interest Group

Next Meeting

When:   6-8pm, Monday, May 16th.
Where: Competitive Computing, Inc. Colchester, VT.
Topic: SQL Server 2000 Security in a Web scenario

Level 200

Audience: SQL developers and Database administrators

SQL 2000 security in the classic client/server scenario is mastered by most admins and developers. But put the same database in a Web scenario, and everything becomes a little bit blurry. User authentication and authorization suddenly becomes more complex. This conference will cover many topics:

  • Refresher of classic SQL 2000 security: Authentication, Authorization, networking
  • Best practices: SQL Login vs. Windows Login
  • Secure SQL 2000 on a developer workstation
  • Secure SQL 2000 in a web scenario
  • Interaction between a Web App and SQL Server
  • Best and worst practices of authenticating with :
    • IIS
    • ASP
    • ASP.NET
    • SQL
  • Windows Authentication Process :
    • Anatomy of a Token
    • The workings of a Ticket
    • Impersonation and delegation
Speaker:
 

Eric Coté                        

Technical Trainer, 3-Soft (Montreal)  www.Conixio.com

Consultant on the Microsoft platform for the last ten years, Éric Côté is now an expert on the .NET architecture. Eric holds many certifications (MCSD, MCDBA, MCT) and holds a degree from Université de Montreal (BSc). Eric’s certified trainer status allowed him to instruct developers from many large corporations (Desjardins, Motorola, Bombardier, SoftImage, Télé-Québec, UbiSoft, CAE…). For a third year in a row, Mr. Côté will be speaking for Code Magazine’s conference, DevTeach, in Montreal next summer. Also, he is a co-chair and an occasional speaker to Montreal’s Visual Studio.NET user group, GUVSM. Finally, Eric is also a co-host to the French version of the Internet radio show .NET Rocks, which is called Blah Blah Dot NET

http://www.AcehAid.org

What I learned from Jeff Richter [today] about exception handling

[I wrote this while at Devscovery]

When I FIRST learned about exceptions 3 years ago, I was told that exception handling was for handling exceptional situations. Jeffrey tells us that this is a myth and is just wrong. Exceptions are when a method cannot perform its expected behavior. There may be many reasons for this. There are plenty of exceptions to allow you to handle much of what comes along.

Of course, performance came into question since it more expensive to catch and exception than to test for it. A good example of this is looking at catching a DivedbyZeroException vs. testing for zero and not wasting the resources used by the exception. This is a matter of balance. If the possibility of a zero being passed in is a rarity, then the exception won’t be hit very often, yet an if statement would be hit 100% of the time.

Jeffrey is on a mission to get the word out on this because the myth has been alive for way too long. I realize that based on this myth, I do more error handling than exception handling in my code. Of course, this is especially important for component developers, who may not know how their components are being used down the road.

Of course, I learned a lot more than just this about exception handling. I won’t be able to look at my old code in the same way again and will probably end up going through and making some serious revisions.  

I have been at Devscovery for two days now and am learning so much. I am jumping around into different tracks and getting a fantastic smorgasbord of information. It would be nice to just have every session lined end to end and attend them all. Or just have them zap it all into our brains. Like any conference, picking and choosing is always hard. But having to constantly choose between deep internals with Richter, serious asp.net with Jeff Prosise, hard core debugging with John Robbins and the many other great topics and Wintellect presenters is really just a big pain in the butt.

Sara Faatz has done an amazing job of putting together a top-notch and intimate conference. Sara is also our marketing guru for INETA and her contributions there are beyond amazing.

Thom Robbins explains Team System and shows off VS2005 at Vermont.NET

Our Microsoft D.E., Thom Robbins, drove up from NH yesterday to present at the VTdotNET user group. It’s a longish drive, so happily it was a beautiful day and he had lots of geek toys to entertain him on the way up.

Our pre-meeting preamble was a little longer than usual, because there is so much going on (starting .NET Newbie sessions in June, considering doing a Code Camp, a few conferences in our area, etc) so Thom didn’t get started until 6:45. Also, because there were so many new people at the meeting, I asked everyone to go around the room and do their 10 second elevator pitch. It took less than 10 minutes and I think was a really valuable exercise.

Then we let Thom go to town. The first and most important thing he did was explain all of the SKUs for VS2005 and Team System. I know there is so much confusion and misunderstanding about that, so it was really important to get that cleared up. There aren’t any huuuuuuge development companies here, outside of IBM. Although there are  large companies, like Goodrich (but not with a large group of developers) and IDX which probably has a few hundred developers, none that fit into the typical Foundation Server model, as far as Thom was able to explain. There are a lot of small consulting shops (3-10 employees) and also gobs of indies like me. The rest represent develoeprs who work at non i.t. companies.

There are a handful of people inthe group who have already been either playing with the Beta (and even Beta2) and even someone who is already working on a serious application. Thom went over the IDE and showed lots of new enhancements, and given the short time, highlighted a variety of different things – many new features in ASP.NET (master pages, personalization and membership, the SqlDataSource and ObjectDataSource components) as well as things like Edit & Continue, Code Snippets and partial classes. People who had already been playing with the beta were able to ask Thom pointed questions about things that they were having trouble with. I tried really hard not to say “ooh show them this, show them that” but apparently was not able to control myself quite enough.

It was nice that local Susan Wisowaty was able to make the meeting. She is now working as one of the D.C.C.s but unfortunately is doing this in the midwest and has to travel a lot. Thom is an excellent presenter. I know that even I was watching him as much to learn from his presentation style as much as I was trying to absorb what I could about VS2005.

If Thom didn’t have to make the drive back after the meeting, I’m sure we would have been happy to let him show off VS2005 for as long as he liked! I hate making him drive up to VT, especially when he just drives up just for the meeting and then has to go back, but we really love having him present at the group so everyone truly appreciated his being there.

I think with all of the new stuff coming down the pipes, we could easily have 2 meetings a month. Maybe I’ll have to make a bargain with the devil to get the MSDN events to come back to Burlington.



http://www.AcehAid.org

VS2005 and Team System at VTdotNET tonight – Thom Robbins

We are very happy to have our very own D.E., Thom Robbins, coming all the way to Vermont tonight to present on what’s new in VS2005 and also show a little of Team System to the Vermont.NET User Group.

I also plan to talk more about our .NET Newbie Sessions (starting with our next month’s meeting) and see what the concensus is on my dream of having a VTdotNET Code Camp.

 

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.