Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 119181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:36:44+00:00 2026-05-11T03:36:44+00:00

I have a solution that contains two projects. One project is an ASP.NET Web

  • 0

I have a solution that contains two projects. One project is an ASP.NET Web Application Project, and one is a class library. The web application has a project reference to the class library. Neither of these is strongly-named.

In the class library, which I’ll call "Framework," I have an endpoint behavior (an IEndpointBehavior implementation) and a configuration element (a class derived from BehaviorExtensionsElement). The configuration element is so I can attach the endpoint behavior to a service via configuration.

In the web application, I have an AJAX-enabled WCF service. In web.config, I have the AJAX service configured to use my custom behavior. The system.serviceModel section of the configuration is pretty standard and looks like this:

<system.serviceModel>  <behaviors>   <endpointBehaviors>    <behavior name="MyEndpointBehavior">     <enableWebScript />     <customEndpointBehavior />    </behavior>   </endpointBehaviors>  </behaviors>  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />  <services>  <service name="WebSite.AjaxService">   <endpoint            address=""            behaviorConfiguration="MyEndpointBehavior"            binding="webHttpBinding"            contract="WebSite.AjaxService" />   </service>  </services>  <extensions>   <behaviorExtensions>    <add        name="customEndpointBehavior"        type="Framework.MyBehaviorExtensionsElement, Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>   </behaviorExtensions>  </extensions> </system.serviceModel> 

At runtime, this works perfectly. The AJAX enabled WCF service correctly uses my custom configured endpoint behavior.

The problem is when I try to add a new AJAX WCF service. If I do Add -> New Item… and select "AJAX-enabled WCF Service," I can watch it add the .svc file and codebehind, but when it gets to updating the web.config file, I get this error:

The configuration file is not a valid configuration file for WCF Service Library.

The type ‘Framework.MyBehaviorExtensionsElement, Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ registered for extension ‘customEndpointBehavior’ could not be loaded.

Obviously the configuration is entirely valid since it works perfectly at runtime. If I remove the element from my behavior configuration temporarily and then add the AJAX-enabled WCF Service, everything goes without a hitch.

Unfortunately, in a larger project where we will have multiple services with various configurations, removing all of the custom behaviors temporarily is going to be error prone. While I realize I could go without using the wizard and do everything manually, not everyone can, and it’d be nice to be able to just use the product as it was meant to be used – wizards and all.

Why isn’t my custom WCF behavior extension element type being found?

Updates/clarifications:

  • It does work at runtime, just not design time.
  • The Framework assembly is in the web project’s bin folder when I attempt to add the service.
  • While I could add services manually ("without configuration"), I need the out-of-the-box item template to work – that’s the whole goal of the question.
  • This issue is being seen in Visual Studio 2008. In VS 2010 this appears to be resolved.

I filed this issue on Microsoft Connect and it turns out you either have to put your custom configuration element in the GAC or put it in the IDE folder. They won’t be fixing it, at least for now. I’ve posted the workaround they provided as the "answer" to this question.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:36:45+00:00Added an answer on May 11, 2026 at 3:36 am

    Per the workaround that Microsoft posted on the Connect issue I filed for this, it’s a known issue and there won’t be any solution for it, at least in the current release:

    The reason for failing to add a new service item: When adding a new item and updating the configuration file, the system will try to load configuration file, so it will try to search and load the assembly of the cusom extension in this config file. Only in the cases that the assembly is GACed or is located in the same path as vs exe (Program Files\Microsoft Visual Studio 9.0\Common7\IDE), the system can find it. Otherwise, the error dialog will pop up and ‘add a new item’ will fail.

    I understand your pain points. Unfortunately we cannot take this change in current release. We will investigate it in later releases and try to provide a better solution then,such as providing a browse dialog to enable customers to specify the path, or better error message to indicate some work around solution, etc…

    Can you try the work around in current stage: GAC your custom extension assembly or copy it to ‘Program Files\Microsoft Visual Studio 9.0\Common7\IDE’?

    We will provide the readme to help other customers who may run into the same issue.

    Unfortunately, it appears I’m out of luck on this one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 102k
  • Answers 102k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I just blogged another method here: http://mikehadlow.blogspot.com/2009/06/tfs-build-publishedwebsites-for-exe-and.html but if you… May 11, 2026 at 8:12 pm
  • Editorial Team
    Editorial Team added an answer REs aren't that good for very complicated things like multiple… May 11, 2026 at 8:12 pm
  • Editorial Team
    Editorial Team added an answer No idea what exact operations you are limited to, but… May 11, 2026 at 8:12 pm

Related Questions

In Visual C# 2008, I have a solution with two projects. First project contains
I have a c# .net winforms solution and I want to create two different
I've been using the macro from this blog entry for attaching the Visual Studio
I am currently doing a CRUD project for school and basically they want us

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.