473,396 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

C# Zip

Has anybody develop RFC1950 and RFC1951 compliant Zip utility?

Any pointer will be appreciated.

Jul 19 '05 #1
10 8807
"Aung" <aung@aungkyawmoe_NOSPAM_.net> wrote in message
news:ej*************@TK2MSFTNGP09.phx.gbl...
Has anybody develop RFC1950 and RFC1951 compliant Zip utility?
Any pointer will be appreciated.


http://www.icsharpcode.net/OpenSource/SharpZipLib/

Regards,
Pieter Philippaerts
Managed SSL/TLS: http://www.mentalis.org/go.php?sl
Jul 19 '05 #2
If you're looking for a full-featured one, please check out Xceed Zip
for .NET:

http://www.xceedsoft.com/products/zipnet

Alex

On Mon, 25 Aug 2003 04:32:40 +0700, "Aung"
<aung@aungkyawmoe_NOSPAM_.net> wrote:
Has anybody develop RFC1950 and RFC1951 compliant Zip utility?

Any pointer will be appreciated.


--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and SmartUI controls

Email: xL*******@xceedsoft.com (remove the first 'x')
Jul 19 '05 #3
Hi,

We're not selling vaporware, Pete. The features are already
implemented, tested, and ready to use today.

Its easy to say something is expensive until you realize how much time
you spend trying to DIY. Xceed caters to developers that want
reliable, tested code that is well documented... so they can save
their time. After all, time is money. That's what the value of the
product is.

With Xceed Zip for .NET, you'll get complete documentation, lots of
samples, free tech support (try calling up the makers of the alternate
solution you talk of and see if they'll stop what they are doing to
help you until your problem is fixed), a web site with a knowledge
base, online forums dedicated to the product, new versions and updates
on a regular basis, and of couse, dozens upon dozens of features that
only we do and nobody else does... not to mention the fact that these
days we include all our other non-visual components and libraries in
the price of the component as well...

That's why we are developing an FTP library for .NET (plenty of free
solutions for that... How many actually work well and are full
featured?) and also why we made a Grid for .NET (why not just use the
included datagrid with Visual Studio .NET?!)

Take care,
Odi

On Wed, 27 Aug 2003 00:14:08 +0100, "Pete" <pv*****@gawab.com> wrote:
Hi,

AlexL [Xceed] wrote:
If you're looking for a full-featured one, please check out Xceed Zip
for .NET:

http://www.xceedsoft.com/products/zipnet


That's pretty damn expensive for a component that only does zip based
compression. The sharpziplib link posted before does other formats too and
is open source (extra features probably wouldn't be that difficult to
add/request -- someone on the team might even add them for you for less than
that xceed thing costs).

Pete


--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET grid and SmartUI controls

Email: xL*******@xceedsoft.com (remove the first 'x')
Jul 19 '05 #4
Joe
Whoa, Odi, be careful man! I think Microsoft owns the copyright on the
entire email you just wrote.

-- Joe
"Odi [Xceed]" <Ko*******@xceedsoft.com> wrote in message
news:r5********************************@4ax.com...
Hi,

We're not selling vaporware, Pete. The features are already
implemented, tested, and ready to use today.

Its easy to say something is expensive until you realize how much time
you spend trying to DIY. Xceed caters to developers that want
reliable, tested code that is well documented... so they can save
their time. After all, time is money. That's what the value of the
product is.

With Xceed Zip for .NET, you'll get complete documentation, lots of
samples, free tech support (try calling up the makers of the alternate
solution you talk of and see if they'll stop what they are doing to
help you until your problem is fixed), a web site with a knowledge
base, online forums dedicated to the product, new versions and updates
on a regular basis, and of couse, dozens upon dozens of features that
only we do and nobody else does... not to mention the fact that these
days we include all our other non-visual components and libraries in
the price of the component as well...

That's why we are developing an FTP library for .NET (plenty of free
solutions for that... How many actually work well and are full
featured?) and also why we made a Grid for .NET (why not just use the
included datagrid with Visual Studio .NET?!)

Take care,
Odi

Jul 19 '05 #5
Hello,

I am having a problem with WebRequest class. I used the following code to
post some data to a page and retrive back the response. It works fine with
http:// connection. When i use that with https:// connection, it thrown an
exception "The underlying connection was closed: Could not establish trust
relationship with remote server.". I am using self sign certificate on the
web server and the root and CA certificates are installed on the client
machine using the following code.

your suggestions will be great appreciated.

Aung

public string postForm(string url, string postData)

