SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an branding solution with custom master page. I have also utilities assembly, which is deployed into GAC.

I have a button in my master page and I'd like to bind it's navigate URL to result of static method which is located in utilities assembly. My branding solutions has reference to util assembly. My class looks as follows:

namespace GPE.Utilities.Integration
    public static class AuthenticationHelper
        public static string GetSignoutUrl()
            // logic here

and my button in master page:

<SharePoint:SPLinkButton runat="server" Text="Signout" NavigateUrl="<%# GPE.Utilities.Integration.AuthenticationHelper.GetSignoutUrl() %>" />

And I'm getting following error:

error CS0234: The type or namespace name 'Utilities' does not exist in the namespace 'GPE' (are you missing an assembly reference?)


I added this at top of my master page:

<%@ Register Tagprefix="GpeIntegration" Namespace="GPE.Utilities" Assembly="GPE.Utilities, Version=, Culture=neutral, PublicKeyToken=6dd8f89f9df3b99" %>

And I got following error:

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

I also tried with:

with same result.

share|improve this question

you should register your custom DLL in the beginnig of the master page like this:

  1. YourPrefix - whatever you'd like
  2. DLLNameSpace - in your case GPE.Utilities.Integration
  3. AssembyName - right click on the project which generated your DLL and properties.
  4. TOKEN - should be taken from DLL. To do this go to Start->All programs->Microsoft Visual Studio->Visual Studio Tools->Developer Command Prompt. Run this and type sn -T PathToYourDLL.

Hope it helps,


share|improve this answer
I edited my question with results of what you suggested, with no luck. – jjczopek Mar 6 '13 at 12:52
Namespace should be a full path to your class so in my opinion it should be like <%@ Register Tagprefix="GpeIntegration" Namespace="GPE.Utilities.Integration" Assembly="GPE.Utilities, Version=, Culture=neutral, PublicKeyToken=6dd8f89f9df3b99" %> – Andrew Adamich Mar 6 '13 at 13:11

I would have build a user control that includes that button and references the utilityclass. In that case you only have to reference the user control (or a delegate control) in the master page and not having code directly in the master page. Much cleaner and you will not have a lot of reference problems to DLL:s..


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.