403内置VS 2008 Web服务器禁止使用

时间:2022-08-09 00:09:24

I have an ASP.Net webapp where I wanted to test using a different local account. So I created the account, but then started getting 403 Forbidden when logging in with that account. This is using the VS 2008 built-in web server (Cassini). A coworker suggested giving that user account permissions on the project files which I did. I also gave the ASPNET user the same permissions, and to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files, killed and restarted WebDev.WebServer.EXE, and cleared cache, but to no avail. I've included the related event from the event log below.

我有一个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,并清除了缓存,但无济于事。我已经在下面的事件日志中包含了相关事件。

Any ideas what to try next, or where to look or how to get a more specific cause of the underlying problem?

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

Thanks, Clark

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 个解决方案

#1


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

Cassini访问该文件的用户需要拥有正在访问的文件的权限。

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.

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

#1


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

Cassini访问该文件的用户需要拥有正在访问的文件的权限。

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.

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