Click here to Skip to main content
15,844,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I run the following script on local its just run fine. But when I am trying to run it on server it's giving access denied error.

set http = CreateObject("MSXML2.ServerXMLHTTP.6.0")
http.setTimeouts 5000, 5000, 10000, 3720000 "GET", "", FALSE 
http.send ""
WScript.Echo http.responseText

What I have tried:

I Google it but not found correct solution
Updated 22-May-16 23:23pm
Mehdi Gholam 23-May-16 2:20am    
The user account you are running it from does not have permission to CreateObject().
Telstra 23-May-16 2:31am    
Could u please help with that What will be the action set for this.

1 solution

The error is pretty explicit: "Access denied".
If you tried to go through a door and a sign said that, what you you assume? That you didn't have permission to enter the room, yes?
That's what you are being told by the computer: the yous (as a user) does not have permission to create things in that location, on that server.
You either need a user with higher authority, or to get the authority requirements changed to accommodate you.
We can't do either of those - so talk to the admins and discuss the problem.
Share this answer
Telstra 23-May-16 3:07am    
I have added myself as a user with the full control on that server. Still Showing the error with pop up.

line 4: char:1 Error: Login request was denied.
Source: MSXML6.dll

OriginalGriff 23-May-16 3:58am    
"Login request was denied."
is a different message to
"Access denied"
Because it's a different error, with a different meaning, and a different cause!
Login denied simply means you got the user / password combination wrong, you are trying to log into the wrong server, or you didn't supply any login credentials!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900