Solved

New ASP user.  ASP Doesnt seem to work

Posted on 2001-06-18
11
358 Views
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!!!!!
0
Comment
Question by:sTHomas
  • 3
  • 2
  • 2
  • +4
11 Comments
 
LVL 3

Expert Comment

by:yas022100
Comment Utility
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.
0
 
LVL 5

Expert Comment

by:gbaren
Comment Utility
ST,

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.

Gary

0
 
LVL 7

Expert Comment

by:weesiong
Comment Utility
sTHomas,

Please post your VB code.

Regards,
Wee Siong
0
 

Expert Comment

by:dmoring
Comment Utility
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
0
 
LVL 2

Expert Comment

by:DirkVe
Comment Utility
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).
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 20

Expert Comment

by:Silvers5
Comment Utility
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..
0
 

Author Comment

by:sTHomas
Comment Utility
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, _
          Response


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?????


0
 
LVL 5

Accepted Solution

by:
gbaren earned 50 total points
Comment Utility
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.

0
 

Author Comment

by:sTHomas
Comment Utility
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.
0
 

Author Comment

by:sTHomas
Comment Utility
It was a user rights issue but It could only be resolved in the DCOMCFG application.

Thanks for your help!!
0
 
LVL 20

Expert Comment

by:Silvers5
Comment Utility
whew.. I see a new bad grader was born..
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now