Saturday, February 25, 2012

Replication Merge and Web Service

Hi,
how can I make it work the following procedure:
http://support.microsoft.com/default...b;en-us;319646
in a Web Service? Namely, the previous procedure should become a web
service... I have already tried to create a web service and copy almost all
the code... but after having referenced it as a web reference and then
colling the service, I got the following error:
An unhandled exception of type 'System.Web.Services.Protocols.SoapException'
occurred in system.web.services.dll
Additional information: System.Web.Services.Protocols.SoapException: Server
was unable to process request. -->
System.Runtime.InteropServices.COMException (0x80040E08): The process could
not connect to Distributor 'MYSQLSERVER'.
at SQLMERGXLib.SQLMergeClass.Initialize()
at tAIMx.Services.tAIMx_ReplicationServices.Merge(Str ing strPublisher,
String strDistributor, String strSubscriber, String strPublication, String
strPublisherDatabase, String strSubscriberDatabase) in
c:\inetpub\wwwroot\myservices\replicationservices. asmx.cs:line 97
-- End of inner exception stack trace --
If I run the code without copying it in a web service, it works very well!!
Please help me.
how are you connecting to your distributor? You might want to try using sql
authentication as this seems to be a authentication problem.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Siu" <Siu@.discussions.microsoft.com> wrote in message
news:BD0D9A31-8E50-465A-BC8B-90D0223306F2@.microsoft.com...
> Hi,
> how can I make it work the following procedure:
> http://support.microsoft.com/default...b;en-us;319646
> in a Web Service? Namely, the previous procedure should become a web
> service... I have already tried to create a web service and copy almost
all
> the code... but after having referenced it as a web reference and then
> colling the service, I got the following error:
> An unhandled exception of type
'System.Web.Services.Protocols.SoapException'
> occurred in system.web.services.dll
> Additional information: System.Web.Services.Protocols.SoapException:
Server
> was unable to process request. -->
> System.Runtime.InteropServices.COMException (0x80040E08): The process
could
> not connect to Distributor 'MYSQLSERVER'.
> at SQLMERGXLib.SQLMergeClass.Initialize()
> at tAIMx.Services.tAIMx_ReplicationServices.Merge(Str ing strPublisher,
> String strDistributor, String strSubscriber, String strPublication, String
> strPublisherDatabase, String strSubscriberDatabase) in
> c:\inetpub\wwwroot\myservices\replicationservices. asmx.cs:line 97
> -- End of inner exception stack trace --
> If I run the code without copying it in a web service, it works very
well!!
> Please help me.
|||Hi Hilary,
thank you: I've used an NT_Authentication as you can see from the code...
I've discovered that if I run the code (.exe) as an administrator user, it
works, but under another user, it doesn't work. I don't know how to force the
user under who the code should run... can you help me again?
"Hilary Cotter" wrote:

> how are you connecting to your distributor? You might want to try using sql
> authentication as this seems to be a authentication problem.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Siu" <Siu@.discussions.microsoft.com> wrote in message
> news:BD0D9A31-8E50-465A-BC8B-90D0223306F2@.microsoft.com...
> all
> 'System.Web.Services.Protocols.SoapException'
> Server
> could
> well!!
>
>
|||is this user in the PAL?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Siu" <Siu@.discussions.microsoft.com> wrote in message
news:DF5EEA36-9B95-4D13-AF5F-02CE6BD141BB@.microsoft.com...
> Hi Hilary,
> thank you: I've used an NT_Authentication as you can see from the code...
> I've discovered that if I run the code (.exe) as an administrator user, it
> works, but under another user, it doesn't work. I don't know how to force
the[vbcol=seagreen]
> user under who the code should run... can you help me again?
>
> "Hilary Cotter" wrote:
sql[vbcol=seagreen]
almost[vbcol=seagreen]
then[vbcol=seagreen]
strPublisher,[vbcol=seagreen]
String[vbcol=seagreen]
|||What is the PAL?
"Hilary Cotter" wrote:

> is this user in the PAL?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Siu" <Siu@.discussions.microsoft.com> wrote in message
> news:DF5EEA36-9B95-4D13-AF5F-02CE6BD141BB@.microsoft.com...
> the
> sql
> almost
> then
> strPublisher,
> String
>
>
|||Your Publication Access List. This is a list of accounts which can pull
subscriptions.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Siu" <Siu@.discussions.microsoft.com> wrote in message
news:C39C0E46-E0AA-483B-BF8A-31E0127AA2B5@.microsoft.com...[vbcol=seagreen]
> What is the PAL?
> "Hilary Cotter" wrote:
code...[vbcol=seagreen]
user, it[vbcol=seagreen]
force[vbcol=seagreen]
using[vbcol=seagreen]
web[vbcol=seagreen]
System.Web.Services.Protocols.SoapException:[vbcol=seagreen]
process[vbcol=seagreen]
strPublication,[vbcol=seagreen]
very[vbcol=seagreen]
|||Thank you Hilary,
you gave me an idea how to find the problem which was the permission on the
replicated database: the user, under which the code runs, must have the owner
role of the database... now it works very well.
"Hilary Cotter" wrote:

> Your Publication Access List. This is a list of accounts which can pull
> subscriptions.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Siu" <Siu@.discussions.microsoft.com> wrote in message
> news:C39C0E46-E0AA-483B-BF8A-31E0127AA2B5@.microsoft.com...
> code...
> user, it
> force
> using
> web
> System.Web.Services.Protocols.SoapException:
> process
> strPublication,
> very
>
>

No comments:

Post a Comment