May 2008
M T W T F S S
« Feb    
 1234
567891011
12131415161718
19202122232425
262728293031  

01
Feb

Embedding EF models in assembly

I have been dealing with a problem for while in Entity Framework. When I compile the EF models the ssdl, msl, csdl files are put in the solution. Then I put my connection strings to those files in my web.confg. The issue I have is that we do a lot of work on MS Terminal Server. Since we have a lot of other people on there, I force the users to save the models to a separate and unique folder. They then reference the models in their web.config. Once in a while the user will accidentally check in that web.config into TFS. That causes chaos because now I am using their models in my running environment. Any change they make breaks my project. Any change I make I don’t see. Then I have to go in and change my web.config to reference my models locations. Simple but a pain.

Well thanks to Jonathan Carter  I have now solved that problem. With a small change to the model properties the schema files get embedded into the assembly. Then you change reference in your web.config to the compiled versions. Tada no more head aches.

You can read all about it in  Julie Lerman’s post.

25
Jan

Andrew Connell talking around Florida.

This is a treat for anyone living in Florida and working on Share Point MOSS 2007. Andrew Connell is doing some speaking engagements around Florida in January and February 2008.

Tampa Office Geeks (Tampa, FL)

Building a High Performance Solutions on MOSS 2007

» January 29, 2007 @ 6p - 8p
Performance should be one of the top areas of focus on everyone’s mind when embarking on a Internet facing MOSS 2007 site. In this session we’ll look at the built-in caching capabilities added to the latest release of the SharePoint platform, including disk-based and page output caching. In addition we’ll take a look at various hot-button issues developers should be aware of when developing components for a public site built on MOSS 2007. Topics include object model techniques, how to properly manage memory to avoid the dreaded OutOfMemory exception, key sizing numbers to keep in mind when architecting your implementation and minimizing the page payload to speed up those page load times. After this session, you’ll be armed with the power to create high performance and scalable solutions in MOSS 2007.

Sarasota Developer User Group (Sarasota, FL)

 

Building & Incorporating Custom Applications on the SharePoint Platform

» February 19, 2008 @ 6p - 8p
When embarking on the development of a custom application developers face the same things over and over: you need a navigation solution, a security model, a search offering and an easy way to add update / functionality. More advanced applications want a plug in model, a way for site owners and even users to snap in new functionality without a major overhaul to the application. Other applications need to provide auditing capabilities, even alerting mechanisms as well as ways to create scheduled tasks. Before building all of this from scratch, check out WSS v3 as much of this is provided out of the box! Rapidly create new applications leveraging the existing functionality included OOTB in WSS v3. Better yet, don’t like how something works? This platform is incredibly extensible… come see how you can turn it on its head and how to build applications on top of the SharePoint platform.

25
Jan

Wow SharePoint Conference is popular this year, sold out main keynote

Wow here was are over a month away and MS has already sold out the main keynote room for SharePoint conference 2008. Seems like everyone is trying to get on board MOSS 2007 and get ahead as far as they can.

09
Jan

Updating a Entity Framework Beta 3 model after a DB change

The tools for Entity Framework are trailing way behind the Entiy Framework itself. I have been running into a lot of problems lately with changes I make to Table are not reflected in my Entity Model. It is a real pain to have to recreate the entire model every time. So here is what I figured out to fix it. I’ll give a step by step guide.

PreReqs:

You have an existing mode.

You have added a column to your Table.

 

Open the model viewer (GUI).

Right click on open space and select Model Browser. That will bring up the model browser on the right side.

In the MB select you model, right click and select ‘Update Model from Database’.

 

NOTE: The act of updating from SQL will make <!– SSDL content –>(model.ssdl) of your model correct and up to date. The <!– C-S mapping content –>(model.msl) and <!– CSDL content –>(model.csdl) are still broken.

 

To fix the other two, in “Solution Explorer” right click on you model (.edmx) and select “Open With”. Select “XML Edior”.

In the top section <!– CSDL content –> locate your table and add your column. For me it was WorkspaceNavigationType.

 

<EntityType Name=”WorkspaceNavigationType”>
          <Key>
            <PropertyRef Name=”NavigationTypeID” />
          </Key>
          <Property Name=”NavigationTypeID” Type=”Int32″ Nullable=”false” />
          <Property Name=”Title” Type=”String” Nullable=”false” MaxLength=”50″ Unicode=”false” />
          <Property Name=”PeterColumn” Type=”Int32″ Nullable=”false” />
          <Property Name=”Lous” Type=”Int32″ Nullable=”false” />
          <Property Name=”MyColumn” Type=”Int32″ Nullable=”false” />
          <Property Name=”Description” Type=”String” MaxLength=”50″ Unicode=”false” />
          <NavigationProperty Name=”WorkspaceNavigationTrees” Relationship=”HCMS.DataAccessLayer.Models.WorkspaceNavigation.FK_WorkspaceNavigationTrees_WorkspaceNavigationType” FromRole=”WorkspaceNavigationType” ToRole=”WorkspaceNavigationTrees” />
        </EntityType>

 

Go down to the bottom of the XML and located the <!– CSDL content –>  tag and located your table in there.

 

<EntitySetMapping Name=”WorkspaceNavigationType”>
            <EntityTypeMapping TypeName=”IsTypeOf(HCMS.DataAccessLayer.Models.WorkspaceNavigation.WorkspaceNavigationType)”>
              <MappingFragment StoreEntitySet=”WorkspaceNavigationType”>
                <ScalarProperty Name=”NavigationTypeID” ColumnName=”NavigationTypeID” />
                <ScalarProperty Name=”Title” ColumnName=”Title” />
                <ScalarProperty Name=”Description” ColumnName=”Description” />
                <ScalarProperty Name=”PeterColumn” ColumnName=”PeterColumn” />
                <ScalarProperty Name=”Lous” ColumnName=”Lous” />
                <ScalarProperty Name=”MyColumn” ColumnName=”MyColumn” />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>

 

Save the XML, and compile Your done. If you open your model browser, you will see your new column (or changed).

05
Jan

Match databases with applications on MOSS

One of the confusing parts of MOSS is the content DB naming schema. By default it wants you to use a cryptic naming of WSS_Conent_[Random GUID]. I needed to know what DB matched up with what application so I wrote this.

http://waitingimpatiently.com/wp-content/uploads/2008/01/contentdblist.zip

The output is to a file called ConentDB_List.txt in the folder where you run it. The format is below.

Display Name: Agile Portal
   WSS_Content_agiletemplatetest
Display Name: beard.mysite.com
   WSS_Content_beard
Display Name: Cal Test
   WSS_Content_caltest
Display Name: calsandbox.mysite.com
   WSS_Content_calsandbox
Display Name: cmstest
   WSS_Content_cmstest

And Yes you should always avoid the GUID name and name it yourself with a name that means something to you.

28
Dec

How do you know your a nerd?

Because you get excited by things like this, SharePoint Conference 2008. Holy crap I need a girl friend before I start using pocket protectors. But hey, I have a great job and knowing as much as I can makes it even better.

28
Dec

Speaking of waiting impatiently, TFS 2008 volume license. [foot tappng]

For some unknown reason when Microsoft decided to release TFS for trial and WorkGroup (5 users) but not for a version for the larger companies that are supported by Microsoft. They decide to make use wait until January of 08. I want to get off of Beta 2. WAITING??

You can read the details on  Brian Harry’s blog.

28
Dec

TFS Proxy server in non trusted remote domain

I ran into a problem that I am sure more people than me run into. I had to install TFS into a remote office of developers that are contracted. To make it worse the remote office is 5000 miles away. Now since the developers are not employed by us I have the choice:

1. Leave them in their own domain and figure out how to make the remote domain work with TFS.
or

2. Connect their AD to ours and deal with the trust issues.

I decided on #1. Now I am a network guy so setting up the VPN between the two offices was a piece of cake. I dropped a WatchGuard Edge onto the remote next work and connected it to our home office for a secure VPN.

Now for the fun part. The proxy server connects to the main TFS server using the Identity of the Application Pool for the TFS Proxy Server Web Site. Since the remote AD and the TFS AD are not in the same domain, they can not authenticate to each other. But there is a hack.

In this scenario we will use 3 devices, Proxy server (PServer), TFS server (TServer), and remote client (client). There are two domains HomeAD (TFS server domain) and RemoteAD (Proxy and client domain).

TServer is in HomeAD
PServer is in RemoteAD
client is in RemoteAD

The hack is to create a local user on TServer, we will use proxyUser with a password or proxy123. Make that user a local admin and add that user to TFS.

In visual studio, in Team Explorer, right click on the TFS server (TServer), Team Foundation Server Settings, Group Membership. Click on Team Foundation Administrators then the properties button. Select the ‘Window User or Group’ radio button then Add. Add proxyUser and select OK. The user proxyUser is now an Administrator for the TFS server.

Now on the remote domain, RemoteAD, add the user proxyUser with the same password, proxy123.

On the TFS Proxy server open IIS. Locate the App Pool Team Foundation Server and open it. On the identity tab set the logon user to RemoteAD/proxyUser with proxy123 as the password. Run iisreset to reset the web site. Goto http://localhost:8081/VersionControl/v1.0/ProxyStatistics.asmx. Click Invoke. If you get XML that lists number of file fetched, files missed, etc.. then the link to the main TFS is up.

The client is simple. The client’s machine and username are in the RemoteAD domain. When the user connects to the TFS Proxy server (PServer), it will use the users login for the RemoteAD. When the user connects to the real TFS server (TServer) for check-ins and to get the security token, they will use their AD account that has been set up in HomeAD.

So the path goes as follows:

User Ted connects to the Main TFS using an account created for him in HomeAD, HomeAD\Ted2. He gets a token from that TFS and give it to the Proxy using his local AD creds, RemoteAD\Ted. He gets files from the Proxy, who gets the files from the Main TFS using the creds RemoteAD\proxyUser. That login gets translated into TServer\proxyUser for authentication. When Ted checks in, he uses the HomeAD\Ted2 login again.

Remote TFS

18
Dec

Web References and Debugging.

I ran into a problem today with a friend who runs a few sites like PhoneDog.com and ButterflyEffects.com. He had an issue with page loads being very very slow for no reason at all. We must have spent two hours looking into firewall, vpn, network and server issues. None of them were found to be the issue. All we knew was that it ran like greased lightning when we were on the local network of the host server. A little more tested showed that it seemed to be the cached files not being cached. Even though IE and FF were set to cache the files, it seemed like they were being downloaded every time.

Well I finally discovered that when a .NET site is set to debug, the web reference files are set to private. And because of that they are re-downloaded every time. This is no big deal, but when you use a lot of controls like Rad Grid and compiled images they load the server up horribly. You can see over 1 MB being downloaded on every page. And NONE of that shows up in the source code. You see you have a 80k source code size, but if you open you temp files you will find a Meg of files downloaded every time.

Well, in a 2.0 site, just open the web.config, find the debug section and set it to false. That will mark the web references are public and cacheable.

<compilation debug=”false”>

Enjoy

06
Dec

A server to rule all servers!

Today I got an early Christmas present, a server 2008 virtual server tour. If you are like me, and there are a lot of us, you are a programmer / network admin for your company. I get to spend half my time working code and the other working network issues and development. That is why you will see a lot of post from me that involve a lot more than programming.

Well Microsoft finally did the readiness Live Meeting for server 2008 virtualization. Now let me tell you have have played around with 2008 a little bit and I like it as much as I like Vista. I dont. It seems bloated and very cumbersome to me. I have a very hard time doing some of the most simple tasks. I really hated it and swore it would be in SP1 before I started to install it on my network. Well that is not longer true. I have been getting more and more involved with virtual servers ever since MicroSoft came out with MSVS 2005 R2. That was a uge step in the right direction for MicroSoft and there virtual server platform. You see, I once got a chance to play with VMWare aka my Cadilac. And man what a dream to get behind the wheel of a WMWare ESX server. It has everything I could ever need. It was fast, smooth and packed with goodies. But dad wouldn’t give me the money to buy that Caddy, I only had enough money to buy the Yugo, and it was what I thought it was. So I crowned it’s ass. It was slow and unimpressive but good enough to get me to work. It worked, and that was it.

But now that Yugo has turned into a 2008 Corvette. And man is it sweet!!! Dad gave me the keys Microsoft Server 2008 virtual server which is now built into Windows Server 2008. It has everything you need and it is a direct attack on VMWare stake of the virtual server market.

Virtual Server 2008 now directly links to Intel VT and V-AMD chip’s virtual technology to allow the guest server direct access to hardware. The hard drives are now writing data directly to the host hard drives. Not thru a software layer in the host os, slowing it down. Guest servers can now be clustered with other host servers for a fail over of the guest OS. Handling the fail over of the host OS is still up to you. You can now move a live guest server from one server to another to load balance the host server at will. I am sure that like VMWare they will build a utility that will move the guest server for you for an automated load balancing platform. Multi processors are now supported inside the guest server. 64 bit is also supported in the guest servers now. VS2008 will let you take snap shots of your guest severs for a scheduled backup. The snapshots are a lot like DPM 2008 in that it is a byte level backup of the data on the disk on a changing bytes basis. I haven’t loaded any virtual servers up on 2008 yet because all of my 64bit servers are in production use. I only have older 32 bit servers for my testing. But now seeing this, I will get a 64 bit server in to load up with RC1 2008 and test out the servers. I am sure I will love what I get, fast, easy and reliable.

We currently have about 30 servers in our company. In the last year I have created 10 virtual servers and saved my company about $20,000 in needed hardware. With VS 2008 I am hopeful to get one more AD, Exchange 2007, SharePoint, TFS and some dev servers into VS enviorment. This is going to be a great year. Below are some images from the preview.

console.jpg

tech.jpg

mutilproc.jpg

livepush.jpg

features.jpg

cluster.jpg