Discussion:
Problem using HTTPS with SqlCeReplication object
(too old to reply)
charliewest
2005-03-29 12:23:04 UTC
When declaring and initializing my SqlCeReplication object, i set the first
parameter, an InternetUrl string, to use HTTPS protocol. For example:

SqlCeReplication rep = new SqlCeReplication(
@"https://mydomain/virdir/sscesa20.dll",
@"DOMAIN\user" ,"myPassword",
@"ComputerName",
"DatabaseName",
"PublicationName",
"Account",
@"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; Data Source=\My
Documents\myDB.sdf; SSCE:Database Password = myPassword; SSCE:Encrypt
Database = true;");

When the program attempts to replicate, i get the following error msg:

"Microsoft SQL Server 2000 Windows 2000 Windows CE Edition Error: A request
to send data to the computer running IIS has failed. For more information,
see HRESULT. {''''']"

However, if i run the very same SqlCeReplication object w/out the HTTPS
protocol, that is to say, using standard HTTP, the program runs fine, and the
database synchronizes as it should.

Any ideas?
Darren Shaffer
2005-03-29 14:28:13 UTC
Hey Charlie,

Have you successfully setup SSL on the web site that contains your virtual
directory
(that contains sscesa20.dll)? You'll need to do that to support https
replication.
In IIS, go to Default Web Site, Properties, and select the Directory
Security Tab.
You'll click the Server Certificate button to run the Web Server Cert
wizard.
This is quite a process, and I've helped some other people through it in
this
newsgroup if you want to use google adv search on the group for more info.
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
When declaring and initializing my SqlCeReplication object, i set the first
SqlCeReplication rep = new SqlCeReplication(
@"https://mydomain/virdir/sscesa20.dll",
@"DOMAIN\user" ,"myPassword",
@"ComputerName",
"DatabaseName",
"PublicationName",
"Account",
@"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; Data Source=\My
Documents\myDB.sdf; SSCE:Database Password = myPassword; SSCE:Encrypt
Database = true;");
"Microsoft SQL Server 2000 Windows 2000 Windows CE Edition Error: A request
to send data to the computer running IIS has failed. For more information,
see HRESULT. {''''']"
However, if i run the very same SqlCeReplication object w/out the HTTPS
protocol, that is to say, using standard HTTP, the program runs fine, and the
database synchronizes as it should.
Any ideas?
charliewest
2005-03-29 14:45:03 UTC
SSL/HTTPS is correctly setup on the IIS Server using an official (valid)
certificate and configured t use port 443. BTW, my SQL SERVER CE version is
2.0. As i commented before, only changing the protocol on the internet string
of my SqlCeReplication object causes the program to not work.
Post by Darren Shaffer
Hey Charlie,
Have you successfully setup SSL on the web site that contains your virtual
directory
(that contains sscesa20.dll)? You'll need to do that to support https
replication.
In IIS, go to Default Web Site, Properties, and select the Directory
Security Tab.
You'll click the Server Certificate button to run the Web Server Cert
wizard.
This is quite a process, and I've helped some other people through it in
this
newsgroup if you want to use google adv search on the group for more info.
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
When declaring and initializing my SqlCeReplication object, i set the first
SqlCeReplication rep = new SqlCeReplication(
@"https://mydomain/virdir/sscesa20.dll",
@"DOMAIN\user" ,"myPassword",
@"ComputerName",
"DatabaseName",
"PublicationName",
"Account",
@"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; Data Source=\My
Documents\myDB.sdf; SSCE:Database Password = myPassword; SSCE:Encrypt
Database = true;");
"Microsoft SQL Server 2000 Windows 2000 Windows CE Edition Error: A request
to send data to the computer running IIS has failed. For more information,
see HRESULT. {''''']"
However, if i run the very same SqlCeReplication object w/out the HTTPS
protocol, that is to say, using standard HTTP, the program runs fine, and the
database synchronizes as it should.
Any ideas?
Darren Shaffer
2005-03-29 14:59:17 UTC
ok, was just checking the obvious. on your specific error:
"A request to send data to the computer running IIS has failed. For more
information,
see HRESULT. {''''']" - can you get any of the inner error messages or codes
from this? that would help a great deal because you'll get the message
above
for a wide variety of reasons (e.g. when you have no snapshot created, when
the anonymous account for IIS has no permissions on the pub, etc).
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
SSL/HTTPS is correctly setup on the IIS Server using an official (valid)
certificate and configured t use port 443. BTW, my SQL SERVER CE version is
2.0. As i commented before, only changing the protocol on the internet string
of my SqlCeReplication object causes the program to not work.
Post by Darren Shaffer
Hey Charlie,
Have you successfully setup SSL on the web site that contains your virtual
directory
(that contains sscesa20.dll)? You'll need to do that to support https
replication.
In IIS, go to Default Web Site, Properties, and select the Directory
Security Tab.
You'll click the Server Certificate button to run the Web Server Cert
wizard.
This is quite a process, and I've helped some other people through it in
this
newsgroup if you want to use google adv search on the group for more info.
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
When declaring and initializing my SqlCeReplication object, i set the first
SqlCeReplication rep = new SqlCeReplication(
@"https://mydomain/virdir/sscesa20.dll",
@"DOMAIN\user" ,"myPassword",
@"ComputerName",
"DatabaseName",
"PublicationName",
"Account",
@"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; Data Source=\My
Documents\myDB.sdf; SSCE:Database Password = myPassword; SSCE:Encrypt
Database = true;");
"Microsoft SQL Server 2000 Windows 2000 Windows CE Edition Error: A request
to send data to the computer running IIS has failed. For more information,
see HRESULT. {''''']"
However, if i run the very same SqlCeReplication object w/out the HTTPS
protocol, that is to say, using standard HTTP, the program runs fine,
and
the
database synchronizes as it should.
Any ideas?
charliewest
2005-03-29 15:43:03 UTC
The only additional info i can get (using debugging) is:

- System.SystemException {"SqlCeException"} System.SystemException
+ System.Exception {"SqlCeException" } System.Exception
- Errors {System.Data.SqlServerCe.SqlCeErrorCollection} System.Data.SqlServerCe.SqlCeErrorCollection
System.Object {System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
Count 1 int
Item <cannot view indexed property> System.Data.SqlServerCe.SqlCeError
+ items {Count=1} System.Collections.ArrayList
OLEDB 0 int
RDA_OR_REPL 1 int
System.Collections.ICollection.IsSynchronized false bool
+ System.Collections.ICollection.SyncRoot {System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
- errors {System.Data.SqlServerCe.SqlCeErrorCollection} System.Data.SqlServerCe.SqlCeErrorCollection
System.Object {System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
Count 1 int
Item <cannot view indexed property> System.Data.SqlServerCe.SqlCeError
+ items {Count=1} System.Collections.ArrayList
OLEDB 0 int
RDA_OR_REPL 1 int
System.Collections.ICollection.IsSynchronized false bool
+ System.Collections.ICollection.SyncRoot {System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
HResult -2147012851 int
Message "A request to send data to the computer running IIS has failed. For
more information, see HRESULT. [,,,,,]" string
NativeError 28037 int
Source "Microsoft SQL Server 2000 Windows CE Edition" string

Again, what is very strainge is that when i use HTTP it all works fine? I
can access the virtual directory via the browser on my PPC, enter the
requested credentials, etc...
Post by Darren Shaffer
"A request to send data to the computer running IIS has failed. For more
information,
see HRESULT. {''''']" - can you get any of the inner error messages or codes
from this? that would help a great deal because you'll get the message
above
for a wide variety of reasons (e.g. when you have no snapshot created, when
the anonymous account for IIS has no permissions on the pub, etc).
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
SSL/HTTPS is correctly setup on the IIS Server using an official (valid)
certificate and configured t use port 443. BTW, my SQL SERVER CE version is
2.0. As i commented before, only changing the protocol on the internet string
of my SqlCeReplication object causes the program to not work.
Post by Darren Shaffer
Hey Charlie,
Have you successfully setup SSL on the web site that contains your virtual
directory
(that contains sscesa20.dll)? You'll need to do that to support https
replication.
In IIS, go to Default Web Site, Properties, and select the Directory
Security Tab.
You'll click the Server Certificate button to run the Web Server Cert
wizard.
This is quite a process, and I've helped some other people through it in
this
newsgroup if you want to use google adv search on the group for more info.
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
When declaring and initializing my SqlCeReplication object, i set the first
SqlCeReplication rep = new SqlCeReplication(
@"https://mydomain/virdir/sscesa20.dll",
@"DOMAIN\user" ,"myPassword",
@"ComputerName",
"DatabaseName",
"PublicationName",
"Account",
@"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; Data Source=\My
Documents\myDB.sdf; SSCE:Database Password = myPassword; SSCE:Encrypt
Database = true;");
"Microsoft SQL Server 2000 Windows 2000 Windows CE Edition Error: A request
to send data to the computer running IIS has failed. For more information,
see HRESULT. {''''']"
However, if i run the very same SqlCeReplication object w/out the HTTPS
protocol, that is to say, using standard HTTP, the program runs fine,
and
the
database synchronizes as it should.
Any ideas?
Darren Shaffer
2005-03-29 15:51:21 UTC
Charlie - this may be your issue:
http://support.microsoft.com/default.aspx?scid=kb;en-us;290208
--
Darren Shaffer
Principal Architect
Connected Innovation
- System.SystemException {"SqlCeException"} System.SystemException
+ System.Exception {"SqlCeException" } System.Exception
- Errors {System.Data.SqlServerCe.SqlCeErrorCollection}
System.Data.SqlServerCe.SqlCeErrorCollection
System.Object {System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
Count 1 int
Item <cannot view indexed property> System.Data.SqlServerCe.SqlCeError
+ items {Count=1} System.Collections.ArrayList
OLEDB 0 int
RDA_OR_REPL 1 int
System.Collections.ICollection.IsSynchronized false bool
+ System.Collections.ICollection.SyncRoot
{System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
- errors {System.Data.SqlServerCe.SqlCeErrorCollection}
System.Data.SqlServerCe.SqlCeErrorCollection
System.Object {System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
Count 1 int
Item <cannot view indexed property> System.Data.SqlServerCe.SqlCeError
+ items {Count=1} System.Collections.ArrayList
OLEDB 0 int
RDA_OR_REPL 1 int
System.Collections.ICollection.IsSynchronized false bool
+ System.Collections.ICollection.SyncRoot
{System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
HResult -2147012851 int
Message "A request to send data to the computer running IIS has failed.
For
more information, see HRESULT. [,,,,,]" string
NativeError 28037 int
Source "Microsoft SQL Server 2000 Windows CE Edition" string
Again, what is very strainge is that when i use HTTP it all works fine? I
can access the virtual directory via the browser on my PPC, enter the
requested credentials, etc...
Post by Darren Shaffer
"A request to send data to the computer running IIS has failed. For more
information,
see HRESULT. {''''']" - can you get any of the inner error messages or codes
from this? that would help a great deal because you'll get the message
above
for a wide variety of reasons (e.g. when you have no snapshot created, when
the anonymous account for IIS has no permissions on the pub, etc).
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
SSL/HTTPS is correctly setup on the IIS Server using an official (valid)
certificate and configured t use port 443. BTW, my SQL SERVER CE
version
is
2.0. As i commented before, only changing the protocol on the internet string
of my SqlCeReplication object causes the program to not work.
Post by Darren Shaffer
Hey Charlie,
Have you successfully setup SSL on the web site that contains your virtual
directory
(that contains sscesa20.dll)? You'll need to do that to support https
replication.
In IIS, go to Default Web Site, Properties, and select the Directory
Security Tab.
You'll click the Server Certificate button to run the Web Server Cert
wizard.
This is quite a process, and I've helped some other people through it in
this
newsgroup if you want to use google adv search on the group for more info.
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
When declaring and initializing my SqlCeReplication object, i set
the
first
SqlCeReplication rep = new SqlCeReplication(
@"https://mydomain/virdir/sscesa20.dll",
@"DOMAIN\user" ,"myPassword",
@"ComputerName",
"DatabaseName",
"PublicationName",
"Account",
@"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; Data Source=\My
Documents\myDB.sdf; SSCE:Database Password = myPassword;
SSCE:Encrypt
Database = true;");
"Microsoft SQL Server 2000 Windows 2000 Windows CE Edition Error: A request
to send data to the computer running IIS has failed. For more information,
see HRESULT. {''''']"
However, if i run the very same SqlCeReplication object w/out the HTTPS
protocol, that is to say, using standard HTTP, the program runs fine,
and
the
database synchronizes as it should.
Any ideas?
charliewest
2005-03-29 16:17:07 UTC
I don't believe this is my problem. I am running Windows Mobile 2003, and
have no problems viewing Verisign Secured Websites using my Pocket IE.
Reading the link you provided, it also states the highencryption pack is for
Pocket PC 2002 or earlier, as it should not be installed on Windows Mobile
2003.
Post by Darren Shaffer
http://support.microsoft.com/default.aspx?scid=kb;en-us;290208
--
Darren Shaffer
Principal Architect
Connected Innovation
- System.SystemException {"SqlCeException"} System.SystemException
+ System.Exception {"SqlCeException" } System.Exception
- Errors {System.Data.SqlServerCe.SqlCeErrorCollection}
System.Data.SqlServerCe.SqlCeErrorCollection
System.Object {System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
Count 1 int
Item <cannot view indexed property> System.Data.SqlServerCe.SqlCeError
+ items {Count=1} System.Collections.ArrayList
OLEDB 0 int
RDA_OR_REPL 1 int
System.Collections.ICollection.IsSynchronized false bool
+ System.Collections.ICollection.SyncRoot
{System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
- errors {System.Data.SqlServerCe.SqlCeErrorCollection}
System.Data.SqlServerCe.SqlCeErrorCollection
System.Object {System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
Count 1 int
Item <cannot view indexed property> System.Data.SqlServerCe.SqlCeError
+ items {Count=1} System.Collections.ArrayList
OLEDB 0 int
RDA_OR_REPL 1 int
System.Collections.ICollection.IsSynchronized false bool
+ System.Collections.ICollection.SyncRoot
{System.Data.SqlServerCe.SqlCeErrorCollection} System.Object
HResult -2147012851 int
Message "A request to send data to the computer running IIS has failed.
For
more information, see HRESULT. [,,,,,]" string
NativeError 28037 int
Source "Microsoft SQL Server 2000 Windows CE Edition" string
Again, what is very strainge is that when i use HTTP it all works fine? I
can access the virtual directory via the browser on my PPC, enter the
requested credentials, etc...
Post by Darren Shaffer
"A request to send data to the computer running IIS has failed. For more
information,
see HRESULT. {''''']" - can you get any of the inner error messages or codes
from this? that would help a great deal because you'll get the message
above
for a wide variety of reasons (e.g. when you have no snapshot created, when
the anonymous account for IIS has no permissions on the pub, etc).
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
SSL/HTTPS is correctly setup on the IIS Server using an official (valid)
certificate and configured t use port 443. BTW, my SQL SERVER CE
version
is
2.0. As i commented before, only changing the protocol on the internet string
of my SqlCeReplication object causes the program to not work.
Post by Darren Shaffer
Hey Charlie,
Have you successfully setup SSL on the web site that contains your virtual
directory
(that contains sscesa20.dll)? You'll need to do that to support https
replication.
In IIS, go to Default Web Site, Properties, and select the Directory
Security Tab.
You'll click the Server Certificate button to run the Web Server Cert
wizard.
This is quite a process, and I've helped some other people through it in
this
newsgroup if you want to use google adv search on the group for more info.
--
Darren Shaffer
Principal Architect
Connected Innovation
Post by charliewest
When declaring and initializing my SqlCeReplication object, i set
the
first
SqlCeReplication rep = new SqlCeReplication(
@"https://mydomain/virdir/sscesa20.dll",
@"DOMAIN\user" ,"myPassword",
@"ComputerName",
"DatabaseName",
"PublicationName",
"Account",
@"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; Data Source=\My
Documents\myDB.sdf; SSCE:Database Password = myPassword; SSCE:Encrypt
Database = true;");
"Microsoft SQL Server 2000 Windows 2000 Windows CE Edition Error: A request
to send data to the computer running IIS has failed. For more information,
see HRESULT. {''''']"
However, if i run the very same SqlCeReplication object w/out the HTTPS
protocol, that is to say, using standard HTTP, the program runs fine,
and
the
database synchronizes as it should.
Any ideas?
axlboy
2005-03-31 12:09:42 UTC
I have the same problem, this problem is in communication using HTTPS
protocol, because u need to accept certificate manualy,

i dont know how to use this, the only thing i found is

ICertificatePolicy
it is working with normal WebRequest but not with SqlCeReplication .......
charliewest
2005-03-31 14:07:05 UTC
In theory, however, you only need to manually accept the certificate if it
has expired, is not verified, etc.... For example, if you are using a trial
version of a server certificate, this would require manual acceptance... a
valid certificate should be seamless.
Post by axlboy
I have the same problem, this problem is in communication using HTTPS
protocol, because u need to accept certificate manualy,
i dont know how to use this, the only thing i found is
ICertificatePolicy
it is working with normal WebRequest but not with SqlCeReplication .......
d
2007-08-15 19:10:17 UTC
In my case, I have a proxy server with SSL but I don't have SSL on my web
server which is behind the firewall. Proxy server automatically transfers
the request to web server on different (secure) port when some hit the proxy
with SSL (HTTPS). I created virtual directory on web server without SSL
under secure port.
So internally I can access the site through
http://webserver:port/myvirtualdir/sqlcesa30.dll but from outside I have to
use
https://proxy/myvirtualdir/sqlcesa30.dll

I am getting following error.
"A request to send data to the computer running IIS has failed. For more
information, see HRESULT."

If I create virtual directory under unsecured port (80) then application
works fine. For unsecured web proxy server doesn't use SSL and automatically
transfer request to web server under unsecured port (80).

I really appreciate if can guide me.

Thanks in advance

D
b***@gmail.com
2007-08-16 01:27:53 UTC
Post by Darren Shaffer
"A request to send data to the computer running IIS has failed. For more
information, see HRESULT."
Use the following codes to get a more detailed error:

try
{
.....

}
catch (SqlCeException exp)
{
ShowErrors(exp);
}

----------------------------------------------------------------------------------------------

public static void ShowErrors(SqlCeException e)
{
SqlCeErrorCollection errorCollection = e.Errors;

StringBuilder bld = new StringBuilder();
Exception inner = e.InnerException;

if (null != inner)
{
MessageBox.Show("Inner Exception: " +
inner.ToString());
}
// Enumerate the errors to a message box.
foreach (SqlCeError err in errorCollection)
{
bld.Append("\n Error Code: " +
err.HResult.ToString("X"));
bld.Append("\n Message : " + err.Message);
bld.Append("\n Minor Err.: " + err.NativeError);
bld.Append("\n Source : " + err.Source);

// Enumerate each numeric parameter for the error.
foreach (int numPar in err.NumericErrorParameters)
{
if (0 != numPar) bld.Append("\n Num. Par. : " +
numPar);
}

// Enumerate each string parameter for the error.
foreach (string errPar in err.ErrorParameters)
{
if (String.Empty != errPar) bld.Append("\n Err.
Par. : " + errPar);
}

MessageBox.Show(bld.ToString());
bld.Remove(0, bld.Length);
}
}

---------------------------------------------------------------------------------------------
Error codes can be found here (Last post):
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=350214&SiteID=1
susmitha
2008-02-03 18:08:06 UTC
hey Charlie,
i know it was long before you had this problem, but would like to know the
way you resolved this problem? i am in the same situation you were in,
totally stuck.
thank you
susmitha

url:http://www.ureader.com/msg/114053.aspx