小编Kyl*_*son的帖子

模仿Windows用户

我正在使用代码来模拟用户帐户以访问文件共享.

public class Impersonator :
    IDisposable
{
    #region Public methods.
    // ------------------------------------------------------------------

    /// <summary>
    /// Constructor. Starts the impersonation with the given credentials.
    /// Please note that the account that instantiates the Impersonator class
    /// needs to have the 'Act as part of operating system' privilege set.
    /// </summary>
    /// <param name="userName">The name of the user to act as.</param>
    /// <param name="domainName">The domain name of the user to act as.</param>
    /// <param name="password">The password of the user to act as.</param> …
Run Code Online (Sandbox Code Playgroud)

c# windows impersonation

11
推荐指数
1
解决办法
2万
查看次数

YouTube直接上传 - OutOfMemory异常

每当我尝试使用YouTube API通过直接上传来上传大型视频时.我得到一个OutOfMemory异常.有什么办法可以摆脱这个吗?YouTube API没有说明使用直接上传的视频大小限制.

我放弃了直接上传.现在我尝试了可恢复的上传方式.我的代码如下.

YouTubeRequest request;
YouTubeRequestSettings settings = new YouTubeRequestSettings("YouTube Upload", Client Key, "Username", "Password");
request = new YouTubeRequest(settings);
Video newVideo = new Video();

ResumableUploader m_ResumableUploader = null;
Authenticator YouTubeAuthenticator;

m_ResumableUploader = new ResumableUploader(256); //chunksize 256 kilobyte
m_ResumableUploader.AsyncOperationCompleted += new AsyncOperationCompletedEventHandler(m_ResumableUploader_AsyncOperationCompleted);
m_ResumableUploader.AsyncOperationProgress += new AsyncOperationProgressEventHandler(m_ResumableUploader_AsyncOperationProgress);

YouTubeAuthenticator = new ClientLoginAuthenticator("YouTubeUploader", ServiceNames.YouTube, "kjohnson@resoluteinnovations.com", "password");

//AtomLink link = new AtomLink("http://uploads.gdata.youtube.com/resumable/feeds/api/users/uploads");
//link.Rel = ResumableUploader.CreateMediaRelation;
//newVideo.YouTubeEntry.Links.Add(link);

System.IO.FileStream stream = new System.IO.FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read);

byte[] chunk = new byte[256000];int count = 1;
while (true) { …
Run Code Online (Sandbox Code Playgroud)

c# windows-services youtube-api

6
推荐指数
1
解决办法
623
查看次数

Apple开发者证书

我想把我的iPhone应用程序放在测试设备上.我读到了需要开发人员证书的地方.我是否需要参与付费开发人员计划才能创建开发人员证书和配置文件?

ios

4
推荐指数
1
解决办法
3871
查看次数

你能用EF 4和MVC 2吗?

我做任何编码已经有6个月了.技术的生命.铅.快速问题 - 我可以使用EF 4和MVC 2吗?或者我是否必须升级到MVC 3?

asp.net-mvc entity-framework asp.net-mvc-3 asp.net-mvc-2

-2
推荐指数
1
解决办法
62
查看次数