TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
515
46.4k
About Download code in mvc
Aug 3 2020 8:07 AM
hello Everyone,
Hope everyone is fine.
I am working in mvc and sql database.I am using following code to download a file, but it is giving "An exception occurred during a WebClient request" error or Sometimes "Given path format not supported" error.
The file is stored on Azure Storage and so it has online file url.
string remoteUri = "https://[Storagename].blob.core.windows.net/[ContainerName]/";
string fileName = [FileName], myStringWebResource = null;
// Create a new WebClient instance.
WebClient myWebClient = new WebClient();
// Concatenate the domain with the Web resource filename.
myStringWebResource = remoteUri + [FileName];
Console.WriteLine("Downloading File \"{0}\" from \"{1}\" .......\n\n", [FileName], myStringWebResource);
// Download the Web resource and save it into the current filesystem folder.
myWebClient.DownloadFile(myStringWebResource, fileName);
Reply
Answers (
3
)
No DbContext was found in assembly. Ensure you using correct
How to resolve this issue when email is not verified?