| |
vir_pat98
Posts: 8
Score: 0
Joined: 10/22/2004
From:
Status: offline
|
this is for iis 6 administration. <html> <body> <form action="viral.asp" method="post"> Host name: <br /> <input type="text" name="hname" size="20"><br /> <br /> IP Addres: <br /> <input type="text" name="hip" size="20"><br /> <br /> Port: <br /> <input type="text" name="hport" size="20"><br /> <br /> Site Discription: <br /> <input type="text" name="hdisc" size="20"><br /> <br /> <input type="submit" value="Submit"> <br /> </form> <% dim hname dim hip dim hport dim hdisc1 strComputer = "." Set objWMIService = GetObject _ ("winmgmts:{authenticationLevel=pktPrivacy}\\" _ & strComputer & "\root\microsoftiisv2") Set objWebService = objWMIService.ExecQuery _ ("Select * From IISWebService") arrBindings = Array(0) Set arrBindings(0) = _ objWMIService.Get("ServerBinding").SpawnInstance_() arrBindings(0).IP = Request.Form("hip") arrBindings(0).Port = Request.Form("hport") arrBindings(0).Hostname = Request.Form("hname") hdisc1=cstr(Request.Form("hdisc")) For Each objItem in objWebService objItem.CreateNewSite hdisc1, arrBindings, _ "c:\inetpub\wwwroot" Next Response.Redirect("/confirm.htm") %> </body> </html> after executing this page, when i press refresh, it says "the page cannot be refreshed without resending the information. Click retry to send the information again." and if i click retry, it adds the same entry again in IIS. what i want is, clear the information after sending it once, so that if someone refreshes the page, no info should get sent to the server. Also i also want it to give error if i try to add the same host again.
|
|