all groups > dotnet distributed apps > june 2006 >
You're in the

dotnet distributed apps

group:

64-bit Platform Error: "incorrectly aligned or overlapped" Updater


64-bit Platform Error: "incorrectly aligned or overlapped" Updater lissbpp
6/19/2006 7:55:02 AM
dotnet distributed apps:
Hello,
I tried posting this message on the Updater message board however I have
not received any response.

The following message is received from the Updater application block while
performing an update on a 64-bit install of the framework:

"Could not load type
'Microsoft.ApplicationBlocks.Updater.Downloaders.BG_BASIC_CREDENTIALS' from
assembly 'Microsoft.ApplicationBlocks.Updater.Downloaders, Version=2.0.1.0,
Culture=neutral, PublicKeyToken=null' because it contains an object field at
offset 4 that is incorrectly aligned or overlapped by a non-object field. "

This message is the result from the following code from the BitInterop class:

/// <summary>
/// The BG_AUTH_CREDENTIALS_UNION union identifies the credentials to use
for the authentication scheme specified in the BG_AUTH_CREDENTIALS structure.
/// </summary>
[StructLayout(LayoutKind.Explicit, Size=8, Pack=4)]
internal struct BG_AUTH_CREDENTIALS_UNION
{
/// <summary>
/// Identifies the user name and password of the user to authenticate. For
details, see the BG_BASIC_CREDENTIALS structure.
/// </summary>
[FieldOffset(0)]
public BG_BASIC_CREDENTIALS Basic;
}

/// <summary>
/// The BG_BASIC_CREDENTIALS structure identifies the user name and
password to authenticate.
/// </summary>
[StructLayout(LayoutKind.Explicit, Size=8, Pack=4)]
internal struct BG_BASIC_CREDENTIALS
{
/// <summary>
/// Null-terminated string that contains the user name to authenticate.
The user name is limited to 300 characters, not including the null
terminator. The format of the user name depends on the authentication scheme
requested. For example, for Basic, NTLM, and Negotiate authentication, the
user name is of the form "domain\user name" or "user name". For Passport
authentication, the user name is an e-mail address. If NULL, default
credentials for this session context are used.
/// </summary>
[FieldOffset(0)]
[MarshalAs(UnmanagedType.LPWStr)]
public string UserName;

/// <summary>
/// Null-terminated string that contains the password in clear-text. The
password is limited to 300 characters, not including the null terminator. The
password can be blank. Set to NULL if UserName is NULL. BITS encrypts the
password before persisting the job if a network disconnect occurs or the user
logs off.
/// </summary>
[FieldOffset(4)]
[MarshalAs(UnmanagedType.LPWStr)]
public string Password;
}

Does anyone have any idea why I'm getting this error on a 64-bit machine?

thanks,
-brett
Re: 64-bit Platform Error: "incorrectly aligned or overlapped" Updater hjkimbrough NO[at]SPAM gmail.com
6/27/2006 8:20:13 PM
Brett - I'm having the exact same issue with VS2005/.Net 2.0/EntLib Jan
2006/UAB 2.0 for .Net 2.0. Ran across this last night and traced to
the same source of the error that you did. I set up an identical
environment under a 32-bit installation and did not experience the
problem.

Jacob
---


[quoted text, click to view]
AddThis Social Bookmark Button