{

string retStr="", tempStr;

HttpWebResponse result = null;

try

{

HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url);

req.Method = "POST";

req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)";

req.ContentType = "application/x-www-form-urlencoded";

StringBuilder UrlEncoded = new StringBuilder();

Char[] reserved = {'?', '=', '&'};

byte[] SomeBytes = null;

if (postData != null)

{

int i=0, j;

while(i<postData.Length)

{

j=postData.IndexOfAny(reserved, i);

if (j==-1)

{

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i,
postData.Length-i)));

break;

}

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i, j-i)));

UrlEncoded.Append(postData.Substring(j,1));

i = j+1;

}

SomeBytes = Encoding.UTF8.GetBytes(UrlEncoded.ToString());

req.ContentLength = SomeBytes.Length;

Stream newStream = req.GetRequestStream();

newStream.Write(SomeBytes, 0, SomeBytes.Length);

newStream.Close();

}

else

{

req.ContentLength = 0;

}

result = (HttpWebResponse) req.GetResponse();

Stream ReceiveStream = result.GetResponseStream();

Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

StreamReader sr = new StreamReader( ReceiveStream, encode );

Char[] read = new Char[256];

int count = sr.Read( read, 0, 256 );

while (count > 0)

{

tempStr = new String(read, 0, count);

retStr += tempStr;

count = sr.Read(read, 0, 256);

}

retStr.Trim();

}

catch (Exception e)

{

retStr = "Error!!";

}

finally

{

if ( result != null )

{

result.Close();

}

}

return retStr;

}

Jul 19 '05 #6
Best way to test your client is see if you can do the same from IE. Most of
the System.Net classes take configuration from IE behind the scenes. If it
doesn't work in IE and you do get it working, make sure to close all
instances of IE so the data persists before re-running the .NET application.
Some changes are considered dynamic and won't be written to the registry
until close.

Hopefully you find that IE won't connect either. I find it hard to believe
that .NET would have a more stringent implementation of SSL than IE. But it
is possible.

--
Justin Rogers
DigiTec Web Consultants, LLC.

"Aung" <aung@aungkyawmoe_NOSPAM_.net> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
Hello,

I am having a problem with WebRequest class. I used the following code to
post some data to a page and retrive back the response. It works fine with
http:// connection. When i use that with https:// connection, it thrown an
exception "The underlying connection was closed: Could not establish trust
relationship with remote server.". I am using self sign certificate on the
web server and the root and CA certificates are installed on the client
machine using the following code.

your suggestions will be great appreciated.

Aung

public string postForm(string url, string postData)

{

string retStr="", tempStr;

HttpWebResponse result = null;

try

{

HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url);

req.Method = "POST";

req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)";

req.ContentType = "application/x-www-form-urlencoded";

StringBuilder UrlEncoded = new StringBuilder();

Char[] reserved = {'?', '=', '&'};

byte[] SomeBytes = null;

if (postData != null)

{

int i=0, j;

while(i<postData.Length)

{

j=postData.IndexOfAny(reserved, i);

if (j==-1)

{

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i,
postData.Length-i)));

break;

}

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i, j-i)));

UrlEncoded.Append(postData.Substring(j,1));

i = j+1;

}

SomeBytes = Encoding.UTF8.GetBytes(UrlEncoded.ToString());

req.ContentLength = SomeBytes.Length;

Stream newStream = req.GetRequestStream();

newStream.Write(SomeBytes, 0, SomeBytes.Length);

newStream.Close();

}

else

{

req.ContentLength = 0;

}

result = (HttpWebResponse) req.GetResponse();

Stream ReceiveStream = result.GetResponseStream();

Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

StreamReader sr = new StreamReader( ReceiveStream, encode );

Char[] read = new Char[256];

int count = sr.Read( read, 0, 256 );

while (count > 0)

{

tempStr = new String(read, 0, count);

retStr += tempStr;

count = sr.Read(read, 0, 256);

}

retStr.Trim();

}

catch (Exception e)

{

retStr = "Error!!";

}

finally

{

if ( result != null )

{

result.Close();

}

}

return retStr;

}

Jul 19 '05 #7
A thing that I have found that can help is to implement a class based on
ICertificatePolicy that handles the CheckValidationResult method. If you
set an instance of your class to the ServicePointManager.CertificatePolicy
property, you can override the behavior of certificate handling errors.
Returning true will cause the system to ignore all errors, which is
sometimes helpful for testing (but a bad a idea for production code).

HTH,

Joe K.

"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Best way to test your client is see if you can do the same from IE. Most of the System.Net classes take configuration from IE behind the scenes. If it doesn't work in IE and you do get it working, make sure to close all
instances of IE so the data persists before re-running the .NET application. Some changes are considered dynamic and won't be written to the registry
until close.

