Active Server Page (ASP) FAQ

zhaozj2021-02-12  130

Active Server Page (ASP) FAQ ["ASP" below "ASP"]

Q: How to save the authentication user to the session variable (new) Q: ServerVariables ("logon_user") auto value (new) Q: ServerVariables ("remote_host") Remove IP instead of Hostname (new) Q: CDO version Summary introduction Q: What is the ADSI? Q: What is adspath? Q: How to get LDAP root ds entry? Q: How do I detect the properties of the browser? Q: How do I make good use of Response.Buffer to enhance the browsing speed? Q: How do I use Meta Tag to increase file properties? Q: Is Server.Transfer and response.Redirect? Q: Server.execute and #include are different? Q: How do you use AsperRor object? Q: How do you let the Internet Explorer browser not cache? Q: How to set ASP LOCALE IDs according to browser language? Q: How do I use ASP / ADO Query ODBC Datasource? Q: How do I use the Active Server Pages program to prevent the browser to turn on a part of FRAMESET? Q: How do I use ASP to make analog dynamic growth form (FORM)? Q: How do I use ASP to use ADO to call SQL Stored Procedure? Q: Is it possible to put an option explicit? Option expenented eXPLICITRESPONSE.EXPIRES = 0? How to set the length of Session Timeout in the ASP program? Q: What happens if the user does not accept cookies? Q: How do you set ASP Cache? Q: When using Proxy Server, WebPage returns an "object move" error, how do you modify the ASP program to solve this problem? Q: When does the ASP Script Engine Cache can help run the efficiency? Q: Use the .fileCopy method of On FileSystemObject, get the following error message, how should you handle? Microsoft Vbscript Runtime Error '800A0046' Permission Denied Q: How to Design a Page You can prompt for each login user prompt to welcome the words? Welcome Q: Is it possible to read and parse a file in other site without additional other components? Q: The following error messages will happen when Access's own web site, how to deal with? HTTP / 1.1 500 Server Error -2146646015 (0x800cc801) Q: Why is IIS's online file index tab does not include all chapters? Q: Why can't I search on the PWS or NT Workstation version of IIS? Q: Why do an anonymous users can't enter the web site when the Disable automatic password is synchronized? ask:

What are the versions of ASP 1.0? Q: What is the reason for the following error? Microsoft VBScript Compilation Error '800A0414'cannot Use Parens When Calling a Sub / Test / Test.asp, Line 17myobj.Movefile (FName, Sfolder, TFolder) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------- ^ Q: How do you force Session to close? Q: What is the following error? How to solve? Error 'ASP 0115' Unexpected Error / Disney / Main.aspa Trappable Error Occurred In An External Object. The Script Cannot Continue Running. Q: Why happens "HTTP HEADERS ALREADY WRITTEN" error? Q: How do Server-Side components written in Microsoft Visual C ? Q: When updating the file in the wwwroot directory, you must restart the web server to see these files are updated, whether it is caused by caching. problem? Q: How do Internet Information Server (IIS) knows that the .asp file is passed to Microsoft Active Server Pages (ASP)? Why is a strange error when using the CreateObject access component? Q: How do you set Microsoft Internet Information Server (IIS) to make the preset page as a default.asp file? Q: When a .asp file is placed on the web server, you can see the entire .asp program code when you read this .asp file, what is wrong? Q: What job system supports executing ASP? Q: Can I call a subscriber or function from another ASP program from an ASP program? Q: Can I access variables in another ASP program from an ASP program? Q: Is VBScript executed after response.Redirect? Q: Is VBScript executed after response.end execution? Q: What is the cause of error messages? Response object error 'ASP 0156' Header Error / intranet_devel / scripts / CheckLog.asp, line 14The HTTP headers are already written to the clientbrowser Any HTTP header modifications must be made before writing page content Q: Are Session variables can be used in web FARM? Q: What is the cause of error message? 'ASP 0113'

The max amount of time for a script to execute wasexceed, you can change this limit by specifying anew value for the property server Script Time outor by changing the value for Script Time out Q: What reason would generate an error message as follows? Microsoft OLE DB Provider for ODBC Drivers Error '80004005' [Microsoft] [ODBC SQL Server Driver] [DBNMPNTW] ConnectionOpen (CreateFile ()). Q: What is the error message? Server object error 'ASP 0177: 80040112'Server.CreateObject Failed [Filename], line [line number] The call to Server.CreateObject failed The requested object instance can not be created Q: What reason would generate an error message as follows? Microsoft VBScript Runtime Error '800A000D'Type misatch Q: What is the cause of error messages? Error ASP 0115 Unexpected Error.Trappable Error Occured In An External Object, The Script Cannot Continue Running. Q: What is the cause of the error message? Server object error 'ASP 177: 800401f3'Server.CreateObject Failed / aspsamp / tutorial / lessons / Finance.asp, line 52The call to Server.CreateObject failed The requested object instance can not be created Q: What is the reason will generate an error message as follows ? Server object error 'ASP 0177: 80040154' Server.createobject failed / advworks / equipment / equip.asp, line 2The call to server.createobject failed The requeted object instance can not be created Q: Since the lifetime of the cookie occurs only in the current IE session, if I end IE and restart IE, then cookies will disappear, how should I control cookies? Q: How to learn the screen resolution by the Client side?

