473,802 Members | 2,438 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Impersonation Failure - Access Denied

I am new to .NET so not sure if this is the right process... Any help
will be greatly appreciated.

I am trying to eliminate the grey login box that pops up when Windows
Authentication is used by using Forms Authentication and using the
details provided to impersonate that user and supply the credentials
to the HTTPContext.Cur rent.User

I have tried to use the sample code supplied by Microsoft but realised
that I get an error (listed below) when I call impersonate method.
Error message indicates Access denied.
I am using Windows XP and I am using an active account but still
encounter the problem.

I have tried several suggestions posted on over the web unsuccessfully
so any help will be greatly appreciated.

Thanks in Advance,
Andy

-------------------ERROR---------------------------------------
Impersonation failure.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Web.Http Exception: Impersonation failure.

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:
[HttpException (0x80004005): Impersonation failure.]
System.Web.Impe rsonationSuspen dContext.GetCur rentToken() +215
System.Web.Impe rsonationSuspen dContext.Suspen d() +53
System.Web.Http Context.GetConf ig(String name) +104
System.Web.Conf iguration.HttpC apabilitiesBase .GetConfigCapab ilities(String
configKey, HttpRequest request)
System.Web.Http Request.get_Bro wser()
System.Web.UI.P age.CreateHtmlT extWriterIntern al(TextWriter tw,
HttpRequest request)
System.Web.UI.P age.CreateHtmlT extWriter(TextW riter tw)
System.Web.UI.P age.ProcessRequ estMain()


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.432 2.573;
ASP.NET Version:1.1.432 2.573
Nov 18 '05 #1
2 2561
The grey login box pops up when you have basic authentication enabled in
IIS. You stop this by enabling Anonymous or using windows integrated auth.
Is this the article you were using?
306158 INFO: Implementing Impersonation in an ASP.NET Application
http://support.microsoft.com/?id=306158

Thank you,
John Soulis
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 18 '05 #2
Thanks John,
I figured out what the problem was. The physical directory did not
have NTFS permissions to Modify and Write for Everyone.

What I am trying to do is use Forms Authentication and use the
credentials provided by the user to validate against the Windows
account and impersonate that user.

This however is causing me another problem (see listing under
Impersonation over multiple pages) which I am trying to fix now.
Regards,
Nasrudin.
Nov 18 '05 #3

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

Similar topics

0
1156
by: TheBurgerMan | last post by:
Hi all. I am getting an Impersonation failure in my application. I have attached the stack trace, but it seems to be coming from inside .NET where I cannot debug! I know I am being authenticated as I am getting an WindowsImpersonationContext. However, I tried to WindowsIdentity.GetCurrent().Name but I get Access is denied. I can do the WindowsIdentity before the Impersonate and it works great!
1
3964
by: techfuzz | last post by:
I'm posting my problem experience and solution I found here for other ASP.NET developers. I have a web application that uses Forms Authentication with Active Directory to control access. In this web application, I have search page that utilizes the Windows Indexing Service (MSIDXS provider). For reasons I'm not aware of at this time, setting <identity impersonation="true" /> in the web.config causes an error whenever you try to search.
0
976
by: Elliot M. Rodriguez | last post by:
I have a web app that uses Crystal Reports 8.5 along with VB.Net. When attempting to access reports by a UNC file share path, I was getting access denied errors. I solved this problem eventually by running the aspnet process as a Domain Admin account (changed the processModel attribute in machine.config). I tried running the code block using impersonation as the same account, yet I continued to get Access Denied errors, even on...
1
6136
by: Edward Yang | last post by:
I setup web.config with impersonation="true". On our local server the project works great. I did the same procedures on our staging server, but it failed with an impossible error: Server Error in '/' Application. -------------------------------------------------------------------------------- Access denied to 'C:\Inetpub\wwwroot\myapp\default.aspx'. Failed to start monitoring file changes. Description: An unhandled exception occurred...
3
2687
by: cjk | last post by:
Issue Our web application requires access to write to a custom event log, yet access is denied. This access is denied because we are using impersonation, and our end-users do not (should not) have permissions to write to a custom event log. We would like to know if someone out there has resolved this problem without incorporating registry hacks, elevating end-user account permissions to admin OR calling native code to logon as the account...
0
933
by: Jim Heavey | last post by:
I am trying to use impersonation. I created a seperate folder in my application where I have placed any screen that I want to invoke impersonation on. I created a webconfig file with the appropriate account and password information. When I navigate to this screen, I originally received an Access Denied error for the Temporary ASPNet folder under the Framework version for the ID I was using for impersonation. I added this ID to be able...
0
1272
by: velvet.graham | last post by:
I'm having a difficult time with impersonation. I've created an impersonation class. Here is the code below: ******Impersonation Class Code********* Imports System Imports System.Web.Security Imports System.Runtime.InteropServices Imports System.Security.Principal Imports System.DirectoryServices Imports System.Security.Permissions
0
2284
by: Elroyskimms | last post by:
I need to execute a batch file via ASP.Net. In my VB.Net code, I'm using System.Diagnostics.Process to call the batch file and its appropriate command line arguments. I'm using System.Diagnostics.Process.StandardError and System.Diagnostics.Process.StandardOutput to capture and view the output and error messages. My web.config file has the following: <identity impersonate="true" userName="administrator" password="password" />
0
1095
by: Xexon | last post by:
Hey all, I hope someone out there has got a solution to this rather irritating problem :) Ok here it goes... I have a Web App that does 2 things. It uploads word-document files to a folder on my server, scans them with a virus-scanner and then using the office dll's I extract the contents of the document and put it in my database to be able to search through it. The Virus-Scan part works just great, but the Word thing troubles me a bit. I...
0
9699
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...
1
10282
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9111
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
7598
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
6838
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
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
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
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.