|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Security exception with impersonate true for a webserviceI've made a webservice (c# v2) to install in a server IIS 6 on a Windows 2000 last SP. We can use the webservice in local, throw the pages wich present the methods, with a windows mode connection (<authentication mode="Windows"/>) if impersonate is false (<identity impersonate="false"/>). Note that i use the administrator user to be sure. But when I change impersonate element (<identity impersonate="true"/>) a system exception is created :(. Where is the problem ? Thanks for responses... Server Error in '/Plateforme/SCORMService' Application. -------------------------------------------------------------------------------- Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Accès refusé. 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: [SecurityException: Accès refusé. ] System.Security.Principal.WindowsImpersonationContext.Undo() +2739744 System.Security.Principal.WindowsImpersonationContext.Dispose(Boolean disposing) +36 System.Security.Principal.WindowsImpersonationContext.Dispose() +9 System.Security.Principal.WindowsIdentity.GetName() +227 System.Security.Principal.WindowsIdentity.get_Name() +31 System.Web.Management.WebRequestInformation..ctor() +210 System.Web.Management.WebAuditEvent.PreProcessEventInit() +28 System.Web.Management.WebBaseEvent.RaiseInternal(WebBaseEvent eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1) +1533 System.Web.Management.WebBaseEvent.RaiseSystemEventInternal(String message, Object source, Int32 eventCode, Int32 eventDetailCode, Exception exception, String nameToAuthenticate) +3407614 System.Web.Security.FileAuthorizationModule.IsUserAllowedToFile(HttpContext context, String fileName) +299 System.Web.Security.FileAuthorizationModule.OnEnter(Object source, EventArgs eventArgs) +77 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 on 2000, you must add "act as part of os" permission to the asp.net account
the web service is running under. -- bruce (sqlwork.com) Show quoteHide quote "KaNos" <u***@site.fr> wrote in message news:uJ2CyjS0GHA.2036@TK2MSFTNGP05.phx.gbl... > Hello world, > I've made a webservice (c# v2) to install in a server IIS 6 on a Windows > 2000 last SP. We can use the webservice in local, throw the pages wich > present the methods, with a windows mode connection (<authentication > mode="Windows"/>) if impersonate is false (<identity > impersonate="false"/>). Note that i use the administrator user to be sure. > But when I change impersonate element (<identity impersonate="true"/>) a > system exception is created :(. > Where is the problem ? > Thanks for responses... > > > Server Error in '/Plateforme/SCORMService' Application. > -------------------------------------------------------------------------------- > > Security Exception > Description: The application attempted to perform an operation not allowed > by the security policy. To grant this application the required permission > please contact your system administrator or change the application's trust > level in the configuration file. > > Exception Details: System.Security.SecurityException: Accès refusé. > > > 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: > > > [SecurityException: Accès refusé. > ] > System.Security.Principal.WindowsImpersonationContext.Undo() +2739744 > > System.Security.Principal.WindowsImpersonationContext.Dispose(Boolean > disposing) +36 > System.Security.Principal.WindowsImpersonationContext.Dispose() +9 > System.Security.Principal.WindowsIdentity.GetName() +227 > System.Security.Principal.WindowsIdentity.get_Name() +31 > System.Web.Management.WebRequestInformation..ctor() +210 > System.Web.Management.WebAuditEvent.PreProcessEventInit() +28 > System.Web.Management.WebBaseEvent.RaiseInternal(WebBaseEvent > eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1) +1533 > System.Web.Management.WebBaseEvent.RaiseSystemEventInternal(String > message, Object source, Int32 eventCode, Int32 eventDetailCode, Exception > exception, String nameToAuthenticate) +3407614 > > System.Web.Security.FileAuthorizationModule.IsUserAllowedToFile(HttpContext > context, String fileName) +299 > System.Web.Security.FileAuthorizationModule.OnEnter(Object source, > EventArgs eventArgs) +77 > > System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() > +92 > System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& > completedSynchronously) +64 > > > > > -------------------------------------------------------------------------------- > Version Information: Microsoft .NET Framework Version:2.0.50727.42; > ASP.NET Version:2.0.50727.42 > Hi bruce and thanks,
but it wasn't the solution. I found this page http://support.microsoft.com/kb/824308/en-us and my webservice is now ok. bruce barker (sqlwork.com) a écrit : Show quoteHide quote > on 2000, you must add "act as part of os" permission to the asp.net account > the web service is running under. > > -- bruce (sqlwork.com) > > > > "KaNos" <u***@site.fr> wrote in message > news:uJ2CyjS0GHA.2036@TK2MSFTNGP05.phx.gbl... >> Hello world, >> I've made a webservice (c# v2) to install in a server IIS 6 on a Windows >> 2000 last SP. We can use the webservice in local, throw the pages wich >> present the methods, with a windows mode connection (<authentication >> mode="Windows"/>) if impersonate is false (<identity >> impersonate="false"/>). Note that i use the administrator user to be sure. >> But when I change impersonate element (<identity impersonate="true"/>) a >> system exception is created :(. >> Where is the problem ? >> Thanks for responses... >> >> >> Server Error in '/Plateforme/SCORMService' Application. >> -------------------------------------------------------------------------------- >> >> Security Exception >> Description: The application attempted to perform an operation not allowed >> by the security policy. To grant this application the required permission >> please contact your system administrator or change the application's trust >> level in the configuration file. >> >> Exception Details: System.Security.SecurityException: Accès refusé. >> >> >> 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: >> >> >> [SecurityException: Accès refusé. >> ] >> System.Security.Principal.WindowsImpersonationContext.Undo() +2739744 >> >> System.Security.Principal.WindowsImpersonationContext.Dispose(Boolean >> disposing) +36 >> System.Security.Principal.WindowsImpersonationContext.Dispose() +9 >> System.Security.Principal.WindowsIdentity.GetName() +227 >> System.Security.Principal.WindowsIdentity.get_Name() +31 >> System.Web.Management.WebRequestInformation..ctor() +210 >> System.Web.Management.WebAuditEvent.PreProcessEventInit() +28 >> System.Web.Management.WebBaseEvent.RaiseInternal(WebBaseEvent >> eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1) +1533 >> System.Web.Management.WebBaseEvent.RaiseSystemEventInternal(String >> message, Object source, Int32 eventCode, Int32 eventDetailCode, Exception >> exception, String nameToAuthenticate) +3407614 >> >> System.Web.Security.FileAuthorizationModule.IsUserAllowedToFile(HttpContext >> context, String fileName) +299 >> System.Web.Security.FileAuthorizationModule.OnEnter(Object source, >> EventArgs eventArgs) +77 >> >> System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() >> +92 >> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& >> completedSynchronously) +64 >> >> >> >> >> -------------------------------------------------------------------------------- >> Version Information: Microsoft .NET Framework Version:2.0.50727.42; >> ASP.NET Version:2.0.50727.42 >> > >
Other interesting topics
wildcard mapping
Delayed Code Execution? Authentification - Server Variables ( omg! ) Pulling from Access Query, Cannot Change Date/Time Formats I/O stream performance Help debugging...where do I look? Overture/Yahoo & Google PPC referral tracking Is it possible to have more than one login control in a website? Dynamic creation of a user control with a dropdownlist Changing Location of Solution File in VS2005 |
|||||||||||||||||||||||