Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


New ASP user.  ASP Doesnt seem to work

Posted on 2001-06-18
Medium Priority
Last Modified: 2012-05-04
Windows 2000
IIS 5.0
Visual Basic 6.0

I am reading a book from WROX.  I am following it along and trying to set up my first project.  I first go into Visual Basic and click on a new IIS project.  When I do this I can click on run and it will generate a basic ASP page.  I then save the project and when I reopen it I get the following message.

The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
/Project1-0/WebClass1.ASP, line 14

I can not seem to figure this out.  I have went into the IIS manager and created a new folder under WWWRoot and have saved the project there and try and run it but no luck.  

What is going on!!!!!
Question by:sTHomas
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +4

Expert Comment

ID: 6204551
I never use VB for building ASP project.
I recommend you using VisualInterdev instead.
Also, you do not have to create a new project in order to successfully creat your web-based application.  I always just create page by page and have not had problem doing that.

Expert Comment

ID: 6204662

1. Go into the IIS Management Applet
    W2K - Right-click My Computer/Manage/Services and Applications/Internet Information Services
    NT - It's on the menu somewhere, I don't recall.

2. Open Default Web Site

3. Find your project in the list of Virtual Directories

4. Right-click/Properties on your project's VD

5. Application Protection: High (Isolated)

6. Click Unload (if not greyed out)

This should take care of it.



Expert Comment

ID: 6204849

Please post your VB code.

Wee Siong
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 6205236
Agree with weesiong, please post code.  Also Win 2000 has an easy setup for db in OBDC sources for easy DSN naming, and will null permissions for network use. Regards, dmoring

Expert Comment

ID: 6205310
Quite obvious this is a security problem and has nothing todo with the code you wrote.

The solution will be to configure your IIS correctly. Make sure that you have switched on the execute-permission on your project in IIS (Home-directory tab).
LVL 20

Expert Comment

by:Michel Sakr
ID: 6205355
The IIS is locking the object and it's not multythreaded.. include the component in COM+  and work on it or restart IIS service.

How do I avoid 'Permission Denied' when re-compiling?

Use this batch file to release IIS' lock on your DLL:
    net stop iisadmin /y
    net start w3svc
You may need to add start lines for other services such as smtpsvc or msftpsvc. The disclaimer of course, if you're worried about stopping your web site traffic: don't develop DLLs on production machines.
If you are developing your ASP files using Visual InterDev, then IntelliSense may be doing you a disservice. Since this feature actually hooks into your custom COM objects (once you've created them using their ProgID in a createobject() statement), this places a lock on the DLL similar to the one IIS places on it. So if you are editing an ASP file which calls the DLL in question, you can recompile without rebooting by simply closing the ASP file.
You may also find the need to use KILL.EXE, if iisadmin refuses to be shut down. KILL.EXE is found in the NT and Windows 2000 Resource Kits. As long as the .EXE is in your system's path, you can modify the above script as follows:
    net stop iisadmin /y
    kill iisadmin
    net start w3svc

or include the dll in COM+

Start the Component services..in the tree select computers.. mycomputer..com+ applications...right click on it--> new -> application.. now in the wizard click next and select an empty application -> name your package  leave it in server process and click next -> Select the user and enter an account with enough rights to fufill your com jobs (admin account for ex) -> Finish..

now in the tree expand the new package untill you see the component directory-> right click it -> select new component-> in the wizard click next.. you can either install a new component if it's not registred or install a registred one if you already registred your dll (you select the 2nd choice) -> Select your component from the list (internal name displayed) -> Finish..

Author Comment

ID: 6207518
I have tried all suggestions but none seem to work. Done the following:

Reinstalled IIS
Upgraded to SP5 on VB6
changed rights, etc

I did some research on Microsofts Site and found information similiar regarding this problem.  They suggested I use a package called FileMon.  I ran Filemon and it did indeed show that the mswcrun.dll was giving me an access denied error.  I reregistered the dll and still no success.  I changed the rights on this file and I no longer get the access denied in Filemon but I still get the exact same error when I try and load the ASP file.

If I create the asp file myself, It runs just fine.  When you create a project in MS IIS it loads some default code.  I look inside the code and this is where I believe it is erroring

:Application"~WC~WebClassManager").ProcessNoStateWebClass "Project1.WebClass1", _
          Server, _
          Application, _
          Session, _
          Request, _

It would not matter whether I use InterDev to develope because it still errors on this line of code.  I guess I could just bag VB IIS and write through some other program but I would like this to work.

Anyone else had this same problem?????


Accepted Solution

gbaren earned 100 total points
ID: 6207724
I have had this problem. The problem was that the IUSR_machine didn't have the rights to instantiate the object.

By setting the application protection high, you cause a different process (not IIS) to load your DLL.

You should also set the directory security for the project directory to Integrated. Remove Anonymous!!

This only applies to the development system. You will not have these problems on the Web server.


Author Comment

ID: 6207870
I got so frustrated on this one I called microsoft.  They had me Start/RUN/DCOMCFG.  an application is loaded and they had me go into the Default Security and add ISUR_Machine to all three boxes.  This took care of the problem.  I will give the points to gbaren since I think he was on the right track.

Thanks for all your help.

Author Comment

ID: 6207876
It was a user rights issue but It could only be resolved in the DCOMCFG application.

Thanks for your help!!
LVL 20

Expert Comment

by:Michel Sakr
ID: 6209503
whew.. I see a new bad grader was born..

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question