2009-06-05 45 views
0

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

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

感谢,克拉克

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. 

回答

1

是卡西尼号访问文件需要有被访问的文件权限的用户。

当你通过谷歌找到很多具体的答案很轻松了,我会提供一个“授之以渔”答案,无论是yuo'll爱或恨: -

使用procmon from sysinternals,你会能够看到内部拒绝的权限,这将允许您为被访问的资源分配足够的权限,以访问正在访问其身份的用户。

+0

好的,跑了procmon。我没有看到列出任何项目相关的文件。我看到的唯一“有趣”的东西(除了一些框架DLL)是与WebDev相关的东西,但它们看起来像进入GAC的虚拟路径,而不是实际上可以更改权限的目录。有什么具体的你在想我会看到吗? – 2009-06-05 21:55:00