It does really look like a Code Access Security problem, since the
application runs correctly from the local PC but fails when run from the
server, which by default would give it greatly reduced permissions.
The text of the exception should give you more detailed information about
exactly which permission you are missing. As a test, I would suggest that
you go to the Administrative Tools in Control Panel and use the .NET
Framework Configuration tool to assign Full Trust to your assemblies (the
..exe and dll's of your program). If the program runs correctly under Full
Trust (it should) you can then trim down the permissions until you grant the
minimum needed.
Once you have established a correct security configuration, you can then use
the same .NET Framework Configuration tool to generate a .msi that will set
those permissions when run in any other computer. You will have to
distribute and execute the .msi on all the computers in your network that
require access to the application that you are sharing in your server. You
can, for instance, set a policy that says "grant Full Trust to all
assemblies loaded from Server X", or "grant Full Trust to all assemblies
signed with this Key" (and sign with that key your deployed assemblies).
"Férnas" <ga*****@wideweb.com.brwrote in message
news:c2**********************************@d77g2000 hsb.googlegroups.com...
Hey all,
I have a URGENT problem and I hope someone could help me...
scenery:
I have a windows app, coded using C# (framework 1.1 - VS2003)... The
exe and dlls of the app is are stored in a server, and the clients
access this app through a shortcut that points to this. The folder of
the app is shared on the network. This app accesses a oracle database.
I'm using system.web.mail namespace..
The users/clients can access the app with no problem, everything ok.
But when I try to send mails, I get an exception...
When I'm debuging the app and running it local, the e-mail is sent,
but when I copy it to the server and access the app through the
network, i get the error...
So here are my question:
- What's the name given to this programming model (user/client
accessing exes on a server)?
- What are the requirements to accomplish this task according to this
programming model?
- Do the client pcs need something special to send the mail?
Thanks for your help and sorry for poor english.