IIS 7.5, Classic ASP and Access database

I've been scouring the web(and pulling out my hair) for two days, and finally solve my problem, and finally get it to work. I thought I'll share it with people out there who is still pulling their hair.

Ok. so I have some classic ASP pages that i want to migrate from IIS5 running windows 2000 to the coolest dandiest server OS from Microsoft. Here is the catch.... I've got some ASP pages that are still pulling out data from access database written in access 2000, and 2003. All of which are 32 bit version.

First thing first.

  1. MAKE SURE you configure your IIS right. You need to install a specific set of rules to enable classic ASP support. Read it Here.
  2. I don't know about you, but I want my classic ASP to have its own Application Pool, separated from all my .NET stuff. So I created an application pool for all of my classic ASP page(of course you can create more than one if you want). This is what you need when you create an application pool(if you don't know how to create application pool using IIS7, google it up).

    Name:
     Whatever you want.(I call mine Classic ASP)
    .NET Framework version: No Managed Code
    Managed pipeline mode: Classic.

    After you are done. Go to advanced setting of your Application Pool, and make sure the identity is set to ApplicationPoolIdentity. This is the default behavior for 2008 R2, but from my experience this past several days, I saw screen shot that is set to something else.

    If you've been researching, you'll find out that a lot of people out there ask you to set the Enable 32-Bit Applications to True for you to enable the Jet Engine or the ODBC to interact with Access Database. In my experience, this is NOT necessary. I'm not saying that they are wrong.

  3. If your ASP pages is on a virtual directory(subdirectory within your root, NOT on your root directory), go ahead and convert that virtual directory to application(right click convert), AND select the application pool you just created in step 2 above.
  4. This is the most important thing. CREATE A HANDLER MAPPING for your *.asp page. I've read a lot of people complaining about getting 404 or 500 error because they did not set this up right. Double click on the virtual directory you just converted to application on step 3 above, and click handler Mappings. You need to add a SCRIPT MAP.

    This is where it gets tricky, and I do not find this mentioned anywhere but this blog, which I found really helpful. You need to decide first whether you want to run your ASP in 32 BIT or 64 BIT. A lot of posters out there tell you to enable 32 BIT setting in your application pool, but they did not tell you how to change the ASP handler to use the 32BIT version of the handler's executable. I repeat, you do NOT need to set your application pool to enable 32bit.

    Add a script map using the following setting:

    Request Path: *.asp
    Executable: C:\Windows\system32\inetsrv\asp.dll
    Name: whatever you want. I named my Classic ASP

    The executable above is 64 BIT ASP handler for your asp script. If you want your ASP script to be handled in 32 bit environment, you need to use executable from this location: C:\Windows\SysWOW64\inetsrv\asp.dll.

    From my experience. if I use the 64bit version of the executable(as a lot of posters recommend), and set the application pool to enable 32BIT....... YOU WILL GET 404.17 error. Similar thing hapen(maybe different IIS error code) if you are using the 32 bit version, but do not enable the 32bit setting.


    In my opinion, if everything else works in 64 bit environment(which in my case it does), I don't want to make anything run in 32bit unless i have to.The hardware and the OS is 64 bit. If the software can also run in 64 bit, why bother to change to 32? So, I use the 64bit executable.

  5. Test your configuration. Create a simple test.asp file in the virtual directory you just converted to Application in step 3 above, with just <%Response.Write("test")%> in it. See if it runs okay. It should. If it doesn't, and it's giving you error that complains about parent path, double click on the virtual directory you just converted to application in step 3 above, and double click on the ASP icon in features view. Set the enable parent path to true. While you are at it, under the debugging properties, set send error to browsers to TRUE, so you don't have to hang yourself later trying to figure out what's wrong with this world(or IIS). If you are using IE as your browser, make sure to turn off "Show friendly HTTP error messages" so that you can see the actual error(Internet Options, Advanced).

    At this point your ASP page should work fine. If not, make sure you do all the above steps right. If you are still getting an asp error, make sure you comment out "on error resume next" statement in your code. If the error message doesn't help you, try to enable failed request tracing to understand what the error is about(google it up to find out how to set this up).

    Your ACCESS database is still crapping out at this point. You can hang yourself(like I almost did). OR.... if that's not an option, do this....

  6. Install your Access database provider.Older access version uses JET.OLEDB 4.0 provider so that other application(such as ASP) can read and write data to it. This provider is 32BIT, and there is NO 64bit JET Engine. I repeat... NONE. I've seen suggestion that ask you to enable the 32bit support in your application pool, so you could get the JET engine to work. However I could never get this to work. HECK, the jet engine is not even registered on my server. I checked the registry entry, and there is no entry for for JET OLEDB provider. I don't know how in some forum people get it to work, but I definitely can not get mine to work in IIS7.5 and 2008R2 environment.

    You do NOT need a Jet Engine. Even if you can get it to work......... DON'T use it. Microsoft never support Jet running under server 2008. Use Microsoft Access Database Engine 2010 Redistributable. This is a key to the magic kingdom(wherever that is). Download the 64 BIT version, and install it. Restart it after you install(most likely you don't have to, but if you feel safer that way.... go ahead do it, and pull yourself together, don't get up on that chair and hang yourself just yet).

  7. Change the connection string in your ASP page to
    “Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=path to mdb/accdb file”
    example:
    connstr = "Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" & server.mappath("../..") & "\databases\list.mdb"

  8. Buy yourself a case of Bud Light. At this point your ASP pages should be talking to your Access database and displaying on a web browser. If it is still not working........ well, get that chair ready. I'm not sure what else could be the problem.

