Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am receiving the following error when I enter in the url of my service application.

"Could not load file or assembly '$SharePoint.Project.AssemblyFullName$' or one of its dependencies. The system cannot find the file specified."

However, the .svc file is located in the Hive 14/WebServices folder, so I don't know why it is saying it can't find the file. My service application also fails, obviously, stating that "There are no addresses available for this application."

Sorry I can't provide much more information. Can anyone shine any light on to this one?

Here is my web.config file and .svc file just in case.

<%@ServiceHost Language="C#"
Service="AF.TipAndLeadAPI.TipAndLeadAPIServiceApplication, $SharePoint.Project.AssemblyFullName$" 
Factory="AF.TipAndLeadAPI.TipAndLeadAPIServiceHostFactory, $SharePoint.Project.AssemblyFullName$" %>


<configuration>
  <system.web>
    <compilation debug="true" defaultLanguage="C#" />
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="TLAPITypeBehaviors" >
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service name="AF.TipAndLeadAPI.TipAndLeadAPIServiceApplication" behaviorConfiguration="TLAPITypeBehaviors">
        <endpoint binding="customBinding" bindingConfiguration="TLAPIServiceHttpBinding"
                  contract="AF.TipAndLeadAPI.ITipAndLeadAPIContract"
                  address="" />
        <endpoint binding="customBinding" bindingConfiguration="TLAPIServiceHttpsBinding"
                  contract="AF.TipAndLeadAPI.ITipAndLeadAPIContract"
                  address="secure" />
        <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
      </service>
    </services>
    <bindings>
      <customBinding>
        <binding name="TLAPIServiceHttpBinding">
          <security authenticationMode="IssuedTokenOverTransport" allowInsecureTransport="true" />
          <binaryMessageEncoding>
            <readerQuotas maxStringContentLength="1048576" maxArrayLength="2097152" />
          </binaryMessageEncoding>
          <httpTransport maxReceivedMessageSize="2162688" authenticationScheme="Anonymous" useDefaultWebProxy="false" />
        </binding>
        <binding name="TLAPIServiceHttpsBinding">
          <security authenticationMode="IssuedTokenOverTransport" />
          <binaryMessageEncoding>
            <readerQuotas maxStringContentLength="1048576" maxArrayLength="2097152" />
          </binaryMessageEncoding>
          <httpsTransport maxReceivedMessageSize="2162688" authenticationScheme="Anonymous" useDefaultWebProxy="false" />
        </binding>
      </customBinding>
    </bindings>
  </system.serviceModel>
  <system.webServer>
    <security>
      <authentication>
        <anonymousAuthentication enabled="true" />
        <windowsAuthentication enabled="false" />
      </authentication>
    </security>
  </system.webServer>
</configuration>
share|improve this question

3 Answers 3

up vote 2 down vote accepted

It is not mapping $SharePoint.Project.AssemblyFullName$ to the actual AssemblyFullName value so it is including that as a literal string. Put in the actual value for the assembly and it will work.

Alternatively you can check this article out about Replaceable Parameters and how to get your project tokens to render for files outside of the Package and Manifest files. http://msdn.microsoft.com/en-us/library/ee231545.aspx

share|improve this answer
    
I tried that and got the same error but with the fully qualified name in the place of $SharePoint.Project.AssemblyFullName$. I have checked out that article but the <TokenReplacementFileExtensions>myextension;yourextension</TokenReplacementFileE‌​xtensions> element no longer seems valid in a csproj file. –  Meyer Denney Oct 18 '11 at 23:55
    
Just to be clear, by fully qualified assembly name, you mean the name that is located in Project>Properties>Assembly Name and not the actual .dll name? –  Meyer Denney Oct 18 '11 at 23:58
1  
Yes, Fullname is the property shown under Project, Properties, Assembly Name. The Filename is the name of the output dll. –  Mike Oryszak Oct 19 '11 at 0:10

Adding the TokenReplacementFileExtensions ellement shown in the previous post to my .csprog file worked for me as I had a similar issue with my SharePoint 2010 service application recieving the "There are no addresses available for this application". Thank you!

share|improve this answer

It turns out all I needed was <TokenReplacementFileExtensions>svc</TokenReplacementFileE‌​xtensions> in my csproj file of the service application. Even though Visual Studio puts a blue squiggly line under the TokenreplacementFileExtensions element saying its invalid, it seems to work.

So Mike Oryszak was correct in with his alternate explanation with the Replaceable Parameters article and I will mark his answer as so.

share|improve this answer

Your Answer

 
discard

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.