Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ali - 28 Sep 2007 20:21 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.