Wednesday, March 21, 2012
Permissions for website on localhost
s
user control which displays a list of all files in a folder on the client
machine.
When I run the webapp I obviously get an error message saying that the .net
framework wont allow permissions to do such a thing.
Can anyone tell me how I can set permissions on my machine so that I can run
this ?Have you defined the permissions in the IIS website properties?
Thats not the problem.
Its the client. I must set up the .net framework to accept any actions
coming from this URL. It must allow my dll to perform whatever it wants on
the client machine.
It just so happens that its on localhost at the moment.
Start here:
http://msdn.microsoft.com/library/d...esssecurity.asp
I have gone in to the .net configuration manager and set the URL as trusted
but still no joy.
To be honest, I'm not sure if this is even possible--at least, without
extensive work.
ASP.NET code executes on the server, and as such, that is all it has
access to.
In addition, JavaScript is restricted from accessing the file system,
so that rules that out.
The only way I could imagine being able to access the client's file
system is to create an ActiveX control that the clients would have to
download and install, and that code would have to be trusted on the
client machine.
You may be better off to re-evaluate the architecture of your
application--does it really need this functionality? If the answer is
yes, you should probably look into developing a windows forms/smart
client.
What exactly are you trying to do, anyway? Why would a user go to your
website to navigate the files on his local machine?
Permissions for website on localhost
user control which displays a list of all files in a folder on the client
machine.
When I run the webapp I obviously get an error message saying that the .net
framework wont allow permissions to do such a thing.
Can anyone tell me how I can set permissions on my machine so that I can run
this ?Have you defined the permissions in the IIS website properties?
Thats not the problem.
Its the client. I must set up the .net framework to accept any actions
coming from this URL. It must allow my dll to perform whatever it wants on
the client machine.
It just so happens that its on localhost at the moment.
Start here:
http://msdn.microsoft.com/library/d...esssecurity.asp
I have gone in to the .net configuration manager and set the URL as trusted
but still no joy.
To be honest, I'm not sure if this is even possible--at least, without
extensive work.
ASP.NET code executes on the server, and as such, that is all it has
access to.
In addition, JavaScript is restricted from accessing the file system,
so that rules that out.
The only way I could imagine being able to access the client's file
system is to create an ActiveX control that the clients would have to
download and install, and that code would have to be trusted on the
client machine.
You may be better off to re-evaluate the architecture of your
application--does it really need this functionality? If the answer is
yes, you should probably look into developing a windows forms/smart
client.
What exactly are you trying to do, anyway? Why would a user go to your
website to navigate the files on his local machine?
Perplexing Problem
I've got a page that displays a java applet written by an external company (basically displays a mapping application).
I need to be able to take snapshots of these maps and save them in an image format up to the server.
The applets allows me to copy the current view of the map to the clipboard. No problem there - I have coded a button on the form to do this. The button then sends the browser to another page in which I want to save the contents of the clipboard to an image file and upload it to the server.
The Clipboard.GetDataObject returns null however. I guess it's because the image object on the clipboard was not placed there by my ASP.NET app, but by the Java applet.
Does anybody have any idea how I can achieve this?
TIA.I have done a similar type project. Below is the code I used. The clipboard is the clipboard be it from ASP or Java.
Dim data As IDataObject
data = Clipboard.GetDataObject()
Dim bmap As Bitmap
If data.GetDataPresent(GetType(System.Drawing.Bitmap)) Then
Try
bmap = CType(data.GetData(GetType(System.Drawing.Bitmap)), Bitmap)
Catch
Beep()
edSysMessage.Text = "Error capturing photo."
End Try
Else
Beep()
edSysMessage.Text = "No image to capture."
End If