仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1894|回复: 20
打印 上一主题 下一主题

[学习教程] ASP网站制作之Running An ASP Script As A Windows N...

[复制链接]
飘飘悠悠 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-2-3 23:38:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
当然了,现在国内CRM厂商的产品与其说是CRM,但从至少从我的角度分析上来看,充其量只是一个大型的进销存而已了,了解尚浅,不够胆详评,这里只提技术问题window   SUMMARY

This tutorial will guide you through the steps of setting up and configuring a Windows NT Server or Workstation to execute an ASP script as a service. This will let you execute an ASP script without a user being logged on to the server, thus allowing you to use the ASP technology as a tool for automatic file processing or similar.

REQUIREMENTS

For this setup to work, the server must have the following software installed:


An ASP compliant web server. For instance, Microsoft Internet Information Server (IIS) version 3.0 or higher.
A webbrowser. For instance, Microsoft Internet Explorer.
The Windows NT Ressource Kit or at least the ServAny/InstSrv utilities available separately.
When doing all the following, you must be logged on as Administrator.

THE SCRIPT

The ASP script you want to run as a service should be written as plain ASP as you would normally do. Although, in case you want the script to "loop", you should make sure, that you output the appropriate HTML to initiate a reload of the script. This should look something like this:

   <%
       [ Perform whatever task you need ]
   %>

   <html>
   <head>
   <meta http-equiv="refresh" content="60; url=myScript.asp">
   </head>
   <body>
   ...
   </body>
   </html>

Generally, you would not generate any output, as the script will run in the background, not having anything to present to a user.

The HTML above assumes that the name of the script is myScript.asp and will reload the script (execute it) every 60 seconds.

Copy the script file to your webserver so it is accessible within the webserver namespace. From now on, I assume that you put it in the webserver root directory, so it is accessible via

http://localhost/myScript.asp

Eventually, test it using the webbrowser to make sure everything works as planned.

INSTALLING THE SERVICE

Setting up the service is pretty straight-forward if you follow the guideline provided with the NT Ressource Kit. Anyway, the following will guide you through just the nessecary steps.

We need the following files from the NT Ressource Kit:

   instsrv.exe        Utility to install Windows NT services
   srvany.exe         A service that will run any application

Although its optional, I recommend putting both files in your System32 directory. Now, start up a command prompt and execute this:

   instsrv myAspService srvany.exe

A new service named "myAspService" is now available through the Control Panel -> Services applet. Of course, you can provide any name you like.

CONFIGURING THE SERVICE

Now we need to configure the newly installed service to actually execute the script. As seen above, we need some host application to make the HTTP request - namely a webbrowser. In other words, we need to configure the service to execute the webbrowser with the appropriate URL as a parameter.

To configure the service, first open the Services applet in Control Panel. Locate the new service, double-click it, and make sure it is set to "Automatic" startup. Close the Control Panel applet.

Start up the registry editor (either regedit.exe or regedt32.exe).

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Locate the name of your new service. Under this key, create a new key called "Parameters".

Under this new key, create the following two value/data pairs, both of type String/REG_SZ.

Value name:   Application
Data:         c:\Program Files\Plus!\Microsoft Internet\iexplore.exe

Value name:   AppParameters
Data:         http://localhost/myScript.asp

Of course, you must do any appropriate changes to paths and names in order to fit your system setup and installations paths.

Close the registry editor.

TESTING THE SERVICE

