1

I wanted to use IIS for ASP so I enabled IIS roles in Windows Server 2008 R2 and also .NET 3.5 in Features. In the code I have "Server" object but it does not work. In another PC with another windows version it works but I don't know what is the issue in this windows. The browser gives the error as "Error 8002801d".

<%



Response.write("Check   ")


Response.Write(Server.ScriptTimeout)



// commented not using this line
// Set Conn = Server.CreateObject(..........)
sqlchild
  • 8,754
  • 28
  • 105
  • 167
  • Classic ASP and ASP.Net are not the same thing. Installing .Net 3.5 in features will give you Classic ASP support. – user692942 Feb 08 '22 at 13:01
  • 1
    Does this answer your question? [How to enable ASP classic in IIS7.5](https://stackoverflow.com/a/13879032) – user692942 Feb 08 '22 at 13:11
  • 0x8002801d indicates the library your code tried to load was not registered, so no object can be created. Thus, you should verify what that object it is and which library needs to be registered. BTW, Windows Server 2008 R2 is end of life, so stop working on it and upgrade. – Lex Li Feb 08 '22 at 15:26
  • @LexLi , thanks for the help. how do I know the library. any code which uses Server object is not working for me – sqlchild Feb 08 '22 at 16:45
  • @LexLi - even this doesn't work - Server.ScriptTimeout – sqlchild Feb 09 '22 at 17:57
  • @user692942 - even this also does not work - Server.ScriptTimeout – sqlchild Feb 09 '22 at 17:57
  • @sqlchild What is any of that supposed to mean? Have explained you need to install ASP **not** ASP.Net (as the question says you've done) before you'll be able to get any Classic ASP code to run. The [links explain](https://stackoverflow.com/a/13879032/692942) how to install Classic ASP. – user692942 Feb 09 '22 at 18:06
  • @user692942 - thanks very much, i did that also and ..... the code Response.write("hello") works fine. but when i try to use the "Server" keyword then it says "error '8002801d'" – sqlchild Feb 09 '22 at 18:11
  • @user692942 any help you can suggest please – sqlchild Feb 09 '22 at 18:13
  • @sqlchild Fundamentally there is something wrong as `Server` is a built-in Classic ASP object and part of the object model so shouldn't cause an `8002801d - Library not registered` error. Would [check this guide](https://docs.microsoft.com/en-us/iis/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-not-installed-by-default-on-iis#:~:text=%20Installing%20Classic%20ASP%20on%20Windows%20Server%202012,required%20by%20ASP%3F%20dialog%20box%20appears%2C...%20More%20) in the official documentation. Sounds like Classic ASP support isn't installed correctly. – user692942 Feb 09 '22 at 18:14
  • @sqlchild You can also check through the [IIS ASP Scripting Reference](https://learn.microsoft.com/en-us/previous-versions/iis/6.0-sdk/ms524664(v=vs.90)) to see if you are using Classic ASP or not. If you [edit] the question and show your code it would help. – user692942 Feb 09 '22 at 18:17
  • @user692942 thanks , i have updated the question with the code. its just two lines that's it . please suggest some help – sqlchild Feb 09 '22 at 18:24
  • @sqlchild what is the name of the file you are running including the file extension? Concerned you have a bigger problem as `Server.ScriptTimeout` should work, this might help - [Can't run Classic ASP on IIS 7 Windows Server 2008 64 Bit](https://stackoverflow.com/a/6910020) – user692942 Feb 09 '22 at 18:25
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/241877/discussion-between-sqlchild-and-user692942). – sqlchild Feb 09 '22 at 18:34
  • @user692942 can you guide me how to fix the registry key – sqlchild Feb 09 '22 at 19:17
  • @user692942 i tried to find reg issue but how to find reg issue in Process monitor. i have installed the tool in windows but how to find the key which is creating the issue? – – sqlchild Feb 13 '22 at 15:42
  • I’ve explained previously that this is a very technical problem which we are not going to be able to explain here. You could try [sf] but the best advice I can give is re-install the OS after backing up your data. – user692942 Feb 13 '22 at 15:49

0 Answers0