0

我已经部署了一个 Lightswitch 应用程序。详情如下:

  1. 用过VS2013
  2. 有应用程序的 HTML 客户端
  3. 将桌面客户端部署在 Web 中以进行角色/用户/权限管理
  4. 使用 Windows 身份验证并仅允许访问 aspnet 提供程序数据库中提到的那些(桌面客户端)
  5. IIS7.5

当我访问该页面时出现一些错误,它给出了以下错误。


Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[NullReferenceException: Object reference not set to an instance of an object.]
   Microsoft.LightSwitch.Utilities.Server.Internal.ServerRequestSecurityState.GetSecurityGroupsForCurrentUser(IWindowsIdentity identity) +56
   Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsWindowsUserRegistered(IPrincipal principal, ServerRequestSecurityState state) +373
   Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsUserRegistered(IPrincipal principal) +317
   Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.AuthenticateRequest(HttpContextBase context, HttpStatusCode& status, Exception& authException) +201
   Microsoft.LightSwitch.WebHost.Implementation.LightSwitchHttpModule.HandlePostAuthenticateRequest() +201
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446

以下是事件日志中记录的警告。


+ System 

  - Provider 

   [ Name]  ASP.NET 4.0.30319.0 

  - EventID 1309 

   [ Qualifiers]  32768 

   Level 3 

   Task 3 

   Keywords 0x80000000000000 

  - TimeCreated 

   [ SystemTime]  2014-08-01T15:03:43.000000000Z 

   EventRecordID 107901 

   Channel Application 

   Computer <DELETED> 

   Security 


- EventData 

   3005 
   An unhandled exception has occurred. 
   8/1/2014 8:33:43 PM 
   8/1/2014 3:03:43 PM 
   e6e596e599ff4465968b9afeb7739958 
   183 
   58 
   0 
   /LM/W3SVC/8/ROOT-1-130513779129486922 
   Full 
   / 
   D:\PublishedWebsites\CustomerComplaints\ 
   <DELEED> 

   8976 
   w3wp.exe 
   IIS APPPOOL\CustomerComplaints 
   NullReferenceException 
   Object reference not set to an instance of an object. at Microsoft.LightSwitch.Utilities.Server.Internal.ServerRequestSecurityState.GetSecurityGroupsForCurrentUser(IWindowsIdentity identity) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsWindowsUserRegistered(IPrincipal principal, ServerRequestSecurityState state) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsUserRegistered(IPrincipal principal) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.AuthenticateRequest(HttpContextBase context, HttpStatusCode& status, Exception& authException) at Microsoft.LightSwitch.WebHost.Implementation.LightSwitchHttpModule.HandlePostAuthenticateRequest() at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  
   http://<CurrentMachine>:8451/CustomerComplaints/ 
   /CustomerComplaints/ 
   ::1 

   False 

   IIS APPPOOL\CustomerComplaints 
   34 
   IIS APPPOOL\CustomerComplaints 
   False 
   at Microsoft.LightSwitch.Utilities.Server.Internal.ServerRequestSecurityState.GetSecurityGroupsForCurrentUser(IWindowsIdentity identity) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsWindowsUserRegistered(IPrincipal principal, ServerRequestSecurityState state) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsUserRegistered(IPrincipal principal) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.AuthenticateRequest(HttpContextBase context, HttpStatusCode& status, Exception& authException) at Microsoft.LightSwitch.WebHost.Implementation.LightSwitchHttpModule.HandlePostAuthenticateRequest() at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  

我相信我的 IIS 设置有问题,但不确定。我试图搜索原因和解决方案,但没有得到任何线索。

4

0 回答 0