Hopefully you find that IE won't connect either. I find it hard to believe that .NET would have a more stringent implementation of SSL than IE. But it is possible.

--
Justin Rogers
DigiTec Web Consultants, LLC.

"Aung" <aung@aungkyawmoe_NOSPAM_.net> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
Hello,

I am having a problem with WebRequest class. I used the following code to post some data to a page and retrive back the response. It works fine with http:// connection. When i use that with https:// connection, it thrown an exception "The underlying connection was closed: Could not establish trust relationship with remote server.". I am using self sign certificate on the web server and the root and CA certificates are installed on the client
machine using the following code.

your suggestions will be great appreciated.

Aung

public string postForm(string url, string postData)

{

string retStr="", tempStr;

HttpWebResponse result = null;

try

{

HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url);

req.Method = "POST";

req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET

CLR
1.0.3705)";

req.ContentType = "application/x-www-form-urlencoded";

StringBuilder UrlEncoded = new StringBuilder();

Char[] reserved = {'?', '=', '&'};

byte[] SomeBytes = null;

if (postData != null)

{

int i=0, j;

while(i<postData.Length)

{

j=postData.IndexOfAny(reserved, i);

if (j==-1)

{

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i,
postData.Length-i)));

break;

}

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i, j-i)));

UrlEncoded.Append(postData.Substring(j,1));

i = j+1;

}

SomeBytes = Encoding.UTF8.GetBytes(UrlEncoded.ToString());

req.ContentLength = SomeBytes.Length;

Stream newStream = req.GetRequestStream();

newStream.Write(SomeBytes, 0, SomeBytes.Length);

newStream.Close();

}

else

{

req.ContentLength = 0;

}

result = (HttpWebResponse) req.GetResponse();

Stream ReceiveStream = result.GetResponseStream();

Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

StreamReader sr = new StreamReader( ReceiveStream, encode );

Char[] read = new Char[256];

int count = sr.Read( read, 0, 256 );

while (count > 0)

{

tempStr = new String(read, 0, count);

retStr += tempStr;

count = sr.Read(read, 0, 256);

}

retStr.Trim();

}

catch (Exception e)

{

retStr = "Error!!";

}

finally

{

if ( result != null )

{

result.Close();

}

}

return retStr;

}


Jul 19 '05 #8
Egads!! BAD cross-poster - BAD!!

Anyhow, yes - this is exactly what the problem is. You can't programatically
specify a trust list (at least I haven't run across a way) - so even if you
log in with that account, and add the certificate authority -
programatically - it will still not trust that CA.

The ONLY way I've seen this or been able to get this to work (because I
needed to do the same thing) - is you have to get real certificates, like
from Verisign or Thawte..
"Aung" <aung@aungkyawmoe_NOSPAM_.net> wrote in message
news:u7**************@TK2MSFTNGP11.phx.gbl...
Yes. i used IE before calling from my application. IE popup with a warning
message telling me that "certificate on the server is not the same name bla bla. " and when i hit OK, i can view the SSL page with form.

my .NET application cannot.
"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:#8**************@TK2MSFTNGP12.phx.gbl...
Best way to test your client is see if you can do the same from IE. Most
of
the System.Net classes take configuration from IE behind the scenes. If it
doesn't work in IE and you do get it working, make sure to close all
instances of IE so the data persists before re-running the .NET

application.
Some changes are considered dynamic and won't be written to the registry
until close.

Hopefully you find that IE won't connect either. I find it hard to

believe
that .NET would have a more stringent implementation of SSL than IE. But it
is possible.

--
Justin Rogers
DigiTec Web Consultants, LLC.

"Aung" <aung@aungkyawmoe_NOSPAM_.net> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
Hello,

I am having a problem with WebRequest class. I used the following code
to post some data to a page and retrive back the response. It works fine with http:// connection. When i use that with https:// connection, it thrown an
exception "The underlying connection was closed: Could not establish trust relationship with remote server.". I am using self sign certificate on the web server and the root and CA certificates are installed on the

client machine using the following code.

your suggestions will be great appreciated.

Aung

public string postForm(string url, string postData)

{

string retStr="", tempStr;

HttpWebResponse result = null;

try

{

HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url);

req.Method = "POST";

req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;

..NET CLR
1.0.3705)";

req.ContentType = "application/x-www-form-urlencoded";

StringBuilder UrlEncoded = new StringBuilder();

Char[] reserved = {'?', '=', '&'};

