Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/04/2008, 13:57
Avatar de Viejari
Viejari
 
Fecha de Ingreso: marzo-2007
Mensajes: 9
Antigüedad: 17 años, 2 meses
Puntos: 0
UnauthorizedAccessException con una dll

Hola estimados, contertulios. Ojalá alguien me pueda ayudar.
Tengo una aplicación .net que es un sitio, está ya hecho, pero necesito agregar algunas cosas, dentro de las referencias está una que se llama Interop.Excel, mi problema es que aunque tengo esa dll en mi equipo, al llamar la página en cuestion me aparece el siguiente error:

Se que es un tema de permisos, pero ya no sé donde más buscar , todas mis carpetas tienen permiso para mi usuario y ASP.Net

Alguna sugerencia?????.

Graciasssss

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.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this,
please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode.
The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead.
You should make sure that an application has debugging disabled before deploying into production scenario.



Stack Trace:

[UnauthorizedAccessException: Access is denied.]
wwwProductos.SimuladorCarteraAnalisisWeb..ctor()
ASP.cartera_analisis2_aspx..ctor()

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.Activator.CreateInstance(Type type) +7
System.Web.HttpRuntime.CreatePublicInstance(Type type)
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String virtualPath, String inputFile, HttpContext context)

[HttpException (0x80004005): Failed to create page of type 'ASP.cartera_analisis2_aspx'.]
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String virtualPath, String inputFile, HttpContext context)
System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String virtualPath, String inputFile, HttpContext context)
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String requestType, String url, String path)
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)
System.Web.HttpServerUtility.ExecuteInternal(Strin g path, TextWriter writer, Boolean preserveForm)

[HttpException (0x80004005): Error executing child request for cartera_analisis2.aspx.]
System.Web.HttpServerUtility.ExecuteInternal(Strin g path, TextWriter writer, Boolean preserveForm)
System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
System.Web.HttpServerUtility.Transfer(String path)
wwwProductos.Cartera_Analisis.lnkCalcular_Click(Ob ject sender, EventArgs e)
System.Web.UI.WebControls.LinkButton.OnClick(Event Args e)
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()