.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

connect to a wcf service in framework 4.0 via sql server 2008 r2

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :


hello everybody!!


i need to connect to a wcf service from a job in the sql server, i have been looking for diffrent ways to do so and in the mintime 

i found only 2 ways.


1. creating an ssis web service and configuring the wcf service protocole to work with basichttp instead of wshttp

and configuring it to create a WSDL file to submit to the http connection manager in the ssis package, the problem with this method is 

that i have to keep a copy of the WSDl file on the local machine and that could be a problem in the long run.


2. using and enabling SQLCLR in the sql server 2008 r2 i can access the wcf service by adding some dll's from the .net framework,

but the framework has to be 3x and below. sql server 2008 r2 does not support framework 4x becouse 4x runs 2 diffrent instances

and 3x runs one instance the 3x CLR uses some lockinstance method and it dosent comply with the 4x framework.

i am developing on 4x framework with visual studion 2010 so it dosent work with sql 2008.


i need your help!!!

i searched for other methods but ididnt find any other then this 2

please assist me!!!


View Complete Post

More Related Resource Links

How to connect to local instance of SQL Server 2008 Management Studio Express ?


I just installed SQL Server 2008 Management studio Express on my Vista machine.

i tried connecting to local machine using :

.\sqlexpress, (local)\sqlexpress, or .\SQLExpress, MyPCNAME\SQLExpress

nothing is working, getting this error:

Cannot connect to PC-NAME\SQLEXPRESS. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

SQL Server 2008 - Installation Woe - .NET Framework 3.5 SP1

On a Windows 2003 R2 x64 server, I have been unable to install SQL Server 2008 Enterprise Edition x64. When running setup.exe, I almost instantaneously receive the following Microsoft SQL Server Setup error:"Microsoft .NET Framework 3.5 installation has failed.SQL Server 2008 Setup requires .NET Framework to be installed."What does not make sense is that I successfully downloaded .NET Framework 3.5 from the Microsoft download site (published 8/11/2008) prior to the SQL Server 2008 installation attempt.http://www.microsoft.com/downloads/details.aspx?familyid=ab99342f-5d1a-413d-8319-81da479ab0d7&displaylang=enI do need to note that a few nights ago, prior to downloading the framework (3.5 SP1), I ran the SQL Server 2008 setup executable. I was prompted that in order to install SQL Server 2008, the setup program needed to first install .NET 3.5 SP1 and Windows Installer 4.5. I let the .NET 3.5 SP1 install run for about 1.5 to 2 hours and cancelled (now I wish I had just let it go).It is my understanding (correct me if I am wrong) that the SQL Server 2008 setup program initially checks for any pre-RTM versions of .NET 3.5 SP1 Framework. If one is found, it is then supposed to guide the user through both the installation of the .NET 3.5 SP1 Framework and Windows Installer 4.5. I have removed .NET 3.5 SP1 Framework (Add/Remove programs) and rebooted. However, upon runni

SQL Agent - service account permissions - SQL Server 2008

Hi @ all   I installed two SQL Server 2008 on Server 2008 R2 Std (principal and mirror) and an AD Server 2008, with sperate service accounts, connect as SA, localy all works fine. I created some agent tasks (PowerShell, T-SQL), but I get some Error massages in the history, that service account of SQL Agent didn't have the permission to query a remote machine(access denied for wmi (HRESULT: 0x80070005 (E_ACCESSDENIED)) and linked database(SQLSTATE 42000 Error(7314)). The simple query with SA permissions on the remote machine works and the powershell scripts with the local domain user works too. But not with the SQL Agent. WHY?? Where ist the different between the user account permisions and service account permissions? Which settings are needed? Example: get-wmiobject -class win32_service -computername 192.168.xxx.xxx| where {$_.name -like '*SQL*'} Powershell Console: works                                     SQL Agent Job: access denied I tried some solutions with user rights, group policies and security permissions but nothing works. like: Configuration -Service Accounts, SQL Server or SQL Server Agent service account http://support.microsoft.com/kb/283811/en-us http://msdn2.microsoft.com/

Connection to Exchange Server of .NET 1.1 Framework application on Windows 2008 64-bit

I am running Visual Studio 2003 .NET Framework 1.1 application on Windows 2008 64-bit machine. There is only one problem - connection to Exchange Server. The same application is running fine on Windows 7 64-bit machine (not server). I tried to use the same Interop.MAPI.dll I used for Windows 7, but it doesn't work for Windows 2008.   Please help.  

