Monday, April 28, 2008

.Net Http Post

ASCIIEncoding encoding=new ASCIIEncoding();
string postData="txtValue=value";
byte[] data = encoding.GetBytes(postData);

HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create("http://server/Application");
myRequest.Method = "POST";
myRequest.ContentType="application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream=myRequest.GetRequestStream();
// Send the data.
newStream.Write(data,0,data.Length);
newStream.Close();
WebResponse webResponse = myRequest.GetResponse();
StreamReader srData = new StreamReader(webResponse.GetResponseStream());
MessageBox.Show(srData.ReadToEnd());

Wednesday, April 16, 2008

WAMP with SVN

Install wamp from http://www.wampserver.com/ (I installed to c:\wamp)
Install subversion
Edit environment path to include c:\svn\bin
Create a repository directory with mkdir c:\Repository
Create a repository with svnadmin.exe create C:\Repository
copy c:\svn\bin\mod_dav_svn.so to C:\wamp\Apache2\modules
copy c:\svn\bin\mod_authz_svn.so to C:\wamp\Apache2\modules
copy c:\svn\bin\intl3_svn.dll to C:\wamp\Apache2\bin
copy c:\svn\bin\libdb44.dll to C:\wamp\Apache2\bin
edit C:\wamp\Apache2\conf\httpd.conf and find and uncomment the following two lines:
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
Add these two lines directly below the above two:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
At the very end of the file add:

DAV svn
SVNPath “C:\Repository”
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile passwd
Require valid-user

Configure Apache Password File:
C:\wamp\Apache2\bin\htpasswd.exe -c C:\wamp\Apache2\passwd admin
This will prompt for a password.
Restart Apache
Test with svn list http://localhost/svn

Thursday, April 3, 2008

Memo

May 17-18. We have a reservation at the Grande Island Resort in Subic http://www.grandeislandresort.com .

Kasal.com

YugaTech | Philippines, Technology News & Reviews

PEP News