To test the entire setup, reboot the server. Afterwards, go to Control Panel -> Services and verify, that the service is running. Th</p>  当然了,现在国内CRM厂商的产品与其说是CRM,但从至少从我的角度分析上来看,充其量只是一个大型的进销存而已了,了解尚浅,不够胆详评,这里只提技术问题
灵魂腐蚀 该用户已被删除
沙发
发表于 2015-2-4 04:40:46 | 只看该作者
ASP.Net和ASP的最大区别在于编程思维的转换,而不仅仅在于功能的增强。ASP使用VBS/JS这样的脚本语言混合html来编程,而那些脚本语言属于弱类型、面向结构的编程语言,而非面向对象,这就明显产生以下几个问题:
海妖 该用户已被删除
板凳
发表于 2015-2-8 03:55:54 | 只看该作者
如何学好ASP,以前也有人问过,把回答给你转过来看看能否对你有帮助:
再见西城 该用户已被删除
地板
发表于 2015-2-8 07:56:37 | 只看该作者
以HTML语言整合(HTML负责界面上,ASP则负责功能上)形成一个B/S(浏览器/服务器)模式的网页程序。
简单生活 该用户已被删除
5#
发表于 2015-2-11 09:12:28 | 只看该作者
弱类型造成潜在的出错可能:尽管弱数据类型的编程语言使用起来回方便一些,但相对于它所造成的出错几率是远远得不偿失的。
第二个灵魂 该用户已被删除
6#
发表于 2015-2-16 08:39:29 | 只看该作者
Response:从字面上讲是“响应”,因此这个是服务端向客户端发送东西的,例如Response.Write
深爱那片海 该用户已被删除
7#
发表于 2015-3-1 20:32:39 | 只看该作者
你可以通过继承已有的对象最大限度保护你以前的投资。并且C#和C++、Java一样提供了完善的调试/纠错体系。
金色的骷髅 该用户已被删除
8#
发表于 2015-3-4 03:26:19 | 只看该作者
尽管MS自己讲C#内核中更多的象VC,但实际上我还是认为它和Java更象一些吧。首先它是面向对象的编程语言,而不是一种脚本,所以它具有面向对象编程语言的一切特性,比如封装性、继承性、多态性等等,这就解决了刚才谈到的ASP的那些弱点。
冷月葬花魂 该用户已被删除
9#
发表于 2015-3-11 15:46:49 | 只看该作者
还有如何才能在最短的时间内学完?我每天可以有效学习2小时,双休日4小时。
飘飘悠悠 该用户已被删除
10#
 楼主| 发表于 2015-3-17 23:11:21 | 只看该作者
以上是语言本身的弱点,在功能方面ASP同样存在问题,第一是功能太弱,一些底层操作只能通过组件来完成,在这点上是远远比不上PHP/JSP,其次就是缺乏完善的纠错/调试功能,这点上ASP/PHP/JSP差不多。
蒙在股里 该用户已被删除
11#
发表于 2015-3-25 06:33:06 | 只看该作者
另外因为asp需要使用组件,所以了解一点组件的知识(ADODB也是组件)
老尸 该用户已被删除
12#
发表于 2015-3-26 00:30:08 | 只看该作者
哪些内置对象是可以跳过的,或者哪些属性和方法是用不到的?
再现理想 该用户已被删除
13#
发表于 2015-4-1 00:10:32 | 只看该作者
ASP也是这几种脚本语言中最简单易学的开发语言。但ASP也是这几种语言中唯一的一个不能很好支持跨平台的语言。  因为ASP脚本语言非常简单,因此其代码也简单易懂,结合HTML代码,可快速地完成网站的应用程序。
小妖女 该用户已被删除
14#
发表于 2015-4-6 06:43:02 | 只看该作者
从事这个行业,那么你可以学ASP语言,简单快速上手,熟练dreamweav排版,写asp代码,熟练photoshop处理图片,打好基础就行了
因胸联盟 该用户已被删除
15#
发表于 2015-4-11 21:40:13 | 只看该作者
掌握asp的特性而且一定要知道为什么。
谁可相欹 该用户已被删除
16#
发表于 2015-4-12 17:50:43 | 只看该作者
不是很难但是英文要有一点基础网上的教程很少有系统的详细的去买书吧,另不用专门学习vb关于vbscript脚本在asp教材都有介绍
小女巫 该用户已被删除
17#
发表于 2015-4-14 16:15:38 | 只看该作者
ASP(ActiveServerPages)是Microsfot公司1996年11月推出的WEB应用程序开发技术,它既不是一种程序语言,也不是一种开发工具,而是一种技术框架,不须使用微软的产品就能编写它的代码,能产生和执行动态、交互式、高效率的站占服务器的应用程序。
精灵巫婆 该用户已被删除
18#
发表于 2015-4-23 19:26:09 | 只看该作者
弱类型造成潜在的出错可能:尽管弱数据类型的编程语言使用起来回方便一些,但相对于它所造成的出错几率是远远得不偿失的。
若天明 该用户已被删除
19#
发表于 2015-4-25 03:48:27 | 只看该作者
代码的可重用性差:由于是面向结构的编程方式,并且混合html,所以可能页面原型修改一点,整个程序都需要修改,更别提代码重用了。
愤怒的大鸟 该用户已被删除
20#
发表于 2015-4-26 18:09:38 | 只看该作者
ASP的语言不仅仅只是命令格式差不多,而是包含在<%%>之内的命令完全就是VB语法。虽然ASP也是做为单独的一个技术来提出的,但他就是完全继承了VB所有的功能。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-5-5 17:54

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表