469,276 Members | 1,922 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,276 developers. It's quick & easy.

Security exception with impersonate true for a webservice

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.WindowsImpersonationCont ext.Undo() +2739744

System.Security.Principal.WindowsImpersonationCont ext.Dispose(Boolean
disposing) +36
System.Security.Principal.WindowsImpersonationCont ext.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.PreProcessEven tInit() +28
System.Web.Management.WebBaseEvent.RaiseInternal(W ebBaseEvent
eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1) +1533
System.Web.Management.WebBaseEvent.RaiseSystemEven tInternal(String
message, Object source, Int32 eventCode, Int32 eventDetailCode,
Exception exception, String nameToAuthenticate) +3407614

System.Web.Security.FileAuthorizationModule.IsUser AllowedToFile(HttpContext
context, String fileName) +299
System.Web.Security.FileAuthorizationModule.OnEnte r(Object source,
EventArgs eventArgs) +77

System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute()
+92
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

Sep 5 '06 #1
2 2024
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" <us**@site.frwrote in message
news:uJ**************@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.WindowsImpersonationCont ext.Undo() +2739744

System.Security.Principal.WindowsImpersonationCont ext.Dispose(Boolean
disposing) +36
System.Security.Principal.WindowsImpersonationCont ext.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.PreProcessEven tInit() +28
System.Web.Management.WebBaseEvent.RaiseInternal(W ebBaseEvent
eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1) +1533
System.Web.Management.WebBaseEvent.RaiseSystemEven tInternal(String
message, Object source, Int32 eventCode, Int32 eventDetailCode, Exception
exception, String nameToAuthenticate) +3407614

System.Web.Security.FileAuthorizationModule.IsUser AllowedToFile(HttpContext
context, String fileName) +299
System.Web.Security.FileAuthorizationModule.OnEnte r(Object source,
EventArgs eventArgs) +77

System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute()
+92
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

Sep 5 '06 #2
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 :
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" <us**@site.frwrote in message
news:uJ**************@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.WindowsImpersonationCont ext.Undo() +2739744

System.Security.Principal.WindowsImpersonationCon text.Dispose(Boolean
disposing) +36
System.Security.Principal.WindowsImpersonationCont ext.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.PreProcessEven tInit() +28
System.Web.Management.WebBaseEvent.RaiseInternal(W ebBaseEvent
eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1) +1533
System.Web.Management.WebBaseEvent.RaiseSystemEven tInternal(String
message, Object source, Int32 eventCode, Int32 eventDetailCode, Exception
exception, String nameToAuthenticate) +3407614

System.Web.Security.FileAuthorizationModule.IsUse rAllowedToFile(HttpContext
context, String fileName) +299
System.Web.Security.FileAuthorizationModule.OnEnte r(Object source,
EventArgs eventArgs) +77

System.Web.SyncEventExecutionStep.System.Web.Http Application.IExecutionStep.Execute()
+92
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

Sep 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Joseph Geretz | last post: by
29 posts views Thread by Patrick | last post: by
3 posts views Thread by Asaf | last post: by
2 posts views Thread by rockdale | last post: by
1 post views Thread by Matt MacDonald | last post: by
5 posts views Thread by VictorG | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.