|
Roger Wright wrote:
Of course, if you're wealthy enough to have VS.Net in your toolbox, you may as well jump head first into ASP.Net.
Forget wealth, you can go over to http://www.asp.net for ASP.NET Web Matrix - it's a superb ASP.NET dev. env. and best of all FREE
|
|
|
|
|
Hi, in internet explorer, when we use google to search an item many time, it record the text string that we just previously type to search the information. Does anybody know how to delete that text string in the autocomplete list. I try to delete the history, temporary file... but it is not working. please help me.
|
|
|
|
|
in IE you can:
AUTOCOMPLETE="OFF" inside each field you wish to turn off or just inside your form to turn it all off
Cheers
How do I print my voice mail?
|
|
|
|
|
If you just want to delete a single entry in the drop-downlist, just select the item whith your arrow keys and press Del .
Wout Louwers
|
|
|
|
|
I have a vb script I want to call by pressing a button. The code I have is:
|
Sub version
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "versions.vbs"
Set WshShell = Nothing
End Sub
|
when I press the button nothing happens. It calls a script to that joins the computer name to a Windows domain. Any ideas?
|
|
|
|
|
Hi,
I'm 99% sure that this wont work. WScript.Shell can not be run from a web page delivered over the net (you should get "Automation server can't create object" error). You can use it, however, if the page is loaded locally. This is to say, if the page was a .htm file loaded on a local drive, e.g. c:\example\domain.htm. (Athough you will get a dialog prompting you that an Unsafe ActiveX object needs to be loaded - this is because the WScript COM object does not implement the IObjectSafety interface required by IE)
This did used to work but I think since securty patches have been applied to IE this is no longer the case. For obvious reason seen as though WScript could be used for malicious purposes.
Hope this helps,
Andy
|
|
|
|
|
Hello, i've recently started building my first php based website, when suddenly i noticed something strange. The whole point of php being secure evolves around the idea that its a server side scripting language right? Well.. I was clicking through my site, lots of php pages, then i went to the xmb-forum part of my site, and i clicked on logout, and suddenly, it gives me a download window for downloading index.php!!! It didn't hit me untill about 10 seconds later when i had already dismissed the dialog. If i had downloaded it, would i have seen the source? Because this is kind of disturbing, i mean, obviously it only happens like one time in a thousand or something, it seems to be some weird bug, maybe due to the server i'm using? I still don't see how it could mess up like that... If someone could mimic the situation, they could view every php source they wanted. I also want to state that i had this happen before, but then it was usually due to the site being made improperly and it always gave u the download for the php page, but this time was when i pressed logout on xmb forum so.. i tried again but all was fine. Does anyone have any clue as to why it might do this?
Kuniva
--------------------------------------------
|
|
|
|
|
Update Apache
Also make sure your files end in PHP not INC, PHP3, etc..
Actually make sure your web server recognizes PHP as a server side script. Then make sure your files are all PHP in extension.
Why it's only prompting you to download every so often, probably becuz IE is caching your request/result.
If it happens once and then not again, try deleting your temp internet files and accessing that page again, it should prompt you to download your script. If this is the case, then it's your server that setup wrong.
Cheers
How do I print my voice mail?
|
|
|
|
|
Hi
I try to restrict access to some pages..
I don't want to use username/password text Input controls,,
instead I want to display the basic authentication dialog but i face a problem reading the username/password that the user inputs :
Response.Clear
Response.Write Request.ServerVariables("AUTH_USER")
if Request.ServerVariables("AUTH_USER")<>"ABC" and Request.ServerVariables("AUTH_PASSWORD")<>"123" then
Response.AddHeader "WWW-Authenticate","basic"
Response.Status="401"
Response.End
else
Response.Write "user=" & Request.ServerVariables("AUTH_USER") & vbCrLf
Response.Write "PWD=" & Request.ServerVariables("AUTH_PASSWORD")
end if
the dialog shows up and i input data but seems that the checking for AUTH_USER and AUTH_PASSWORD is wrong..
please help me with this.
I use IIS 5.0 and basic authentication is enabled.
|
|
|
|
|
Request.ServerVariables("AUTH_USER") will have domain name in front of it. i.e. the value should be "<<your domain="">>\ABC"
//Start of joke
Never comment ur code. If it was hard to write, it should be hard to understand !!!
//End of joke
|
|
|
|
|
Bee Master wrote:
Request.ServerVariables("AUTH_USER") will have domain name in front of it. i.e. the value should be "<<your domain="">>\ABC"
I think this goes for NT authentication,
any way i changes the condition to :
if len(Request.ServerVariables("AUTH_PASSWORD"))>0 then
Response.Write "user=" & Request.ServerVariables("AUTH_USER") & vbCrLf
Response.Write "PWD=" & Request.ServerVariables("auth_type")
else
Response.AddHeader "WWW-Authenticate","basic"
Response.Status="401"
Response.End
end if
but still does not work !!!
|
|
|
|
|
Don't forget that the AUTH_PASSWORD and AUTH_USER variables are going to be Base64 Encoded. You will need to unencode them to be able to test them against a value- .Net has some classes in the Texting namespace that should do the trick.
I also notice that you are setting just the Status property. Try setting the StatusCode property and StatusDescription seperatly.
ie. Response.StatusCode = 401; Response.StatusDescription="Unauthorized
"
|
|
|
|
|
Also, I think the header needs to have a realm.
WWW-Authenticate: Basic realm="WallyWorld"
http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html#WWW-Authenticate
Gives more details.
|
|
|
|
|
thank you..
but encoding is sill a coming problem
even if I check for the length of the AUTH_PASSWORD server variable i get 0 !!!
|
|
|
|
|
Hi,
AUTH_USER and AUTH_PASSWORD are populated by IIS if it requested the authentication itself.
You need to check the HTTP_AUTHORIZATION variable. This will be Base64 encoded and will encompass both the username and password. See the specification I posted earlier to figure out how it is put together.
|
|
|
|
|
HTTP_AUTHORIZATION is the answer !!
thanks alot
now the next step is to decode the Base64 encoded string..
wish me luck
|
|
|
|
|
.Net provides a class to do that for you.
Try looking under System.Text
|
|
|
|
|
yes
i know it already exists in .net but i can't use .net for this project.
so i'll have to do it myself
|
|
|
|
|
http://www.freevbcode.com/ShowCode.asp?ID=5248
This should do the trick.
|
|
|
|
|
again (5)
i was going to code it myself .. now i'll reuse the code
many thanks.
|
|
|
|
|
and need not an activex.
the small,the better..
I just found Battleaxe forum,but it is not open now...
thanks.
|
|
|
|
|
There is a PHP port of these message boards, but IMHO they suck a*s...the author uses every bad technique in PHP possible
However you can use it as a template and start from there...
Threaded message boards are not easy...probably the most difficult PHP script I ever wrote...requires crazy recurssion (my design did anyways) and other rocket science type stuff... jk...it's not that bad...
Other than CP I have never seen any nice looking threaded forums...always linear(???)...I imagine becuz it's more efficient, but not as easy on the eyes
How do I print my voice mail?
|
|
|
|
|
You can get the code for the Code Project forums right here.
regards,
Paul Watson
Bluegrass
South Africa
Chris Maunder wrote:
"I'd rather cover myself in honey and lie on an ant's nest than commit myself to it publicly."
Jon Sagara replied:
"I think we've all been in that situation before."
Crikey! ain't life grand?
|
|
|
|
|
I'll hold my hand up now and say ASP is not my strong point, and I'm struggling to get my head around arrays in ASP. I'm currently trying to build a content management system which will allow people to add content to a hierachial structure.
In the database their is a sectionpath stored for each entry which shows the relationship to other items within the table, therefore the string returned could look like this: 0.1.17.30
What I then do is split the string and place in an array and build the a number of select menus as I loop through the array - in this instance 3, which will be labelled section0, section1, section2.
Obviously the sectionpath is different each time and the only way I could think to read the variables passed would be to parse the contents of the Request.Form collection in to a 2d array giving the fieldname and fieldvalue.
My problem is how do I loop through this 2d array and check whether a section has a null value??? Sorry if that was a bit long winded.
Code:
For ix = 1 to Request.Form.Count
fieldName = Request.Form.Key(ix)
fieldValue = Request.Form.Item(ix)
FormArray = Split(fieldValue, ", ", 1) ' split these and place in an array
FormArray = Split(fieldName, ", ", 2)
Next
|
|
|
|
|
A.vb
Class A
{
new class a()
{
// code to print "hello" on the browser
}
}
webform1.aspx.vb
onpageload()
{
dim myobj as new a();
}
what do i neet to write in the class at //?
|
|
|
|