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 9221845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:40:07+00:00 2026-06-18T03:40:07+00:00

I have a somewhat convoluted issue where I need to call a WCF web

  • 0

I have a somewhat convoluted issue where I need to call a WCF web service from a SQL Server 2005 stored procedure.

While researching I discovered that the only version of .NET SQL Server 2005 will natively support it 2.0 – yet I needed to use a client to consume the web service written for .NET 4. After playing around with some workaround to try to get SQL Server to recognize a .NET 4 DLL I decided to simply create a .NET 2 CLR stored procedure and use a wrapper class written in .NET 4 exposed as COM in order to call my web service.

I found several guides dealing with how to use a .NET 4 dll with .NET 2 as a COM dll (link, link) yet am still struggling.

My “wrapper class” (.NET 4) looks like this:

namespace Wrapper
{
    [Guid("4C1D992C-4965-49B2-A694-33810A3B9775")]
    [ComVisible(true)]
    public class WrapperClass
    {
         public bool Process(Guid ID)
         {
         }
    }
}

I’ve added the app.manifest file as suggested by the second link above. However, when I add the generated DLL to my .NET 2 sql server project, it fails to build with the following message:

1>c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): Warning:  MSB3274: The primary reference "Wrapper" could not be resolved because it was built against the ".NETFramework,Version=v4.0" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v2.0".

What am I doing wrong here? I tried not adding the DLL as a reference at all but then the code does not even compile.

Alternatively, is there another (easier) way I can approach this issue?

EDIT: I can’t directly add a web reference either:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 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. Editorial Team
    Editorial Team
    2026-06-18T03:40:09+00:00Added an answer on June 18, 2026 at 3:40 am

    I ended up just using John Koerner‘s suggestion and generating a client using WSDL that didn’t use System.ServiceModel. As a result I made my CLR assembly .net 2.0 and it worked fine.

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

Sidebar

Related Questions

I have a somewhat-long-running stored procedure being called from a PB application. I want
I need to extract a value from a hidden HTML field, have somewhat figured
I have a somewhat convoluted deploy procedure that I'd love to script. I'm not
I have a somewhat complex SQL query that is pulling from a table of
UPDATE: I have somewhat resolved the issue. Just in case if anyone runs in
I have a somewhat strange issue with visual studio. Almost every time I create
I have a somewhat simple Client/Server solution running over C# remoting (System.Runtime.Remoting). The MarshalByRef
I have following somewhat complex sql query which has horrible performance, 'certainly' due to
I have somewhat similar issue as this my VS 2010 does not hangup anymore
I have somewhat interesting development situation. The client and deployment server are inside a

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.