473,320 Members | 2,145 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,320 software developers and data experts.

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.Current.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.HttpException: 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.ImpersonationSuspendContext.GetCurrentT oken() +215
System.Web.ImpersonationSuspendContext.Suspend() +53
System.Web.HttpContext.GetConfig(String name) +104
System.Web.Configuration.HttpCapabilitiesBase.GetC onfigCapabilities(String
configKey, HttpRequest request)
System.Web.HttpRequest.get_Browser()
System.Web.UI.Page.CreateHtmlTextWriterInternal(Te xtWriter tw,
HttpRequest request)
System.Web.UI.Page.CreateHtmlTextWriter(TextWriter tw)
System.Web.UI.Page.ProcessRequestMain()


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET Version:1.1.4322.573
Nov 18 '05 #1
2 2531
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
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...
1
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...
0
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...
1
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...
3
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...
0
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...
0
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...
0
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.