0

我有一个 ASP.Net webapp,我想在其中使用不同的本地帐户进行测试。所以我创建了该帐户,但随后在使用该帐户登录时开始出现 403 Forbidden。这是使用 VS 2008 内置的 Web 服务器 (Cassini)。一位同事建议授予该用户帐户对我所做的项目文件的权限。我还给了 ASPNET 用户相同的权限,以及对 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET 文件,杀死并重新启动 WebDev.WebServer.EXE,并清除缓存,但无济于事. 我在下面的事件日志中包含了相关事件。

任何想法接下来要尝试什么,或者在哪里寻找或如何获得潜在问题的更具体原因?

谢谢,克拉克

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 6/5/2009 2:20:53 PM 
Event time (UTC): 6/5/2009 6:20:53 PM 
Event ID: fc869492b17f4bddb582026ac1752cd6 
Event sequence: 8 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: a55c3efc-3-128886994866758750 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\Documents and Settings\Fred\My Documents\Visual Studio 2008\Projects\ETimeLite\ETimeLiteUserControl\ 
    Machine name: MOSSDEV 

Process information: 
    Process ID: 5260 
    Process name: WebDev.WebServer.exe 
    Account name: MOSSDEV\Fred 

Exception information: 
    Exception type: TargetInvocationException 
    Exception message: Exception has been thrown by the target of an invocation. 

Request information: 
    Request URL: http://localhost:35752/Test_EtimeLiteAsUserControl.aspx?nocache=1 
    Request path: /Test_EtimeLiteAsUserControl.aspx 
    User host address: 127.0.0.1 
    User: MOSSDEV\Fred 
    Is authenticated: True 
    Authentication Type: NTLM 
    Thread account name: MOSSDEV\Fred 

Thread information: 
    Thread ID: 4 
    Thread account name: MOSSDEV\Fred 
    Is impersonating: False 
    Stack trace:    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)
   at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
   at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
   at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
   at System.Web.UI.WebControls.GridView.DataBind()
   at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
   at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
   at System.Web.UI.Control.EnsureChildControls()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Custom event details: 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
4

1 回答 1

1

The user that Cassini is accessing the file as needs to have rights on the file being accessed.

While you'll find lots of specific answers via google easily enough, I'll offer a 'teach to fish' answer which yuo'll either love or hate:-

Using procmon from sysinternals, you'll be able to see the permission being refused internally, which will allow you to assign sufficient permissions on the resource being accessed to the user under whose identity it is being accessed.

于 2009-06-05T21:31:42.753 回答