If I'm missing any step, please post a correction. Hope this helps someone

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
本火锅店点餐系统采用Java语言和Vue技术,框架采用SSM,搭配Mysql数据库,运行在Idea里,采用小程序模式。本火锅店点餐系统提供管理员、用户两种角色的服务。总的功能包括菜品的查询、菜品的购买、餐桌预定和订单管理。本系统可以帮助管理员更新菜品信息和管理订单信息,帮助用户实现在线的点餐方式,并可以实现餐桌预定。本系统采用成熟技术开发可以完成点餐管理的相关工作。 本系统的功能围绕用户、管理员两种权限设计。根据不同权限的不同需求设计出更符合用户要求的功能。本系统中管理员主要负责审核管理用户,发布分享新的菜品,审核用户的订餐信息和餐桌预定信息等,用户可以对需要的菜品进行购买、预定餐桌等。用户可以管理个人资料、查询菜品、在线点餐和预定餐桌、管理订单等,用户的个人资料是由管理员添加用户资料时产生,用户的订单内容由用户在购买菜品时产生,用户预定信息由用户在预定餐桌操作时产生。 本系统的功能设计为管理员、用户两部分。管理员为菜品管理、菜品分类管理、用户管理、订单管理等,用户的功能为查询菜品,在线点餐、预定餐桌、管理个人信息等。 管理员负责用户信息的删除和管理,用户的姓名和手机号都可以由管理员在此功能里看到。管理员可以对菜品的信息进行管理、审核。本功能可以实现菜品的定时更新和审核管理。本功能包括查询餐桌,也可以发布新的餐桌信息。管理员可以查询已预定的餐桌,并进行审核。管理员可以管理公告和系统的轮播图,可以安排活动。管理员可以对个人的资料进行修改和管理,管理员还可以在本功能里修改密码。管理员可以查询用户的订单,并完成菜品的安排。 当用户登录进系统后可以修改自己的资料,可以使自己信息的保持正确性。还可以修改密码。用户可以浏览所有的菜品,可以查看详细的菜品内容,也可以进行菜品的点餐。在本功能里用户可以进行点餐。用户可以浏览没有预定出去的餐桌,选择合适的餐桌可以进行预定。用户可以管理购物车里的菜品。用户可以管理自己的订单,在订单管理界面里也可以进行查询操作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值