Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Monday, August 18, 2008

Facebook programming with ASP3


Programming an application for facebook usualy done with php, java and .net!

what about asp programmers?

As i started to develop and asp application and downloaded a class that implement the api of facebook, i decided to share it here and start a project to improve this class (this is not full class and not all funciton worked).

please help me and all asp programmers to build this class so we all can use it.




thanks

Sunday, January 28, 2007

Change master web server in interdev Project

if you want to start using another web server for your asp projects which you created in interdev 6.0 then you need to change the master web that you set when you created the project.
to do that you should do those steps:
1. release your working copy:
right click on your project-> release working copy
2. on the upper toolbar (File Edit View...) choose Project -> Web Project -> Copy Web Application ... -> set the new server name and the directory you want to creat the project in, un check the Add to existing Web Project and the press OK.
3. now create a new project, in the 2nd stem, choose to use an existeing remote directory!

have a nice programming!

Tuesday, January 16, 2007

How to recognize google visit

do you want to know if this visit is a google visit??
here is a simple asp code to do that:
< % robot=request.ServerVariables("HTTP_USER_AGENT") if (Instr(robot,"Googlebot")<>0) then
...
end if
% >

and this is how to do it with php script

< ? define("SYSTEM_FROM_NAME","Your name"); define("SYSTEM_FROM_EMAIL","Your email"); //---this script will send email to webmaster when google visit your pages. if(isset($_SERVER['HTTP_USER_AGENT']) && eregi("googlebot",$_SERVER['HTTP_USER_AGENT'])) { if ($QUERY_STRING != "") { $url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].'?'.$QUERY_STRING; } else { $url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; } $today = date("F j, Y, g:i a"); $headers = "From: ".SYSTEM_FROM_NAME." <".SYSTEM_FROM_EMAIL.">";
$message="";
$message.="Googlebot is crawling your site:\n";
$message.="Page: $url\n";
$message.="Date: $today \n";
$message.="IP: ".$_SERVER['REMOTE_ADDR']." \n";
mail(SYSTEM_FROM_EMAIL, "googlebot crawle - $url", "$message",$headers);}
? >

Thursday, August 10, 2006

message could not be dilevered to all servers

this error recieved when the email address of the reciever is not legal email address, for example starting with number, or like this format xx@hot..com, or start or have an illegal character like ' ! ?

Friday, July 14, 2006

SELECT random records from a database

asp script:
randomize
sql="select max (ID) as maxid from table"rs.open sql,cn
max=rs("maxid")
rs.close

for i=0 to 100
rndNum=int(rnd()*max)+1
idstr=idstr&rndNum&","
next
idstr=idstr+"0"

sql="select top 25 ID, * from table where ID in ("+idstr+")"
rs.open sql,cn



<% randomize sql="select max (ID) as maxid from table" rs.open sql,cn max=rs("maxid") rs.close for i=0 to 100 rndNum=int(rnd()*max)+1 idstr=idstr&rndNum&"," next idstr=idstr+"0" sql="select top 25 ID, * from table where ID in ("+idstr+")" rs.open sql,cn %>

Sunday, July 02, 2006

asp smartupload subscript out of range

you are using smart upload for uploading a file to the server and you get this ugly erro message "asp smartupload subscript out of range" and i'm sure that you didn't write the uploading script.. well, i spent one whole day with this error, and a got angry when i knew that it's a stupid mistake. just look at the html form the the data sent from, you shoud set the enctype to multipart/form-data

that's all!!

Tuesday, May 09, 2006

Active Server Pages error ''ASP 0131'' , Disallowed Parent Path , indicate the parent directory

have got a technical problem. Can you explain me the followingstatement, please:
Active Server Pages error ''ASP 0131''
Disallowed Parent Path
/knowledgebase/admin/index.asp, line 1
The Include file ''../ScriptLibrary/incPureUpload.asp'' cannot contain ''..''
toindicate the parent directory.
answer: The problem you described is related to configuration of your web server. In order to avoid this problem please do the following
1. Go to your IIS Manager
2. Right click your web site
3. Choose Properties >
4. Select Home Directory Tab
5. Click ‘Configuration’ button
6. Select App Options Tab
7. Check the Enable Parent Paths
8. Click OK and your new configuration will be saved.
This problem occures specially on new Windows 2003 Server systems as the default setting is not to use parent paths.
Note: Another simple solution is to put your upload script page in your site root. This way it won't need to use parent paths to the ScriptLibrary folder.