Can not connect to user instance of SQL Server 2008 Express with Advance Services in Visual Studio 2

I used SQL Server 2008 Express with Advanced Services (not SQL Server 2008 Express) in Visual Studio 2010 because it is the fast and easy way to developed and managed data-driven applications with powerful built-in reporting and full-text search functionality. I received Sql Server 2008 Service Pack 1 with Windows Update. It's ok if I connect to instance of SQL Server 2008 Express with Advance Services (with SP1) through SQL Server Management, but if I try to attach a database in Server Explorer (Visual Studio 2010), I get the following error: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." I'm stuck at this point. Is there a fix or a workaround? I've already tried deleting the 'C:\Users\Administrtor\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS' directory as mentioned in other posts, with no luck. The error.log at 'C:\Users\Administrator\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log' has the following relevant entries: 2010-09-01 14:44:10.47 Server      Error: 17156, Severity: 16, State: 1. 2010-09-01 14:44:10.47 Server      initeventlog: Could not initiate the EventLog Service for the key '3677F6D3-17C7-4F', last error code is 2. 2010-09-01 14:44:10.47 Server &

Issues in GetItemDataSources web service call in 2008 Report Server R2

Hi, I'm using Reporting Services web services endpoint ReportService2005.asmx with 2008 report server R2 and I'm facing some issues in getting the data source names for a report definition using the GetItemDataSources web service. The problem is that the data source names returned are different from the names of the actual data sources on the report server. The report has the following data sources: 0 1 _0 _A Data Source And the names returned by the GetItemDataSources for 2008 report server R2 is: AutoGen_0 AutoGen_1 AutoGen__0 AutoGen__A Data_Source When I make the same calls using a 2005 report server, the names returned are the same as that in the report definition. To summarize, only numeric data source names are changed to "Autogen_<number>"(eg. Autogen_0), data source names beginning with "_" are changed to "Autogen_<data source name>"(eg. AutoGen__A)  and spaces are replaced by an "_".   What is the problem for the data source names returned for 2008 report server R2? Or has there been any change in the way in which report server stores the data source names? Thanks, Kulbhushan Singhal.  

SQL Server 2008 R2 Installation and Service Pack 1 Question

I am migrating a SQL 2000 server to a SQL 2008 R2 server (on different physical servers) . When I ordered SQL Server 2008 the volume licensing allowed me to download sql server web 2008, sql server web 2008 R2 and sql server 2008 service pack 1. I don't know why I have three options to download. Don't I just need to just install the sql server 2008 Web R2? Are there any sql 2008 R2 service packs available?   

SQL Server 2008 express SQL Server Service won't start

Could really use some help. Am running XP Pro SP3.  Had 2005 Express running fine previously.  Installed 2008 Express but cannot get the SQL Server service to start.  SQL Server Agent does start though.  In log (below) it seems to be trying to access an E:\ drive that doesn't exist (did default install to C:\Program Files) - plus other issues.  Have 5gig+ free, so not sure why it's saying not enough space.  Have RTFMd the problem for a whole day with no luck.  Any advice much appreciated.   Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)  Apr  2 2010 15:53:02  Copyright (c) Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3) (Hypervisor)   Error: 17054, Severity: 16, State: 1. The current event was not reported to the Windows Events log. Operating system error = 1502(The event log file is full.). You may need to clear the Windows Events log if it is full. (c) Microsoft Corporation. All rights reserved. Server process ID is 4988. Authentication mode is WINDOWS-ONLY. Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Log\ERRORLOG'. This instance of SQL Server last reported using a process ID of 3232 at 9/4/2010 9:36:12 AM (local) 9/4/2010 1:36:12 PM (UTC). This is an informational

Unable to connect SQL Server 2008

Hi, I have recently installed a trial copy of SQL Server 2008 from MS web but I am not able to connect to the SQL Database Engine locally using Windows Authentication. Whenever, I tried I got the following error message: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)" Just to inform you, I have OS Win7.  And I want to establish local connections only on my laptop.

Problem consuming 32bit WCF service which references a native Dll in a 64 bit OS(Windows Server 2008

I have some 32bit Dlls which i want to use it in 64bit OS as i do not have a source code of this to recompile it for 64 bit OS. I have created a x86(32 Bit) WCF service which calls these Dlls and hosted it as a Windows Service on a x64(64 Bit) machine using Windows Server 2008. I have created one more x64 client which calls a function in the WCF which in turn calls a function from the 32 bit native Dll. Whenever i try calling this WCF from the client I get an error as given below.Can anybody please guide as to where I am going wrong and what is needed to solve this issue. Thanks in advance for any help.******The Error Message********************System.BadImageFormatException: Could not load file or assembly 'TestWCFWrapper, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.File name: 'TestWCFWrapper, Version=, Culture=neutral, PublicKeyToken=null'   at TestWrapperWCFClient.Form2.button1_Click(Object sender, EventArgs e)   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms

Connect to SQL Server 2008 Express

Hi Guys, I have just started a personal project for our Corporate Desktop environment to actively track our Hardware and Software Inventory.  My plan is this for starters:   1 Computer using VBScript and WMI to gather the data, store the data into SQL Server 2008 Express, and present the data using ASP.NET or Javascript. The VBScript will get a list of computers from AD under specified OUs and will run on a scheduled task.   This deployment will initially be on 1 desktop computer for now.  How do I connect to SQL Server 2008 locally using OLEDB from my vbscript?  Will this require a username/password even though it is a local connection?  If it does require a password, do you know a way to prevent the password from being stored as clear text.  Does Windows Integrated configuration on the SQL Server 2008 Express allow a passthrough of credentials from the Scheduled Task so that the password is not required from the script?  I would like it to be as secure as possible since we have financial services users and we would be under the scope of an audit if ever it was needed or requested.  Thanks guys.  :-)

SQL Server 2008 R2 Setup & Service Packs

Hello I installed SQL Server 2008 R2. (Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) (Hypervisor) ) Are there any Service Packs for SQL Server 2008 R2 available i need to apply? Thanks V

SQL server 2008 compact editioin + Entity Framework: Can we backup the SQL server compact edition da

our application uses the SQL server 2008 compact edition and entity framework. The application will control the instrument. It may run for several days before it stops. In order to protect the database crash (database failure), we plan to backup SQL compact database during running. Can we backup or duplicate the ~.sdf when application is running? Is there any SQL server command we can call inside the application to achive the backup? Or we only can backup the database when application is not running. thx!  

Cannot Connect SQLServer 2008 with the provider SQLNCLI... Is there any SQL Server 2008 patch to sup

We have a program which developed under SQL Server 2005. In the program the provider of the connect string is hard coded as "SQLNCLI". It's ok running on SQL Server 2005. Now, for some reasons, this program must run under SQL Server 2008 (x64). But our program cannot access the SQL Server. We check the reason, found that, in SQL Server 2008, SQLNCLI is changed to SQLNCLI10, this caused our program cannot run. So I want to ask, is there any patch of SQL2008, so that the legacy program can normal access SQLserver with SQLNCLI WITHOUT rebuild a new version?  

Can't connect to SQL Server 2008 Reporting Services

When attempting to connect to SQL Server 2008 (evaluation) on Windows XP SP3, using the following url, http://servername:8080/ReportServer I receive a popup dialog box asking me for a user name and password to connect to the server.  When I enter the domain\user and password that I think it should be, it pops up two more times and then displays a blank internet explorer web page.  It is a fresh install and I believe I have everything running correctly.   Any input or guidance would be extremely appreciated.   Thank you in advance.

How to connect visual web developer 2008 express edition to SQL server 2008 ??

i know its a basic question guys! please help me . i have created a login.aspx file in visual web developer .now i want to connect the username and password details to SQL database ... How do i do it .....I can see some grt genius out there, i am sure some one is kind enough to help me with this question !!! thank you .....................................

Does SQL Server 2008 R2 Express Reporting Service support Shared Datasets?

I have spent a few hours trying to get this to work. I am using Report Builder 3.0 (locally), with SQL Server 2008 R2 Express Edition on a remote web server. I am running Report Builder as an Admin under Win7 64bit. All is OK until I attempt a Save of a newly created shared dataset. The error message is: Failed to save dataset "mydataset.rsd" The feature "Shared dataset" is not supported in this edition of Reporting Services. Details: The feature: "Shared dataset" is not supported in this edition of Reporting Services. ---> Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "Shared dataset" is not supported in this edition of Reporting Services. I have researched the web, and the list of features for Express Edition does not list this feature as not being supported, although it does list "Shared component library" as being missing. Could anyone please confirm the situation please. If it is  a bug, is there any fix or workaround?  John Walton  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend