Getting prompted for password accessing page through script even when client and server are in same

Posted by Munawar on Server Fault See other posts from Server Fault or by Munawar
Published on 2010-05-14T19:00:37Z Indexed on 2010/05/14 19:04 UTC
Read the original article Hit count: 287

Filed under:
|
|

I'm trying to pull up an internal webpage in automated fashion using the methods in 'Internetexplorer.Application' using vbscript. But I'm getting prompted for password, although the client and the server both are in the same domain. Predictably when I manually try to access the web page, I don't have any problem. Only when I try using cscript.exe or iexplore.exe, I get prompted. I'm trying to automate some of the smoke test we do after a new build is deployed. But this password prompt is getting in the way.

Following are the system specs

Client machine - IE 7.0, OS is Windows server 2003 Server machine - Windows Server 2008 Both are in the same domain.

So far I've unsuccessfully tried following to automate the password input

  1. system.diagnostics.process.start

  2. var WinHttpReq = new ActiveXObject("WinHttp.WinHttpRequest.5.1");

WinHttpReq.Open("GET", "http://website", false);

WinHttpReq.SetCredentials("username", "password", 0);

Nothing seems to work

I checked in IIS. we have only anonymous and forms authentication enabled

Is there any configuration setting in the client machine that can be tweaked to bypass this, although I'd hate to do it since you step on the toes of twenty people trying to do that. Preferable way would be to programmatically input it if its possible.

Also, if you can suggest a more appropriate forum, that'd be great too.

Please help.

© Server Fault or respective owner

Related posts about network

Related posts about iis