>>Bugs>>
[Fixed in 1.2.8 and 1.1.15] Login Failure When Using Windows Impersonation
|
|
|
|
Author
|
[Fixed in 1.2.8 and 1.1.15] Login Failure When Using Windows Impersonation
|
guest
Total Posts:
 |
Login Failure When Using Windows Impersonation
8/14/2006 10:39:29 PM
When using windows Impersonation, for asp.net application for File Upload we are getting this error
we are using impersonation in the main page which has progress bar in it . We are using the Moveto Method
and we are undo ing the impersonation as soon we are done with it .Any help to solve this would be grealty aprreciated .
Thanks again for any input .
We changed the
public override string GetKnownRequestHeader (int index)
{
if (index == HttpWorkerRequest.HeaderContentLength)
{
ParseMultipart();
return preloadedEntityBody.Length.ToString();
}
return OrigWorker.GetKnownRequestHeader (index);
}
Logon failure: unknown user name or bad password.
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.IO.IOException: Logon failure: unknown user name or bad password.
Source Error:
Line 77: public override bool IsUploaded
Line 78: {
Line 79: get { return (TmpFile != null && (TmpFile.Length > 0 || FileName.Length > 0)); }
Line 80: }
Line 81:
Source File: c:\development\neatupload\filesystemuploadedfile.cs Line: 79
|
|
Dean Brettle
Total Posts:
2015
 |
Re: Login Failure When Using Windows Impersonation
8/15/2006 8:42:54 AM
The account being impersonated needs to have read/write access to the temp directory (defaults to the system temp dir). Does the account have those permissions?
Did a stacktrace accompany the error message?
--Dean
|
|
guest
Total Posts:
 |
Re: Login Failure When Using Windows Impersonation
8/15/2006 9:51:43 AM
this error happens only when we have try to undo the impersonation example : impersonateduser.undo(); this statement triggers the error |
|
guest
Total Posts:
 |
Re: Login Failure When Using Windows Impersonation
8/15/2006 10:03:04 AM
Here is the full stack trace
Source File: c:\development\thirdparty\neatupload-1.2.1\filesystemuploadedfile.cs Line: 79
Stack Trace:
[IOException: Logon failure: unknown user name or bad password.
]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +723
System.IO.FileInfo.get_Length() +34
Brettle.Web.NeatUpload.FilesystemUploadedFile.get_IsUploaded() in c:\development\thirdparty\neatupload-1.2.1\filesystemuploadedfile.cs:79
Brettle.Web.NeatUpload.UploadContext.get_NumUploadedFiles() in c:\development\thirdparty\neatupload-1.2.1\uploadcontext.cs:148
Brettle.Web.NeatUpload.ProgressPage.SetupContext() in C:\Development\ThirdParty\NeatUpload-1.2.1\ProgressPage.cs:219
Brettle.Web.NeatUpload.ProgressPage.OnLoad(EventArgs e) in C:\Development\ThirdParty\NeatUpload-1.2.1\ProgressPage.cs:140
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
|
|
guest
Total Posts:
 |
Re: Login Failure When Using Windows Impersonation
8/15/2006 10:09:33 AM
The temp folder has full rights to the imperosonated user .Is there any way in the main page to findout whether the upload has been completed successfully or not so that undo can be done after that .
thanks again for your support. |
|
Dean Brettle
Total Posts:
2015
 |
Re: Login Failure When Using Windows Impersonation
8/15/2006 10:39:19 AM
Looks like the error is occuring while handling a request for the page that updates the progress bar. By default, that is NeatUpload/Progress.aspx. Are you using Windows impersonation for that page too or are you using the <location> element to only do windows impersonation to your main page?
Actually, there are a variety of ways to do impersonation in ASP.NET. Can you email me (dean at brettle dot com) a small test app (including the Web.config) that reproduces the problem.
Also, what version of .NET you are using?
Lastly, does upgrading to NeatUpload-1.2.7 help at all? If nothing else, upgrading will mean you don't need to make the change to GetKnownRequestHeader() that you mentioned.
--Dean
|
|
guest
Total Posts:
 |
Re: Login Failure When Using Windows Impersonation
8/15/2006 12:09:57 PM
I send you an email with a test app , we are using .net version 1.1
We are using impersonation only in the main upload page not in the progress.aspx .
Thank You for your quick response |
|
Dean Brettle
Total Posts:
2015
 |
Re: [Fixed in 1.2.8 and 1.1.15] Login Failure When Using Windows Impersonation
8/16/2006 3:44:39 PM
This turned out to be a bug and was fixed as of NeatUpload 1.2.8. The fix was also backported to NeatUpoad 1.1.15.
--Dean |
|