[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Problems with remoting and SqlCommand.ExecuteNonQuery

Otto

10/26/2004 1:17:00 PM

Hi, all:
I´m having problems with a .net remoting application. The problem is as
follows: I have a windows forms application that connects to a .net remoting
components hosted in an IIS (in a separate server). This remoting component
is a data access component, in other words, it performs data access tasks.
The problem arise when I try to execute a database task which involves the
use of ExecuteNonQuery method (like delete a product, for example). When I do
this, this error appears: "Unable to write data to the transport connection.
The connection has finished: Could not establish a secure channel for
SSL/TSL." This is very strange, but I can confirm that the error raises when
executing that method. Does anyone know what is the reason for this? Is there
any relation between these elements? I´m using an Http channel and Microsoft
Data Access Application Block for database operations.
Any help would be appreciated.

Thanks a lot.
4 Answers

Ken Kolda

10/26/2004 3:33:00 PM

0

Don't know if this will help, but I know we ran into some problems with
self-signed certificates and SQL Server which may be affecting you (since
you said you're using IIS).

http://support.microsoft.com/default.aspx?scid=kb;EN...

Hope that helps -
Ken


"otto" <otto@discussions.microsoft.com> wrote in message
news:D045E6FE-C20E-4248-8653-4F21D2CDFDBD@microsoft.com...
> Hi, all:
> I´m having problems with a .net remoting application. The problem is as
> follows: I have a windows forms application that connects to a .net
remoting
> components hosted in an IIS (in a separate server). This remoting
component
> is a data access component, in other words, it performs data access tasks.
> The problem arise when I try to execute a database task which involves the
> use of ExecuteNonQuery method (like delete a product, for example). When I
do
> this, this error appears: "Unable to write data to the transport
connection.
> The connection has finished: Could not establish a secure channel for
> SSL/TSL." This is very strange, but I can confirm that the error raises
when
> executing that method. Does anyone know what is the reason for this? Is
there
> any relation between these elements? I´m using an Http channel and
Microsoft
> Data Access Application Block for database operations.
> Any help would be appreciated.
>
> Thanks a lot.


Otto

10/27/2004 6:41:00 AM

0

Hi, Ken:
I think that´s not the problem, because I can use ExecuteReader or
ExecuteScalar methods, so I think there´s no relation between the sql
database and the remoting configuration. I can work with SQL Server tools
(enterprise manager, analyzer...) without problems. If you have more ideas I
will wait for they ;)
Thanks a lot for your time and help.

Cheers

"Ken Kolda" wrote:

> Don't know if this will help, but I know we ran into some problems with
> self-signed certificates and SQL Server which may be affecting you (since
> you said you're using IIS).
>
> http://support.microsoft.com/default.aspx?scid=kb;EN...
>
> Hope that helps -
> Ken
>
>
> "otto" <otto@discussions.microsoft.com> wrote in message
> news:D045E6FE-C20E-4248-8653-4F21D2CDFDBD@microsoft.com...
> > Hi, all:
> > I´m having problems with a .net remoting application. The problem is as
> > follows: I have a windows forms application that connects to a .net
> remoting
> > components hosted in an IIS (in a separate server). This remoting
> component
> > is a data access component, in other words, it performs data access tasks.
> > The problem arise when I try to execute a database task which involves the
> > use of ExecuteNonQuery method (like delete a product, for example). When I
> do
> > this, this error appears: "Unable to write data to the transport
> connection.
> > The connection has finished: Could not establish a secure channel for
> > SSL/TSL." This is very strange, but I can confirm that the error raises
> when
> > executing that method. Does anyone know what is the reason for this? Is
> there
> > any relation between these elements? I´m using an Http channel and
> Microsoft
> > Data Access Application Block for database operations.
> > Any help would be appreciated.
> >
> > Thanks a lot.
>
>
>

Ken Kolda

10/27/2004 2:57:00 PM

0

So it's only ExecuteNonReader() that's failing? That's really strange. Is
the query you're executing doing something different than your other
queries, e.g. using a linked server? If you executed the exact same query
using ExecuteScalar(), would you get the same error?

Ken


"otto" <otto@discussions.microsoft.com> wrote in message
news:C7479A6A-1660-44DF-96AD-B24B4B7D7FDB@microsoft.com...
> Hi, Ken:
> I think that´s not the problem, because I can use ExecuteReader or
> ExecuteScalar methods, so I think there´s no relation between the sql
> database and the remoting configuration. I can work with SQL Server tools
> (enterprise manager, analyzer...) without problems. If you have more ideas
I
> will wait for they ;)
> Thanks a lot for your time and help.
>
> Cheers
>
> "Ken Kolda" wrote:
>
> > Don't know if this will help, but I know we ran into some problems with
> > self-signed certificates and SQL Server which may be affecting you
(since
> > you said you're using IIS).
> >
> > http://support.microsoft.com/default.aspx?scid=kb;EN...
> >
> > Hope that helps -
> > Ken
> >
> >
> > "otto" <otto@discussions.microsoft.com> wrote in message
> > news:D045E6FE-C20E-4248-8653-4F21D2CDFDBD@microsoft.com...
> > > Hi, all:
> > > I´m having problems with a .net remoting application. The problem is
as
> > > follows: I have a windows forms application that connects to a .net
> > remoting
> > > components hosted in an IIS (in a separate server). This remoting
> > component
> > > is a data access component, in other words, it performs data access
tasks.
> > > The problem arise when I try to execute a database task which involves
the
> > > use of ExecuteNonQuery method (like delete a product, for example).
When I
> > do
> > > this, this error appears: "Unable to write data to the transport
> > connection.
> > > The connection has finished: Could not establish a secure channel for
> > > SSL/TSL." This is very strange, but I can confirm that the error
raises
> > when
> > > executing that method. Does anyone know what is the reason for this?
Is
> > there
> > > any relation between these elements? I´m using an Http channel and
> > Microsoft
> > > Data Access Application Block for database operations.
> > > Any help would be appreciated.
> > >
> > > Thanks a lot.
> >
> >
> >


Otto

10/28/2004 11:31:00 AM

0

Hi, Ken:
I´ve discovered the problem. It´s strange and I don´t know exactly what´s
going on, but now it works. the problem was that I was using the
ExecuteNonqueryMethod as follows:

SqlHelper.ExecuteNonQuery(_connString,CommandType.StoredProcedure,"storedProcedure_name",new SqlParameter("name", value));

My stored procedure has only one input parameter. With the instruction above
it doesn´t works. But I´ve changed with this code and now it works:

SqlParameter[] sqlParams = new SqlParameter[1];
sqlParams[0] = new SqlParameter("@name",SqlDbType.Int ,4);
sqlParams[0].Value = value;
nt iResultado =
SqlHelper.ExecuteNonQuery(trans,CommandType.StoredProcedure,"p_Productos_EliminarProducto",sqlParams);

In other words, now I´m passing an one sqlParameter element array instead of
declaring a SqlParameter with New operator and the application works. As I´ve
said before, I don´t know exactly what´s the difference in order to execute
they in a remoting enviroment. If you have any idea, let me know.

thanks a lot.


"Ken Kolda" wrote:

> So it's only ExecuteNonReader() that's failing? That's really strange. Is
> the query you're executing doing something different than your other
> queries, e.g. using a linked server? If you executed the exact same query
> using ExecuteScalar(), would you get the same error?
>
> Ken
>
>
> "otto" <otto@discussions.microsoft.com> wrote in message
> news:C7479A6A-1660-44DF-96AD-B24B4B7D7FDB@microsoft.com...
> > Hi, Ken:
> > I think that´s not the problem, because I can use ExecuteReader or
> > ExecuteScalar methods, so I think there´s no relation between the sql
> > database and the remoting configuration. I can work with SQL Server tools
> > (enterprise manager, analyzer...) without problems. If you have more ideas
> I
> > will wait for they ;)
> > Thanks a lot for your time and help.
> >
> > Cheers
> >
> > "Ken Kolda" wrote:
> >
> > > Don't know if this will help, but I know we ran into some problems with
> > > self-signed certificates and SQL Server which may be affecting you
> (since
> > > you said you're using IIS).
> > >
> > > http://support.microsoft.com/default.aspx?scid=kb;EN...
> > >
> > > Hope that helps -
> > > Ken
> > >
> > >
> > > "otto" <otto@discussions.microsoft.com> wrote in message
> > > news:D045E6FE-C20E-4248-8653-4F21D2CDFDBD@microsoft.com...
> > > > Hi, all:
> > > > I´m having problems with a .net remoting application. The problem is
> as
> > > > follows: I have a windows forms application that connects to a .net
> > > remoting
> > > > components hosted in an IIS (in a separate server). This remoting
> > > component
> > > > is a data access component, in other words, it performs data access
> tasks.
> > > > The problem arise when I try to execute a database task which involves
> the
> > > > use of ExecuteNonQuery method (like delete a product, for example).
> When I
> > > do
> > > > this, this error appears: "Unable to write data to the transport
> > > connection.
> > > > The connection has finished: Could not establish a secure channel for
> > > > SSL/TSL." This is very strange, but I can confirm that the error
> raises
> > > when
> > > > executing that method. Does anyone know what is the reason for this?
> Is
> > > there
> > > > any relation between these elements? I´m using an Http channel and
> > > Microsoft
> > > > Data Access Application Block for database operations.
> > > > Any help would be appreciated.
> > > >
> > > > Thanks a lot.
> > >
> > >
> > >
>
>
>