how can my app access files even when run from web?

  • Thread starter Thread starter assaf
  • Start date Start date
A

assaf

shi all

my app is available to be run
directly from the web.
however, it needs to access files.

when a file access is attempted,
the user gets a message box from the security policy.
'the operation required the SecurityException'.

is there any way that the user
can allow the application access to the file?


assaf
 
hi jason

of course this helps.
but my question is:
isn't it possible to just pop up a message box,
asking the user to click a button thereby
allowing the app to access files.

isn't this the way java apps used to access files?


i really dont' want to bother my clients to
have to change the security settings in their
IE or computer.

i just want my app to ask
the 'policy manager' to pop up an app
and have the user OK this.

i don't want to bother my clients to read through docs...

i mean, all that the app is trying to do
is simply write a configuratio file
into the user's AppData directory.
and after that open a socket for communications.

why can't the app ask the policy
ask the user to ok this
very benign act?


assaf
 
This is an issue with the client's .NET CAS (Code Access Security) settings.
I'm assuming your application has a strong name and is being retrieved via
one-click deployment using IE. Now, you just got to get the clients to trust
your application.

There's a few things the client could do:
1. In IE, Tools > Internet Options, select the Security tab, select Trusted
sites, then click the "Sites..." button and add your site to the list. Of
course, this may/may not get rid of the error depending on the client's CAS
setting for "Trusted sites"
2. Start > Programs > Administrative Tools > Microsoft Framework 1.1
Wizards, select "Trust an Assembly" and then follow the wizard's prompts to
trust the application. Using this setup the client can choose to trust this
application, or all applications using the same key (used to give the app a
strong name).

Hope that helped.
 
Have you considered having an installer for download as a workaround ? Or is
that out-of-the-question ?

O:]
 
hi angelos

i allow users to download and install my app.
however, it is much better if the user
would be able to click-run my app.

i know that this is possible in java.
where the user is told at app start-up,
that the app wants to access files.

i really hope that this feature is available in .NET.
it means a world of difference to me.


assaf
http://www.CipherChats.Com



Angelos Karantzalis said:
Have you considered having an installer for download as a workaround ? Or is
that out-of-the-question ?

O:]


assaf said:
hi jason

of course this helps.
but my question is:
isn't it possible to just pop up a message box,
asking the user to click a button thereby
allowing the app to access files.

isn't this the way java apps used to access files?


i really dont' want to bother my clients to
have to change the security settings in their
IE or computer.

i just want my app to ask
the 'policy manager' to pop up an app
and have the user OK this.

i don't want to bother my clients to read through docs...

i mean, all that the app is trying to do
is simply write a configuratio file
into the user's AppData directory.
and after that open a socket for communications.

why can't the app ask the policy
ask the user to ok this
very benign act?


assaf


to
trust client's
CAS prompts
to trust
this app
 
i allow users to download and install my app.
however, it is much better if the user
would be able to click-run my app.

i know that this is possible in java.
where the user is told at app start-up,
that the app wants to access files.


I think you are saying "Java Web Start".
i really hope that this feature is available in .NET.
it means a world of difference to me.

There is a "ClickOnce" Deployment in VisualStudio 2005 and Dotnet 2.0.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/clickonce.asp

I think it is quite similar to "Java Web Start".


Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk
 
looks great.

how can i get Visual Studio 2005?
with out paying!

i am currently using the
Visual Studio 2003 evaluation version.
is there a 'parallel' version for 2005?

is .NET 2.0 available to the public?


assaf
 
Back
Top