Referencing Web Service in encapsulated DLL

  • Hi,

    I have build a DLL in VB.net 2010 (framework 3.5) which encapsulated a web service reference who "talk" with an ERP remote system. This DLL works perfectly.

    Now, I want to integrate this DLL in SQL Server. So I created a SQL CLR database project in VS 2010. But I can't add the my DLL reference. I checked on Google and it says DLL must be registered in MSSQL. So I tried to add the assembly. I got the error:

    Assembly 'MaestroInterface' references assembly 'system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(failed to retrieve text for this error. Reason: 15105)). Please load the referenced assembly into the current database and retry your request.

    Then I tried to add the Web Service directly into the SQL CLR project. But I get the exact same error.

    I tried to registered the system.servicemodel DLL in MSSQL but it gaves me another missing assemblies.

    Am I missing something? Have I done something wrong? How can I fix my problem?

    thanks for your time and help!

  • I fixed my problem by changing the service reference to WebReference. It works now.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply