473,749 Members | 2,486 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 2250
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
2926
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 remoting newsgroup, no answers in the last couple days, trying here in hopes that more people watch this...
2
2626
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 Win2000 Server. This has not worked since I upgraded to Windows Server 2003. My Platform: Windows...
29
15546
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" > <HTML> <HEAD>
5
2465
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 = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
3
4102
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 account unless I give that user Administrator permission.
2
1573
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 be sure. But when I change impersonate element (<identity impersonate="true"/>) a system...
2
5277
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 permission of that directory to everyone (not an secure idea, but for test only). I found out that...
1
2805
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 the following error: Server Error in '/' Application....
5
2752
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. Both the client and service have matching policy config files. Once authentication
0
8996
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9388
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
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.