Wednesday, September 28, 2005

The request failed with HTTP status 401: Unauthorized "System.Net.WebException: The request failed with HTTP status 401: Unauthorized".

The request failed with HTTP status 401: Unauthorized
"System.Net.WebException: The request failed with HTTP
status 401: Unauthorized".

If you use an authentication on your webservice like
Integrated Windows Authentication, you may have
to pre-authenticate before using your webservice:

WebService.webClass myWC= new WebService.webClass();

myWC.PreAuthenticate = true;

myWC.Credentials = System.Net.CredentialCache.DefaultCredentials;

posted on Friday, January 30, 2004 8:37 AM on "Heybo Blog"
http://heybo.com/weblog/posts/245.aspx

Tuesday, September 20, 2005

Convert ArrayList into Array

example:
ArrayList myArray = new ArrayList();
--- somewhere in your code you populate your array
--- then...
int[] myIntArray = (int[])myArray.ToArray(typeof(int));

provided by luiz ( thanks mate )

Thursday, September 15, 2005

Run IE trough batch job...

Dim wshShell
set wshShell = WScript.CreateObject("WScript.Shell")

wshShell.Run "cmd.exe /c ""title StartIE & runas.exe /user:virtual\bsz ""%ProgramFiles%\Internet Explorer\IEXPLORE.EXE"""""

wscript.Sleep(1000)
wshShell.AppActivate "StartIE"
wshShell.SendKeys "I'm2Happy" & "{ENTER}"

Monday, September 12, 2005

Regular Expression Email Check

Function ValidateEmail(Expression)
Dim objRegExp
Set objRegExp = New RegExp
objRegExp.Pattern = "^[\w\.-]+@[\w\.-]+\.[a-zA-Z]+$"
ValidateEmail = objRegExp.Test(Expression)
End Function

Shared Cache - .Net Caching made easy

All information about Shared Cache is available here: http://www.sharedcache.com/. Its free and easy to use, we provide all sources at codeplex.

Facebook Badge