473,394 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1560
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sean Newton | last post by:
I am absolutely bewildered by now by the Microsoft.Samples SSPI and Security assemblies. I've been trying to set these up in a very straightforward harness in the way that I'd like to be able to...
2
by: James | last post by:
I'm currently using a basic web service for my Windows and web clients to access a Microsoft Access database on the web server. All works fine, but I'm worried about security. Without any...
2
by: Joseph Geretz | last post by:
I'm having a credentialing problem in my web application. Actually, I don't think this is an IIS security issue, since I'm able to access the page I'm requesting. However, the executing page itself...
29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
5
by: CyberLotus | last post by:
Hi, I've created a web application and through this I want to import Excel data to database. Following is the code that I've written, ...
3
by: Asaf | last post by:
Hello, I have created a web service name "TestWS" and published it to my SBS2003 server that uses IIS6 as a web server. I have set NO anonymous access to TestWS virtual directory and I have...
2
by: KaNos | last post by:
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...
2
by: rockdale | last post by:
Hi, all: My asp.net application calles MS speech 5.1 and generate a wav file on server's path. Everything runs perfectly on my development machine. But when I move the appl to production server,...
1
by: Matt MacDonald | last post by:
Hi all, I've been debating for a while (basically since asp.net 2.0 came out) on using the built in mebership classes to handle user management in my web apps. I seem to keep coming upon...
5
by: VictorG | last post by:
Hello, I am trying to secure a webservice using WSE 3.0 and the turnkey usernameForCertificateSecurity profile. I am passing a valid username token, and on the server I have overridden the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.