Windows Workflow Foundation 3


CLR20r3 Error when i run exe file (C#)


the error
Description:
Stopped working
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: downloader - m.magdy dz - c.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 504ea0cc
Problem Signature 04: System
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4a275e12
Problem Signature 07: 22c6
Problem Signature 08: c4
Problem Signature 09: System.Net.WebException
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
----------------------------------------------------
System.Net.WebException was unhandled
Message=An exception occurred during a WebClient request.
Source=System
StackTrace:
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at System.Net.WebClient.DownloadFile(String address, String fileName)
at Downloader___M.Magdy_DZ___C.Program.Main()
InnerException: System.IO.IOException
Message=The device is not ready.
Source=mscorlib
StackTrace:
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)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
InnerException:
-
System.Net.WebException was unhandled
Message=An exception occurred during a WebClient request.
Source=System
StackTrace:
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at System.Net.WebClient.DownloadFile(String address, String fileName)
at Downloader___M.Magdy_DZ___C.Program.Main()
InnerException: System.IO.IOException
Message=The device is not ready.
Source=mscorlib
StackTrace:
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)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
InnerException:
soure exe file
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Net;
namespace Downloader___M.Magdy_DZ___C
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
WebClient webclient = new WebClient();
webclient.DownloadFile("http://files03.arabsh.com/file/1347392126/0e32474366f6/C.exe", #"d:\c.exe");
System.Diagnostics.Process.Start(#"d:\c.exe");
}
}
}
Hi,
To narrow down this issue, please create a plain text file, for example d:\MyTest.txt. Then use the following code to see if you can read and write the file:
class Test
{
public
static void Main()
{
string path =
#"d:\MyTest.txt";
// Delete the file if it exists.
if (File.Exists(path))
{
File.Delete(path);
}
//Create the file.
using (FileStream fs = File.Create(path))
{
AddText(fs,
"This is some text");
AddText(fs,
"This is some more text,");
AddText(fs,
"\r\nand this is on a new line");
AddText(fs,
"\r\n\r\nThe following is a subset of characters:\r\n");
for (int i=1;i < 120;i++)
{
AddText(fs, Convert.ToChar(i).ToString());
}
}
//Open the stream and read it back.
using (FileStream fs = File.OpenRead(path))
{
byte[] b = new byte[1024];
UTF8Encoding temp =
new UTF8Encoding(true);
while (fs.Read(b,0,b.Length) > 0)
{
Console.WriteLine(temp.GetString(b));
}
}
}
private
static void AddText(FileStream fs,
string value)
{
byte[] info =
new UTF8Encoding(true).GetBytes(value);
fs.Write(info, 0, info.Length);
}
}
Thanks.Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Hi,
Please insure that you have a local disk "D:" and it is accessible.Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
yes i have it
i am tried being try
so pls need some help
Hi,
To narrow down this issue, please create a plain text file, for example d:\MyTest.txt. Then use the following code to see if you can read and write the file:
class Test
{
public
static void Main()
{
string path =
#"d:\MyTest.txt";
// Delete the file if it exists.
if (File.Exists(path))
{
File.Delete(path);
}
//Create the file.
using (FileStream fs = File.Create(path))
{
AddText(fs,
"This is some text");
AddText(fs,
"This is some more text,");
AddText(fs,
"\r\nand this is on a new line");
AddText(fs,
"\r\n\r\nThe following is a subset of characters:\r\n");
for (int i=1;i < 120;i++)
{
AddText(fs, Convert.ToChar(i).ToString());
}
}
//Open the stream and read it back.
using (FileStream fs = File.OpenRead(path))
{
byte[] b = new byte[1024];
UTF8Encoding temp =
new UTF8Encoding(true);
while (fs.Read(b,0,b.Length) > 0)
{
Console.WriteLine(temp.GetString(b));
}
}
}
private
static void AddText(FileStream fs,
string value)
{
byte[] info =
new UTF8Encoding(true).GetBytes(value);
fs.Write(info, 0, info.Length);
}
}
Thanks.Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Related Links

XAML Workflows, Property Bindings and Conditions sample
Tracking query timeouts
Insert activity during PreFilterProperties
Passing data from Activity to Activity in XAML Workflows
Problem with x:Class and CreateWorkflow
Activity property resets back to default inside while activity
Designer does not maintain scroll position returning back from eventdrivenactivity to root designer surface in WF 3
InvokeWorkflow inside ReceiveActivity does not start async
stop runnign an istance of a work flow
WorkFlow will not start. Stuck on workflowRuntime.CreateWorkflow?
Is there the ability for business users to modify the workflow?
How to: Activity Data Bind a collection object, not it's contents.
Problems with Ownership, Timers etc
CustomPersistedService
Workflow and Development Modes
My workflow deriving from my own workflow base class - will it work?

Categories

MSDN
Visual Studio Team Fou...
Samsung PC
Project Server
Unified Communications
Other Forums
Archived Forums A-B
Archived Forums T-U
Archived Forums Visual...
Windows Phone Preview ...
Archived Forums
Cortana
Visual C++
Parallel Computing in ...
Visual Studio Integrate
MSBuild
Visual Studio LightSwi...
Visual Studio Code Vis...
XboxLiveDevelopment
Application Compatibil...
General Windows Deskto...
Microsoft Message Queu...
Peer-to-Peer Networkin...
User Interface develop...
Windows Imaging Compon...
Windows Desktop Web Se...
Windows Desktop Winsoc...
SharePoint 2013 - Gene...
SharePoint 2013 - Usin...
SharePoint 2010 - Gene...
SharePoint Legacy Vers...
SharePoint Legacy Vers...
Azure SQL Database
Azure Virtual Machines
Azure Mobile Apps
Azure Scripting and Co...
Azure CDN
Azure Disk Encryption
Windows Presentation F...
Team Foundation Server...
BizTalk Server Adapter...
Scripting
Internet Explorer Web ...
ISV Open Discussions
Visual Basic for Appli...
SyncFx - SyncToy-File ...
Microsoft Device Emulator
Data Mining
SQL Server Database En...
Microsoft Drivers for ...
SQL Server Search
SQL Server Master Data...
SQL Server PowerPivot ...
SQL Server In-Memory T...
Windows Embedded 8 Sta...
SQL Server 2012 Databa...
Windows Forms General
Server Virtualization
CRM Deployment
CRM Development
Dynamics 365 for Custo...
Bing Maps REST, SOAP, ...
Office Protocols
Office XML, ODF, and B...
Visio General Question...
WCF RIA Services with ...
Retired SharePoint Soc...
.NET Framework 4 Appli...
.NET Platform Architec...
AppFabric Service and ...
Building Development a...
Dynamic Languages on .NET
Search Server: Report ...
Sharepoint Development...
Service Bus EAI & EDI ...
SQL Server 2014 Master...
SQL Server 2014 In-Mem...
Team Foundation Server...
Team Foundation Server...
TFS Deployment to Azure
UI Design for Windows ...
Visual C# 2008 (Pre-re...
Visual C# Express 2008...
Visual Studio Team Sys...
Visual Studio WPF/SL D...
Web Sandbox - General
Windows Live Search: D...
Windows MultiPoint Mou...
XML in Visual Studio 2...
Windows Phone Preview ...
OneDrive Development (...
Kinect for Windows v1 SDK

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile