in

Corey Roth and Friends Blogs

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

Kyle Kelin on .Net

  • My Company is Hiring

    Our recruiter sent me the following e-mail message this morning. We are currently looking for Senior Consultants out of New York as per the description below.

    New York based software consulting firm seeks a project leader. Responsible for coding, testing, analysis, design, definition, development and implementation of software architecture & engineering solutions for U.S.-based clients.  Must be able to lead/supervise team of software professionals. Master's degree + 2 yrs exp. Proficiency in req'd technologies, incl Windows, Vista; C#, Visual Studio 2008; .NET Framework 2.0/3.5, ASP.NET, MOSS 2007, BizTalk 2006, SilverLight, XAML; SQL Server 2005.

    I know New York seems overwhelming but Infusion does a good job of making the move as painless and cheap as possible. If you or anyone you know is interested e-mail me or leave a comment.

  • Consulting Services and Staff Augmentation Cannot Exist in the Same Company

    This is going to be a little off topic so if you are looking for something technical then skip this post. Now that we got that out of the way let me define some terms that I am going to use in this article. A consulting services firm in the application development space is a company who places developers on projects for a specific period of time. The work is done either on site or off-site. The majority of time there is a statement of work for the project and a set of deliverables. A staff augmentation on the other hand has developers but is a completely different entity. A staff augmentation company makes its revenue by placing developers in openings where the skills of the developer match the needs of the client. They mostly work off what is known as contract-to-hire contacts. A contract-to-hire is when a staff augmentation company bills the client for the developer's time for six months at a fixed hourly rate. At the end of the six months the client has the opportunity to convert the developer to a full-time employee for a fee. I don't favor one type of company over the other and in my career have worked with both. The problem is when a company tries to support both revenue models they become ineffective at both strategies. Companies are always looking to diversify revenue streams but those streams need to be complementary. I do not believe consulting and recruiting services are complementary.

    The first reason they aren't because good talent is in limited supply. Only a very few times in the last twenty years have developers been in long supply. Eventually the recruiting side competes with the consulting side for new hires. This effects how a company can deliver their project deliverables because they have a talent shortage caused by farming out some of their best talent. A good consulting firm knows that they will have developers on the bench at throughout the year and factor this into their rate. This helps them sell without worrying about staffing the project (well not worrying as much). A consulting firm can't run smoothly without a little slack.

    The second reason is that it sends mixed signals to the client and the consultant. A consulting firm needs to be able to place developers on-site without them being approached by the client to convert. Yes this happens all the time but it happens more to companies that send developers on-site as contract-to-hire. So if you have your consultant (a non contract-to-hire) at a company that knows you do contract-to-hires they will assume all your employees are hirable. Of course there are a lot of other things a firm has to do to keep their consultants but that are another article. The consultant will also be more likely to convert because he will see others converting.

    The final reason is for a consulting firm a contract-to hire is a lose-lose situation. If the developer placed works out the firm just lost a valuable resource that they likely won't get back. I won't go into the details of the number but the placement fee is far less than the amount of revenue a good consultant can generate in a year. The other half of the lose-lose situation is what if the developer doesn't work out and the client doesn't want to convert them. Maybe they weren't as good as you thought. Now you have damaged your reputation with that client. Sure they will probably call you to fill the next job opening they have but they won't call you to RFP they half a million dollar custom .NET application project they are going to do. I have seen this happen first hand. Never forget every person you put on-site represents your company no matter if you have tagged them as junior or a contract-to-hire.

    If you find your company in this situation and struggling here is at a high-level what you need to do (assuming you have the power or can find someone with the power to listen). You first need to pick a side and an identity. A company's business strategy and revenue model needs to planned and definitive. If the company is small the focus should be narrow (dominate one market before moving to another). Next that strategy needs to be communicated clearly to everyone in the company. If you have to write it on the wall to make sure everyone knows it. After everyone knows the strategy align the money to award those you contribute to it. Review all bonuses and commissions and make changes to any that are out of line. Be sure and make adjustments if the new business focus would result in someone receiving a lower bonus or commission. Finally continually review the business strategy and goals to make sure that the day to day activities of the business are an execution of that strategy.

     

    DISCLAIMER: The only business I have ever owned only lasted 3 years and only had 2 employees counting me. I don't know *** about business. Seriously I'm a consultant with business knowledge but no business experience. This post isn't meant to give business advice. Do I really need to say that?

  • Method Ordering Constraint with the SPGridView

    I was a working on a web part this week that was to display a list of users. The requirements evolved to include paging so I decided to use a SPGridView. But when I set the AllowPaging property to true I would get the following exception: object reference not set to an instance of an object. After spending some significant time digging around on Google I found the answer. The answer lies in the order of the API calls. You have to set the PagerTemplate to null after you add the GridView control to the ChildControls collection but before you bind the control.

    So my code in RenderContents does the following in order:

    1. Instantiate the GridView.
    2. Set the properties and the datasource.
    3. Add the Gridview control to the ChildControls Collection
    4. Set the PagerTemplate to null
    5. Bind the control

     

    My Code:

    usersGrid = new SPGridView();

    usersGrid.ID = "usersGrid";
    usersGrid.AutoGenerateColumns = false;

    usersGrid.PageIndexChanging += new GridViewPageEventHandler(usersGrid_PageIndexChanging);

    usersGrid.DataSource = usersCollection;

    this.Controls.Add(usersGrid);

    usersGrid.PagerTemplate = null;

    usersGrid.DataBind();

     

    I imagine the reason for this has to do with the page life cycle but I don't know the exact reason. The first one that posts the answer in the comments gets a free DotNetMafia T-Shirt. Also in my opinion this is a design flaw. You should avoid ordering constraints for a method call and if that restraint is required than the exception throw should do a better job of indicating the constraint.

    Note: I have not tested whether or not you would get this same behavior with a GridView on a normal web page.

  • Where is the Workflow History List

    I recently was working with workflow in SharePoint Designer and I have a few Log to History actions. The workflow failed so I wanted to view the log to try and debug the problem. I went to View All Site Content and the workflow was not listed. I spent about 20 minutes trying to find the list. Finally I figured it out. The list exists but the link was just missing. So I manually navigated to the list: /Lists/Workflow%20History/AllItems.aspx.

  • Invalid WebPart Tag Error: One Possible Cause

    I recently (as in 5 minutes ago) ran into this error and thought I would share since it cost me a good hour of work today. I have a WebPart that I need to add another assembly to. The second assembly was responsible for getting data from Active Directory. So I went through all the hoops of adding the assembly

    • Strong name the assembly and added a reference to my WebPart project.
    • Made an entry into the manifest.xml file
    • Made an entry into the wsp_structure file.

    Now that should be it but when I tried to add the WebPart I now got an error that said Invalid WebPart Tag. What the hell does that mean? The log didn't provide much more additional information. Eventually I noticed a mistake in my manifest.xml file. Take a look at the before and after.

    Here was my original manifest.xml file.

     

    <WebPartManifest xmlns="http://schemas.microsoft.com/WebPart/v2/Manifest">

      <Assemblies>

        <Assembly DeploymentTarget="GlobalAssemblyCache" FileName="Infusion.WebParts.dll">

          <SafeControls>

            <SafeControl Assembly="Infusion.WebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=434425b09396c611" Namespace="Infusion.WebParts" TypeName="*" Safe="True" />

          </SafeControls>

        </Assembly>

    </Assemblies>

    <Assemblies>

        <Assembly DeploymentTarget="GlobalAssemblyCache" FileName="Infusion.DirectoryServicesHelper.dll">

          <SafeControls>

            <SafeControl Assembly="Infusion.DirectoryServicesHelper.dll, Version=1.0.3058.16424, Culture=neutral, PublicKeyToken=3e458cd467f1ce4f" Namespace="Infusion.DirectoryServicesHelper" TypeName="*" Safe="True" />

          </SafeControls>

        </Assembly>

     </Assemblies>

      <DwpFiles>

        <DwpFile FileName="Infusion.WebParts.DisplayUsersFromADGroup.dwp" />

      </DwpFiles>

    </WebPartManifest>

     

     

    Here it is done correctly

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------

     

    <WebPartManifest xmlns="http://schemas.microsoft.com/WebPart/v2/Manifest">

      <Assemblies>

        <Assembly DeploymentTarget="GlobalAssemblyCache" FileName="Infusion.WebParts.dll">

          <SafeControls>

            <SafeControl Assembly="Infusion.WebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=434425b09396c611" Namespace="Infusion.WebParts" TypeName="*" Safe="True" />

          </SafeControls>

        </Assembly>

        <Assembly DeploymentTarget="GlobalAssemblyCache" FileName="Infusion.DirectoryServicesHelper.dll">

          <SafeControls>

            <SafeControl Assembly="Infusion.DirectoryServicesHelper.dll, Version=1.0.3058.16424, Culture=neutral, PublicKeyToken=3e458cd467f1ce4f" Namespace="Infusion.DirectoryServicesHelper" TypeName="*" Safe="True" />

          </SafeControls>

        </Assembly>

     </Assemblies>

      <DwpFiles>

        <DwpFile FileName="Infusion.WebParts.DisplayUsersFromADGroup.dwp" />

      </DwpFiles>

    </WebPartManifest>

     

    Yes I know this is a pretty obvious mistake but when you get such a general error message it is touch to track down.

  • Developer-Centric Companies

    The company I work for, Infusion is a developer-centric company. When I first met the owner I could tell right away how much he valued ability and intelligence. Infusion's strategy has always been to find the smartest people and grow them into leaders. Another developer-centric company is ThoughtWorks. The owner of the company, Roy Singham founded ThoughtWorks to disprove some of the myths that businesses had of intellectuals. My favorite is the following:

    "Intellectuals must be run by B students since intellectuals are idealist and only greedy B students are pragmatic enough to make real decisions"

    Not sure if I would consider myself an A student but I have seen in many companies this type of thinking. I find many companies who aren't developer-centric feel that technical people can't interact with customers or learn anything about business. I have been throwing around some ideas in my head and wanted to write down the criteria for developer-centric company.

    • Developers are not tightly managed and complete their tasks with minimal manager interaction.
    • Developers are viewed as professionals who are self-motivated and take pride in their work. They are not watched over.
    • The company is always looking to hire smart people with the right attitude. They feel hiring the right people is fundamental to the success of the company.
    • Developers are looked to provide business insight in addition to their technical contributions.
    • Performance and ability is preferred over seniority or politics.
    • Project managers are views as facilitators not controllers.

     

  • Why Are Websites Making it So Difficult to Login?

    Someone should come up with a standard for password requirements. I was creating an account on my car loan website today and here were the requirements for the password.
    • be at least 6 characters in length
    • contain both alpha (A-Z) and numeric (0-9) characters
    • use at least one upper case (A) and one lower case (a) character
    • not have more than 2 repeated characters (ex: "O'Tooole")
    • not have more then 2 characters in a sequence (ex: "123xyz")
    • not match the User ID

    Plus the username had to contain a number as well. Now I am all for strong passwords but this seems like overkill. It seems every site I create an account for these days has different criteria for a strong password.  I try to use only two or three passwords for every site but when a site has restrictions like above I have to create a new one. If it’s not one of the two or three I normally use I can’t remember it. Nothing is more frustrating for an end-user than not being able to login. And even if it is their fault that frustration will displace itself on the site they are having trouble logging into.

    I would prefer to be allowed to use any password that I see fit with a few simple limitations:
    ·         Can’t be the same as the user name.·         Can’t contain spaces or any scripting characters.·         Must be 6 characters in length.
    The other problem besides pissing of your users is if users can’t remember their password, they will write it down. I would venture to say (I don’t have any statistics to back this up) most accounts that are individually compromised are because someone found the password written down somewhere. Which is more secure me using the name of my first car or having RT890%GH*!!99 taped to the front of my monitor? I prefer to encourage stronger passwords rather than enforcing them by providing a strong password indicator to the user. Like the one with the ASP.NET Ajax toolkit. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/PasswordStrength/PasswordStrength.aspx 

    Also I alluded to this earlier but I wish sites would quit requiring special characters or numbers in the username. It is a username it should be up to you. I use the same user name/user ID for all my sites (the ones that will let me) and I don’t see anything wrong with this.

    My bank uses a rotating set of secret questions in addition to a username and password if I am visiting the site from a new computer. I found this a bit intrusive at first but it does provide some extra security and when I am on my normal laptop it detects the cookie and skips the secret question.

    Maybe instead of a call for password standards we should be talking about CardSpace and OpenID. How long have username and passwords been around? Maybe it is time websites and applications evolve past passwords. On a funny side note I usually write my blog posts in Word then paste them into the DNM site. After writing this and going to login to the site I couldn’t remember my password. Though we don’t require strong passwords so I have no one to blame but myself on that one.J  
  • Blogging Directly from Word

    I just stumbled onto something and thought I would share. Until this post I have been copy and pasting from Word into Community Server but now I go to New à Blog Post (instead of document). I then get prompted with a dropdown of my blog provider. I selected community server then specified the address and my login credentials. That is it. Now I can type up a post save it and when I am ready hit Publish.

    There were a few providers and a hook to add your own if yours isn't listed. Also there was a picture provider which would be cool if could included images in a blog post and it would automatically get saved somewhere. I will need to play around more with that feature. Ok well let's see what this looks like.

  • Finding Where A Content Type is Being Used

    Have you ever tried to delete a content type that is in use? SharePoint gives you a nice error that doesn't help you find where it is being used at all. There are two ways you can find out where it is being used:

     1. Add the Content Query WebPart on a page and pull back all uses of it. Not sure if this will though if it is only tied to a library and there isn't a document using it.

    2. Use a SQL statement

    DECLARE @ContentTypeName nvarchar(128)
    SET @ContentTypeName='Document'
    SELECT w.Title AS [Web Site], w.FullUrl AS [Web Url], al.tp_Title AS [List Title], ct2.* FROM ContentTypes ct1 JOIN ContentTypes ct2 ON LEFT(ct2.ContentTypeId, Len(ct1.ContentTypeId))=ct1.ContentTypeId LEFT OUTER JOIN dbo.ContentTypeUsage ctu ON LEFT(ctu.ContentTypeId, Len(ct2.ContentTypeId)) = ct2.ContentTypeId LEFT OUTER JOIN dbo.AllLists al ON ctu.ListId = al.tp_Id AND ctu.WebId=al.tp_WebId LEFT OUTER JOIN dbo.Webs w ON al.tp_WebId = w.Id WHERE ct1.ResourceDir=@ContentTypeName

  • Displaying Public Contacts from Exchange in the Page Viewer WebPart

    I need to do this tomorrow and needed somewhere to store the link. :)

     

    http://weblogs.asp.net/wkriebel/archive/2004/10/28/249195.aspx

  • Importing a Calendar into SharePoint

    I am posting this because there has to be a better way to do this then what I just did. To set the background, the client is running Exchange 2003 and MOSS and wants to sync the public calendars between the to. I did some research and it couldn't be done so the next best thing was to move away from the Exchange calendars and use SharePoint calendars inside Outlook. Well viewing a SharePoint calendar inside Outlook is pretty easy but I had some trouble moving the data from the original Exchange calendar to the new empty SharePoint calendar. So my work around was to export the Exchange calendar as a ics and upload it into Google Calendar. I had already being using a tool called SyncMyCal for my personal calendars so I used that to sync the data that was now in Google Calendar to the SharePoint Calendar I had in Outlook. It worked and requried a shower immediately after. Surely there is a better/easier way. I fully expect someone to post the right way to do this using SharePoint.

  • My Favorite Episode of DotNetRocks... Ever

    For those of you who don't listen to dnr on a regular basis you have to check out this episode. I almost didn't listen because I was like who the hell is Les Pinser. Well he is the guy who sold Gates Word. It was great listening to him tell stories about making Bill Gates a grill cheese, playing guitar with Jerry Lee Lewis, and scoring at FoxPro conferences.

    Here it is.

  • Do You Know You Can Customize the Help Pages in SharePoint?

    Well if you did good for you because I didn't. I was writing some help documentation today and thought wouldn't this be better if it was inside SharePoint instead of Word document that everyone is going to ignore. So I started googling and find out that when you click help inside SharePoint it just brings up a window of html pages. And those html pages are customizable.

     Open up the Central Admin site in SharePoint Designer and you will see a Document Library called HelpFold. Guess what? Yep, all those HTML pages are stored in there. Pull one up and you can rewrite the help pages to your heart's content.

  • Two Features Your SharePoint Users Should Know About

    I was in a client meeting yesterday and they had some concerns with the amount of time it would take their users to upload and tag all their documents. They were wanting me to write a script to transverse through the directory structure and tag the files. The problem was the heirarchy didn't match the tags. After 10 minutes of this I remembered two features in SharePoint that might alievate their concerns. The DataSheet View and Open in Explorer Option.

     DataSheet View

    Under the Actions menu in a document library selecting this option will bring up the document library in a grid with similiar functionality to Excel. This allows the users to drag values as well as copy/paste making editing all of those site columns pretty fast.

     Open in Explorer

    This option is also found under Actions and will open the document library in Windows Explorer allowing users to drag files into the library. Even better they can drag the entire heirarchy and the subdirectories will show up in the library as well.

     

  • Never Copy Files Into the TEMPLATE Folder Using Explorer

    I spent the entire morning tying to debug an issue of why my SharePoint site kept prompting my user for their credentials even after they had entered it. What made the issue confusing was this didn't happen for domain admins. To test that theory I added my account to the domain admin group in AD and it worked. Of course I can't leave it like that. A colleague of said that it was prompting me because the account was trying to access resources it didn't have permissions to. Permissions on the physical disk of the server not in the database. So I broke out Fiddler and sure enough the account was getting 401 errors when accessing core.css. So I go look at the permissions of that file and I see that domain admins have rights but that is it. There is the problem. So I gave the Authenticated Users group read access to the file and the problem was fixed. Now why did this happen. Well the title of this post should give you a hint. A few weeks ago I copied core.css from another server to be sure they were identical. They turned out to be exact but it seems using Windows Explorer to copy files to those directories resets or deletes permissions (still not exactly sure what happens here, feel free to comment). Anyway the morale of the story is when copying files use the command line instead of Windows Explorer. 

More Posts « Previous page - Next page »
2019.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems