I have a program that has hand written database connections and
DataGridView that connects to my database on sql server
using computer's name .this works fine locally BUT problem occures
when running my app on local area network
causes this exception
" Application attempted to perform an operation not allowed by the
security policy. to grant this application the required
permission,
contact your system administrator, or use the Microsoft .net
framework
configuration tool
...
Request for the permission of type
system.Data.SqlClient."
I tried to granting permission using Microsoft .net configuration
tool on control panel
I set full trust for local interanet and then unchecking publisher
policy for some key assemblies including
System.Data
I set my application's security to full trust on visual studio env and
this also has no effect
so anyone can help me to connect my sql server through my application
on local area network .
any suggest appreciated
I use "Visual studio 2008" and "Sql server 2005 professional edition "
thanks
Husam Al-A''araj - 28 Sep 2007 23:01 GMT
ali,
this may help you
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=604767&SiteID=1
Regards,
Husam Al-A'araj
www.aaraj.net
> I have a program that has hand written database connections and
> DataGridView that connects to my database on sql server
[quoted text clipped - 24 lines]
> I use "Visual studio 2008" and "Sql server 2005 professional edition "
> thanks
ali - 29 Sep 2007 21:52 GMT
thanks for your very very useful link Husam.I found my way .this is
summery of one should do for connecting sql on local intranet
1- use sql surface area manager to enable network protocols such as
tcp/ip and named pipes
2- add your program in server computer to exceptions list of firewall
for remote connection
3- in client computers enable full_trust for local interanet zone for
your program using Microsoft .Net configuration manager in control
panel or use caspol program in .net framework installed folder
Example: CasPol.exe -m -ag 1.2 -url file://Network_PC_Name/Share_Name/*
FullTrust
you can use caspol for installation purpose instead of forcing
users to enable it from control panel
my application works fine.