Re: Access is denied

From: Matjaz Ladava (matjaz_at__nospam_ladava.com)
Date: 06/23/03


Date: Mon, 23 Jun 2003 20:01:24 +0200


the question here is, what are permissions set on your object that you are
trying to instantiate ? What are you trying to instantiate ? If this object
is in your Component services, then check permissions on that object. Try
using impersonation, disable anonymous access trough <deny users="?" /> in
your web.config. Is the object, that you are instantiating a remote object ?
What do you mean by all permissions (for ASP account) ?

-- 
Regards
Matjaz Ladava, MCSE (NT4 & 2000)
matjaz@ladava.com
http://ladava.com
"Scott Sivorn" <ssivorn@bolidenmkm.co.uk> wrote in message
news:040101c33977$dc505710$a001280a@phx.gbl...
> I have installed from a clean installation WinXP, and
> visual studio (2003) and all associated patches. I have
> created a sample application that uses the
> Server.CreateObject method. The following is the error i
> continually receive whatever i try to do. The ASP account
> has every privilege it can be given yet the error is still
> received, i have also tried tweaking the privileges for
> the IIS account.
>
> This is the same installation as on a Win2K machine which
> has no problems at all.
>
> Does anyone have any ideas that could shed some light on
> this? Or know what could be causing the problem?
>
>
>
> Server Error in '/WebApplication1' Application.
> -----------------------------------------------------------
> ---------------------
>
> Access is denied.
> Description: An unhandled exception occurred during the
> execution of the current web request. Please review the
> stack trace for more information about the error and where
> it originated in the code.
>
> Exception Details: System.UnauthorizedAccessException:
> Access is denied.
>
> ASP.NET is not authorized to access the requested
> resource. Consider granting access rights to the resource
> to the ASP.NET request identity. ASP.NET has a base
> process identity (typically {MACHINE}\ASPNET on IIS 5 or
> Network Service on IIS 6) that is used if the application
> is not impersonating. If the application is impersonating
> via <identity impersonate="true"/>, the identity will be
> the anonymous user (typically IUSR_MACHINENAME) or the
> authenticated request user.
>
> To grant ASP.NET write access to a file, right-click the
> file in Explorer, choose "Properties" and select the
> Security tab. Click "Add" to add the appropriate user or
> group. Highlight the ASP.NET account, and check the boxes
> for the desired access.


Relevant Pages

  • Re: RWW
    ... Were the permissions correct, or did you have to adjust them? ... >> Add Local Service and Network Service account Read & Execute, ... >>> current web request. ... >>> Exception Details: System.UnauthorizedAccessException: Access to the ...
    (microsoft.public.windows.server.sbs)
  • Re: Receiving a strong name error when trying to access a library
    ... or use one of the other strong name hacking techniques ... > you are using asp.net) the request will have the security context of the ... > ASPNET account does not have enough permissions, ... >> an assembly tag with in code? ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: System.Security.SecurityException
    ... I needed to add permissions ... > I'm attempting to build an app then sends a request to a URL and reads the ... > Public Function LoadURL(ByVal Url As String) As String ... > Dim sr As New StreamReader ...
    (microsoft.public.dotnet.languages.vb)
  • Access problems trying to access my log files
    ... folder to get the name of the folder the ex040920.log is ... granting access rights to the resource to the ASP.NET request identity. ... As I said I did try to set the permissions to everyone to solve the problem ... This is only on my WXP Pro machine so I am not concerned ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Retrieving the COM class factory for component with CLSID
    ... I have set the permissions to the server using dcomcnfg as described in those ... instantiate and create word objects, but when I hosted my application in ... methods on the Type class, passing the machine name as the second ...
    (microsoft.public.dotnet.languages.csharp)