Q: How to store authentication users to session variables (New): <% if session ("logon_user") = "" "Logon_user") = "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Response.EndElse Session ( "LOGON_USER") = Request.ServerVariables ( "LOGON_USER") 'the following lines strip out an NT domain from the user name If InStr (Session ( "LOGON_USER"), "/") then Session ( "LOGON_USER ") = Right (SESSION_USER"), LEN (Session ("Logon_user") - INSTR (SESSION ("Logon_user"), "/")) End IFend IFEnd IF%> Q: ServerVariables ("Logon_user") Retrieve Null Value (New) A: If the ASP page uses "Allow anonymous access", "logon_user" Variable will return to the null value. If you want to display correctly, set the authentication mode to basic verification or integrate Windows authentication. Q: ServerVariables ("transote_host") returned to IP instead of hostname (new) A: In the preset, ServerVariables ("remote_host") passed back IP, which is a designed consideration, in order to enhance IIS performance, but You can still do query with DNS by modifying metabase, calling with DNS. See KB Q245574 in detail. Q: CDO version summary introduction:

Library source file name ProgIDCDO 1.0Exchange 4.0Mdlsp.dllMdlsp32.dllMAPICDO 1.1Exchange 5.0OleMsg.dllOleMsg32.dllMAPICDO 1.2Exchange 5.5Outlook 98Outlook 2000Exchange 2000Cdo.dll MAPICDO for NTS 1.2Exchange 5.5IIS 4.0MCISWindows 2000CdoNTS.dll CDONTSCDO for Windows 2000 (CDO 2.0) Windows 2000Cdosys.dllCDOCDO for Exchange 2000 (CDO 3.0) Exchange 2000Cdoex.dllCDOCDO for Exchange Management 1.0Exchange 2000Cdoexm.dllCDOEXMCDO WorkFlow Objects for Microsoft Exchange 1.0Exchange 2000Cdowf.dllCDOWF Q: What ADSI? A: ADSI is a set of interfaces that access different directory services, which will focus on accessing Windows 2000 Active Directory Directory Service. ADSI uses LDAP protocol to communicate with Active Directory. Q: What is ADSPATH? A: When you use the program to access Active Directory, you must provide LDAP Namespace (ProgID) and object's path (ADSPATH). Here are some of the ADSPATH:

ADSI objectADsPathOrganizational unit in the nwtraders domainLDAP: // OU = Sales, DC = nwtraders, DC = msftExchange object on Exchange ServerLDAP: // exch01 / O = Microsoftjsmith user in the Sales OU of the nwtraders domainLDAP: // CN = jsmith, OU = Sales, DC = NWTRADERS, DC = msftcomp1 in the redmond domainwinnt: // redmond / computed: a local user on the computerwinnt: // redmond / comp1 / alice Q: How to get LDAP root ds entry? Answer: All LDAP Directory must have a special content rootdse object, one of the standard properties called DefaultNamingContext. In Windows 2000, he will return to the name of the Active Directory root directory, please see the following example: set root = GetObject ("ldap: // rootdse") DomainPath = root.get ("defaultnamingcontext") set domain = getObject ("ldap: //" & domainpath) Q: How to detect the properties of your browser? A: You can detect many properties of your browser, such as browser names, versions, support cookies, Frames, Tables, Backgroundsounds, VBScript, JavaScript, etc. For example: SET BC = Server.createObject ("mswc.browsertype") if bc.cookies = true kil ... Q: How do I use Response.Buffer to enhance the browsing speed? A: Use response.buffer = true, response.flush can enhance the user's browse speed, if a page response.buffer = false, 30 data transfer, if there is 100 people to browse this page, there are 3000 round-back transmission, serious Influencing efficiency; if response.buffer = true is set at the beginning, the entire page is divided into several groups, and the user experience can be greatly improved in the setting of Response.flush.

Q: How do I use Meta Tag to increase file properties? A: Various hidden information or instructions to be provided to the browser are recorded in Meta Tag, such as This allows the search engine or Web Crawler to read. Q: Is Server.Transfer and response.Redirect? A: Although Server.Transfer and Response.Redire are turned, there is still some difference between the two: Response.Redirect is first sent by the server to the user end, the user is referred to the server, to the server side Turning to another web page, this will increase the user-ended communication time with the server side, while Server.Transfer is directly turning directly to another web page. And because Server.Transfer turns to the webpage before and after, it is still the same application, so the session and Application variable value will be taken to the URL position after the steering, and Response.Redirect is not. Q: Server.execute and #include are different? A: EXECUTE METHOD is a .asp file and execute it, compare the procedure call similar to the general program language; and #include only insert the included program into the principle. Q: How do you use AsperRor object? A: First by set objasperror = server.getlasterror, the error information is obtained by the attribute of the AsperROR object: objasperor.aspcode: Errors generated by IIS ObjaspeRror.Number: Back to COM Standard Errors, such as 0x800A03FCObjasper.Source : Back to the actual generated original code objasperror.category: Indicates the wrong source as ASP, Script or Objectobjasperor.File: Remove the error file name objasperror.line: The number of rows that return the error pattern ObjaspeRor.column: bijaspes The number of columns of the wrong error pattern Objasperror.Description: Remove the error reason Objasperror.aspdescription: Back to detailed error Reason Q: How do you let the Internet Explorer browser not cache? A: In addition to the IIS settings to make Internet Explorer not cache, the following ASP Script can be used to control Cache. The following Script must be executed at HTTP 1.1 Server for Internet Explorer 4.0 or higher.

<% Response.cachecontrol = "no-cache"%> <% response.addheader "pragma", "no-cache"%> <% response.expires = -1%> Q: How to set ASP locale according to browser language versions ID? A: Using the following subscription is based on the user's browser language, dynamically set the ASP application Locale ID (session.lcid).