Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find file 'C:\Program Files (x86)\IIS Express\*.*' #6

Open
randy-xiang opened this issue Dec 5, 2016 · 4 comments
Open

Comments

@randy-xiang
Copy link

Hi, I met below problem while running this example. Can anyone give me a hint ?

An error occurred while processing your request: Could not find file 'C:\Program Files (x86)\IIS Express\ascii.gif'.

Stack Trace
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.BeginUploadFromFile(String path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, Object state) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlockBlob.cs:line 837 at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.BeginUploadFromFile(String path, FileMode mode, AsyncCallback callback, Object state) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlockBlob.cs:line 818 at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.TaskFromVoidApm[T1,T2](Func5 beginMethod, Action1 endMethod, T1 arg1, T2 arg2, CancellationToken cancellationToken) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:line 192 at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.UploadFromFileAsync(String path, FileMode mode, CancellationToken cancellationToken) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlockBlob.cs:line 922 at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.UploadFromFileAsync(String path, FileMode mode) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlockBlob.cs:line 909 at WebApp_Storage_DotNet.Controllers.HomeController.d__4.MoveNext() in D:\WorkSpace\NetProjects\CrossPlatform\storage-blobs-dotnet-webapp-master\WebApp-Storage-DotNet\Controllers\HomeController.cs:line 114

@randy-xiang
Copy link
Author

I solved this issue by using object <HttpPostedFileBase> and function <UploadFromStreamAsync> in file HomeController.cs function public async Task UpdateAsync

@spmoran-blazor
Copy link

It's been a year and a half and this issue still exists. Does anyone maintain these projects?

@simonki
Copy link

simonki commented May 25, 2018

Instead of:
CloudBlockBlob blob = blobContainer.GetBlockBlobReference(GetRandomBlobName(files[i].FileName)); await blob.UploadFromFileAsync(files[i].FileName, FileMode.Open);
Try:
var source = files[i].InputStream; CloudBlockBlob blob = blobContainer.GetBlockBlobReference(GetRandomBlobName(files[i].FileName)); await blob.UploadFromStreamAsync(source);

@ghost
Copy link

ghost commented Jun 18, 2018

Someone has also created a PR to fix this issue: #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants