By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Question about connecting client programs to Sql server 2005 running on local area network

P: n/a
ali
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

Sep 28 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ali,
this may help you
http://forums.microsoft.com/MSDN/Sho...04767&SiteID=1

Regards,
Husam Al-A'araj
www.aaraj.net

"ali" wrote:
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

Sep 28 '07 #2

P: n/a
ali
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.
Sep 29 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.