473,545 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 (<authenticatio n
mode="Windows"/>) if impersonate is false (<identity
impersonate="fa lse"/>). Note that i use the administrator user to be
sure. But when I change impersonate element (<identity
impersonate="tr ue"/>) 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 .SecurityExcept ion: 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:
[SecurityExcepti on: Accès refusé.
]
System.Security .Principal.Wind owsImpersonatio nContext.Undo() +2739744

System.Security .Principal.Wind owsImpersonatio nContext.Dispos e(Boolean
disposing) +36
System.Security .Principal.Wind owsImpersonatio nContext.Dispos e() +9
System.Security .Principal.Wind owsIdentity.Get Name() +227
System.Security .Principal.Wind owsIdentity.get _Name() +31
System.Web.Mana gement.WebReque stInformation.. ctor() +210
System.Web.Mana gement.WebAudit Event.PreProces sEventInit() +28
System.Web.Mana gement.WebBaseE vent.RaiseInter nal(WebBaseEven t
eventRaised, ArrayList firingRuleInfos , Int32 index0, Int32 index1) +1533
System.Web.Mana gement.WebBaseE vent.RaiseSyste mEventInternal( String
message, Object source, Int32 eventCode, Int32 eventDetailCode ,
Exception exception, String nameToAuthentic ate) +3407614

System.Web.Secu rity.FileAuthor izationModule.I sUserAllowedToF ile(HttpContext
context, String fileName) +299
System.Web.Secu rity.FileAuthor izationModule.O nEnter(Object source,
EventArgs eventArgs) +77

System.Web.Sync EventExecutionS tep.System.Web. HttpApplication .IExecutionStep .Execute()
+92
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +64


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
ASP.NET Version:2.0.507 27.42

Sep 5 '06 #1
2 2232
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.frwr ote in message
news:uJ******** ******@TK2MSFTN GP05.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 (<authenticatio n
mode="Windows"/>) if impersonate is false (<identity
impersonate="fa lse"/>). Note that i use the administrator user to be sure.
But when I change impersonate element (<identity impersonate="tr ue"/>) 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 .SecurityExcept ion: 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:
[SecurityExcepti on: Accès refusé.
]
System.Security .Principal.Wind owsImpersonatio nContext.Undo() +2739744

System.Security .Principal.Wind owsImpersonatio nContext.Dispos e(Boolean
disposing) +36
System.Security .Principal.Wind owsImpersonatio nContext.Dispos e() +9
System.Security .Principal.Wind owsIdentity.Get Name() +227
System.Security .Principal.Wind owsIdentity.get _Name() +31
System.Web.Mana gement.WebReque stInformation.. ctor() +210
System.Web.Mana gement.WebAudit Event.PreProces sEventInit() +28
System.Web.Mana gement.WebBaseE vent.RaiseInter nal(WebBaseEven t
eventRaised, ArrayList firingRuleInfos , Int32 index0, Int32 index1) +1533
System.Web.Mana gement.WebBaseE vent.RaiseSyste mEventInternal( String
message, Object source, Int32 eventCode, Int32 eventDetailCode , Exception
exception, String nameToAuthentic ate) +3407614

System.Web.Secu rity.FileAuthor izationModule.I sUserAllowedToF ile(HttpContext
context, String fileName) +299
System.Web.Secu rity.FileAuthor izationModule.O nEnter(Object source,
EventArgs eventArgs) +77

System.Web.Sync EventExecutionS tep.System.Web. HttpApplication .IExecutionStep .Execute()
+92
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +64


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
ASP.NET Version:2.0.507 27.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.frwr ote in message
news:uJ******** ******@TK2MSFTN GP05.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 (<authenticatio n
mode="Window s"/>) if impersonate is false (<identity
impersonate="f alse"/>). Note that i use the administrator user to be sure.
But when I change impersonate element (<identity impersonate="tr ue"/>) 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 .SecurityExcept ion: 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:
[SecurityExcepti on: Accès refusé.
]
System.Security .Principal.Wind owsImpersonatio nContext.Undo() +2739744

System.Securit y.Principal.Win dowsImpersonati onContext.Dispo se(Boolean
disposing) +36
System.Security .Principal.Wind owsImpersonatio nContext.Dispos e() +9
System.Security .Principal.Wind owsIdentity.Get Name() +227
System.Security .Principal.Wind owsIdentity.get _Name() +31
System.Web.Mana gement.WebReque stInformation.. ctor() +210
System.Web.Mana gement.WebAudit Event.PreProces sEventInit() +28
System.Web.Mana gement.WebBaseE vent.RaiseInter nal(WebBaseEven t
eventRaised, ArrayList firingRuleInfos , Int32 index0, Int32 index1) +1533
System.Web.Mana gement.WebBaseE vent.RaiseSyste mEventInternal( String
message, Object source, Int32 eventCode, Int32 eventDetailCode , Exception
exception, String nameToAuthentic ate) +3407614

System.Web.Sec urity.FileAutho rizationModule. IsUserAllowedTo File(HttpContex t
context, String fileName) +299
System.Web.Secu rity.FileAuthor izationModule.O nEnter(Object source,
EventArgs eventArgs) +77

System.Web.Syn cEventExecution Step.System.Web .HttpApplicatio n.IExecutionSte p.Execute()
+92
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynch ronously) +64


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
ASP.NET Version:2.0.507 27.42

Sep 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2911
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 use them. No IIS. Use TCP, binary. Standard server example with a console host and console client. .NET 1.1, windows XP. (I tried posting to the...
2
2612
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 is not able to access a specific network resource and I just can't figure out why. First of all, let me say this worked fine with IIS running on...
29
15487
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" ---Start of test.aspx---- <%@ Page language="C#" AutoEventWireup="false" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >...
5
2452
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, ******************************************************************* string fileLocation = txtboxFileName.Text.ToString(); string sheetName = "Import"; string connectionString =...
3
4089
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 created a simple user account from the User template with the name of "MyUser". Problem is that I can't login to \TestWS\Service1.asmx with MyUser...
2
1564
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 mode connection (<authentication mode="Windows"/>) if impersonate is false (<identity impersonate="false"/>). Note that i use the administrator user to...
2
5255
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, I always get ERROR: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). First I thought its the permission problem, so I set...
1
2792
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 roadblocks that keep me from jumping in. Well this time is no different. While trying to use an asp.net sqlmembershipprovider to create a new user, I get...
5
2742
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 Authenticate token call and it is being called. My ASP.NET service has a Login() method and it is being called during client application startup....
0
7473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7660
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7813
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7431
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5337
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4949
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3457
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.