The following WebForm2.aspx is to create a text file on client machine.
If I want to let WebForm2.aspx execute, client IE's setting must be set LOW
security,
and IE will show a dialog to ask users if it is allowed to run ActiveX
Controller.
But IE Browser's default security setting isn't low security.
So, if users execute this web page, it will have a scripting error
(Automation couldn't produce the object.)
Is there any ways that can solve this situation
(When client's IE security setting isn't low security,
and we don't want to let users see the scripting error) ?
--------------------
WebForm2.aspx:
--------------------
<html>
<head>
<title>WebForm2</title>
</head>
<script language="javascript">
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\testfile.txt", true);
a.WriteLine("This is a test.");
a.Close();
</script>
<body>
</body>
</html>
"ja**********@gmail.com" wrote:
First of all, an ASP.Net Web application can't do ANYTHING on the
client computer, since it only runs on the server. The best that it
could do, is to include some javascript on the page.
Javascript, in theory, could create a local file and upload a file to a
server, but these abilities are normally disabled by the brower as a
security measure.