byte[] SomeBytes = null;

if (postData != null)

{

int i=0, j;

while(i<postData.Length)

{

j=postData.IndexOfAny(reserved, i);

if (j==-1)

{

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i,
postData.Length-i)));

break;

}

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i, j-i)));

UrlEncoded.Append(postData.Substring(j,1));

i = j+1;

}

SomeBytes = Encoding.UTF8.GetBytes(UrlEncoded.ToString());

req.ContentLength = SomeBytes.Length;

Stream newStream = req.GetRequestStream();

newStream.Write(SomeBytes, 0, SomeBytes.Length);

newStream.Close();

}

else

{

req.ContentLength = 0;

}

result = (HttpWebResponse) req.GetResponse();

Stream ReceiveStream = result.GetResponseStream();

Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

StreamReader sr = new StreamReader( ReceiveStream, encode );

Char[] read = new Char[256];

int count = sr.Read( read, 0, 256 );

while (count > 0)

{

tempStr = new String(read, 0, count);

retStr += tempStr;

count = sr.Read(read, 0, 256);

}

retStr.Trim();

}

catch (Exception e)

{

retStr = "Error!!";

}

finally

{

if ( result != null )

{

result.Close();

}

}

return retStr;

}



Jul 19 '05 #9
I was having the same issue using a MS Certificate Server . If you are using
you
own certificate authority to issue the certificate the problem lies in the
fact
that your client computer does not trust the issuing certificate authority.
Read
the section "Install Your Certification Authority's Certificate on the
Client"
from http://support.microsoft.com/default...b;en-us;324284 IE gives
you
the option to accept this discrepancy, but .net does not.

Tim Cartwright //Will write code for food
"Drebin" <tR*************@hotmail.com> wrote in message
news:ZI*****************@newssvr31.news.prodigy.co m...
Egads!! BAD cross-poster - BAD!!

Anyhow, yes - this is exactly what the problem is. You can't programatically specify a trust list (at least I haven't run across a way) - so even if you log in with that account, and add the certificate authority -
programatically - it will still not trust that CA.

The ONLY way I've seen this or been able to get this to work (because I
needed to do the same thing) - is you have to get real certificates, like
from Verisign or Thawte..
"Aung" <aung@aungkyawmoe_NOSPAM_.net> wrote in message
news:u7**************@TK2MSFTNGP11.phx.gbl...
Yes. i used IE before calling from my application. IE popup with a warning
message telling me that "certificate on the server is not the same name

bla
bla. " and when i hit OK, i can view the SSL page with form.

my .NET application cannot.
"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:#8**************@TK2MSFTNGP12.phx.gbl...
Best way to test your client is see if you can do the same from IE. Most
of
the System.Net classes take configuration from IE behind the scenes. If it
doesn't work in IE and you do get it working, make sure to close all
instances of IE so the data persists before re-running the .NET

application.
Some changes are considered dynamic and won't be written to the
registry until close.

Hopefully you find that IE won't connect either. I find it hard to

believe
that .NET would have a more stringent implementation of SSL than IE.

But
it
is possible.

--
Justin Rogers
DigiTec Web Consultants, LLC.

"Aung" <aung@aungkyawmoe_NOSPAM_.net> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
> Hello,
>
> I am having a problem with WebRequest class. I used the following code to
> post some data to a page and retrive back the response. It works
fine with
> http:// connection. When i use that with https:// connection, it thrown
an
> exception "The underlying connection was closed: Could not establish

trust
> relationship with remote server.". I am using self sign certificate

on the
> web server and the root and CA certificates are installed on the

client > machine using the following code.
>
> your suggestions will be great appreciated.
>
> Aung
>
> public string postForm(string url, string postData)
>
> {
>
> string retStr="", tempStr;
>
> HttpWebResponse result = null;
>
> try
>
> {
>
> HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url);
>
> req.Method = "POST";
>
> req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
> 1.0.3705)";
>
> req.ContentType = "application/x-www-form-urlencoded";
>
> StringBuilder UrlEncoded = new StringBuilder();
>
> Char[] reserved = {'?', '=', '&'};
>
> byte[] SomeBytes = null;
>
> if (postData != null)
>
> {
>
> int i=0, j;
>
> while(i<postData.Length)
>
> {
>
> j=postData.IndexOfAny(reserved, i);
>
> if (j==-1)
>
> {
>
> UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i,
> postData.Length-i)));
>
> break;
>
> }
>
> UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i,

j-i))); >
> UrlEncoded.Append(postData.Substring(j,1));
>
> i = j+1;
>
> }
>
> SomeBytes = Encoding.UTF8.GetBytes(UrlEncoded.ToString());
>
> req.ContentLength = SomeBytes.Length;
>
> Stream newStream = req.GetRequestStream();
>
> newStream.Write(SomeBytes, 0, SomeBytes.Length);
>
> newStream.Close();
>
> }
>
> else
>
> {
>
> req.ContentLength = 0;
>
> }
>
> result = (HttpWebResponse) req.GetResponse();
>
> Stream ReceiveStream = result.GetResponseStream();
>
> Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
>
> StreamReader sr = new StreamReader( ReceiveStream, encode );
>
> Char[] read = new Char[256];
>
> int count = sr.Read( read, 0, 256 );
>
> while (count > 0)
>
> {
>
> tempStr = new String(read, 0, count);
>
> retStr += tempStr;
>
> count = sr.Read(read, 0, 256);
>
> }
>
> retStr.Trim();
>
> }
>
> catch (Exception e)
>
> {
>
> retStr = "Error!!";
>
> }
>
> finally
>
> {
>
> if ( result != null )
>
> {
>
> result.Close();
>
> }
>
> }
>
> return retStr;
>
> }
>
>
>



Jul 19 '05 #10
I was trying to do that a few months ago and I still need it.
I didn't resolve the problem, I have my own certificates.
May you show what you did?

Thanks,
Gustavo.
"Joe Kaplan (MVP - ADSI)" <jo*************@removethis.accenture.com> wrote
in message news:eI**************@TK2MSFTNGP09.phx.gbl...
A thing that I have found that can help is to implement a class based on
ICertificatePolicy that handles the CheckValidationResult method. If you
set an instance of your class to the ServicePointManager.CertificatePolicy
property, you can override the behavior of certificate handling errors.
Returning true will cause the system to ignore all errors, which is
sometimes helpful for testing (but a bad a idea for production code).

HTH,

Joe K.

"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Best way to test your client is see if you can do the same from IE. Most
of
the System.Net classes take configuration from IE behind the scenes. If it
doesn't work in IE and you do get it working, make sure to close all
instances of IE so the data persists before re-running the .NET

application.
Some changes are considered dynamic and won't be written to the registry
until close.

Hopefully you find that IE won't connect either. I find it hard to

believe
that .NET would have a more stringent implementation of SSL than IE. But it
is possible.

--
Justin Rogers
DigiTec Web Consultants, LLC.

"Aung" <aung@aungkyawmoe_NOSPAM_.net> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
Hello,

I am having a problem with WebRequest class. I used the following code
to post some data to a page and retrive back the response. It works fine with http:// connection. When i use that with https:// connection, it thrown an
exception "The underlying connection was closed: Could not establish trust relationship with remote server.". I am using self sign certificate on the web server and the root and CA certificates are installed on the

client machine using the following code.

your suggestions will be great appreciated.

Aung

public string postForm(string url, string postData)

{

string retStr="", tempStr;

HttpWebResponse result = null;

try

{

HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url);

req.Method = "POST";

req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;

..NET CLR
1.0.3705)";

req.ContentType = "application/x-www-form-urlencoded";

StringBuilder UrlEncoded = new StringBuilder();

Char[] reserved = {'?', '=', '&'};

byte[] SomeBytes = null;

if (postData != null)

{

int i=0, j;

while(i<postData.Length)

{

j=postData.IndexOfAny(reserved, i);

if (j==-1)

{

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i,
postData.Length-i)));

break;

}

UrlEncoded.Append(HttpUtility.UrlEncode(postData.S ubstring(i, j-i)));

UrlEncoded.Append(postData.Substring(j,1));

i = j+1;

}

SomeBytes = Encoding.UTF8.GetBytes(UrlEncoded.ToString());

req.ContentLength = SomeBytes.Length;

Stream newStream = req.GetRequestStream();

newStream.Write(SomeBytes, 0, SomeBytes.Length);

newStream.Close();

}

else

{

req.ContentLength = 0;

}

result = (HttpWebResponse) req.GetResponse();

Stream ReceiveStream = result.GetResponseStream();

Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

StreamReader sr = new StreamReader( ReceiveStream, encode );

Char[] read = new Char[256];

int count = sr.Read( read, 0, 256 );

while (count > 0)

{

tempStr = new String(read, 0, count);

retStr += tempStr;

count = sr.Read(read, 0, 256);

}

retStr.Trim();

}

catch (Exception e)

{

retStr = "Error!!";

}

finally

{

if ( result != null )

{

result.Close();

}

}

return retStr;

}



Jul 21 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.