hi all
i used this below function to connect to sql server 2k
[SqlClientPermis sion (SecurityAction .Assert ,Unrestricted=t rue)]
private void button1_Click(o bject sender, System.EventArg s e)
{
try
{
SqlClientPermis sion myPerm = new SqlClientPermis sion(Permission State.Unrestric ted);
myPerm.Assert() ;
myPerm.AllowBla nkPassword=true ;
string str;
str= "data source=sniper;i nitial catalog=newzolf ;persist security info=False;user id=zolf;" +
"password=1;pac ket size=4096";
SqlConnection cnn=new SqlConnection(s tr);
SqlCommand cmd=new SqlCommand("sel ect * from article",cnn);
cnn.Open();
MessageBox.Show ("3");
DataSet ds=new DataSet();
MessageBox.Show ("4");
SqlDataAdapter da=new SqlDataAdapter( cmd);
MessageBox.Show ("5");
da.Fill(ds);
MessageBox.Show ("Sucess");
}
catch(Exception ex)
{
MessageBox.Show (ex.Message);
}
}
when run application on own computer work truly
but when copy the EXE file to shred folder this error accoured
Request for the permission of type System.Data.Sql Client.SqlClien tPermission, System.Data, Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9 failed.
why this error accour?
"i am used SqlClientPermis sion "
thanx in advance. 3 4497
mmb <my***@yahoo.co m> wrote:
<snip> Request for the permission of type System.Data.Sql Client.SqlClien tPermission, System.Data, Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9 failed.
why this error accour?
When you run code from the network, by default it won't be trusted as
much as purely local apps. If you want to change that, go into your
administrative tool for the computer and change the .NET configuration.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Thanx for your answe
but how can set .net SqlClientPermis sion in runtime
my code not wor
[SqlClientPermis sion (SecurityAction .Assert ,Unrestricted=t rue)
private void button1_Click(o bject sender, System.EventArg s e
tr
SqlClientPermis sion myPerm = new SqlClientPermis sion(Permission State.Unrestric ted)
myPerm.Assert() ;
myPerm.AllowBla nkPassword=true
string str
str= "data source=sniper;i nitial catalog=newzolf ;persist security info=False;user id=zolf;"
"password=1;pac ket size=4096"
SqlConnection cnn=new SqlConnection(s tr)
SqlCommand cmd=new SqlCommand("sel ect * from article",cnn)
cnn.Open()
MessageBox.Show ("3")
DataSet ds=new DataSet()
MessageBox.Show ("4")
SqlDataAdapter da=new SqlDataAdapter( cmd)
MessageBox.Show ("5")
da.Fill(ds)
MessageBox.Show ("Sucess")
catch(Exception ex
MessageBox.Show (ex.Message)
Thanx for your answe
but how can set .net SqlClientPermis sion in runtime
my code not wor
[SqlClientPermis sion (SecurityAction .Assert ,Unrestricted=t rue)
private void button1_Click(o bject sender, System.EventArg s e
tr
SqlClientPermis sion myPerm = new SqlClientPermis sion(Permission State.Unrestric ted)
myPerm.Assert() ;
myPerm.AllowBla nkPassword=true
string str
str= "data source=sniper;i nitial catalog=newzolf ;persist security info=False;user id=zolf;"
"password=1;pac ket size=4096"
SqlConnection cnn=new SqlConnection(s tr)
SqlCommand cmd=new SqlCommand("sel ect * from article",cnn)
cnn.Open()
MessageBox.Show ("3")
DataSet ds=new DataSet()
MessageBox.Show ("4")
SqlDataAdapter da=new SqlDataAdapter( cmd)
MessageBox.Show ("5")
da.Fill(ds)
MessageBox.Show ("Sucess")
catch(Exception ex
MessageBox.Show (ex.Message) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jay W NOjwalkerSPAM |
last post by:
I have some class objects each in separate projects that
belong to a solution. The projects reference one another
within that solution. The 'main' function calls the
other procedure/function (different projects) that
perform all the database work and manipulations to return
a dataset to the instantiating code. This solution works
without error.
I am trying to build another solution that will use those
same projects. The build is...
|
by: Dave |
last post by:
I have a ASP.net application that work fine with IIS 5.0. I'm trying to put
it on IIS 6.0.
And getting the following error.
ASP is enable
It is in a virtual directory - I also follow the direction in Microsoft
Knowledge Base Article - 320268
|
by: António Pinho |
last post by:
Hi,
I have a big problem with an webpart/assembly. i'm trying to connect to sql
server but i get the error "Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.". i've searched for
it and can't find a clear answer. but one thing i'm sure: permissions. if i
change the trust level in the web.config of the sharepoint portal...
|
by: mmb |
last post by:
hi all
i used this below function to connect to sql server 2k
private void button1_Click(object sender, System.EventArgs e)
{
try
{
SqlClientPermission myPerm = new SqlClientPermission(PermissionState.Unrestricted);
myPerm.Assert();
|
by: apramodk |
last post by:
environmnet : VB.NET (.Net 2.0)
I am trying run a windows application from a Network.
While connecting to SQL Server, I get the following error.
Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.
| |
by: goc |
last post by:
I have a Web Farm, that fetches its database-data from a separate
database-server. Today I was forced to go over to .NET 2.0 (since 1.1
can't be installed on Windows Vista x64), and it brought about quite
alot of problems. But now I've sorted out everything except one
problem that I just can't get to disappear:
As soon as I try to connect to a database from my code and run a
query, I get an exception thrown:
Check: Request for the...
|
by: sumguyb |
last post by:
I've written a Windows application using VB and Visual Studio 2005.
I've used the Data Application Block in the Microsoft Enterprise
Library 2.0 to make all of my SQL calls.
The application runs fine on my local machine but throws a CAS error
on client machines that says:
Request for the permission of type
System.Data.SqlClient.SqlClientPermission
|
by: sumguyb |
last post by:
I've written a Windows application using VB and Visual Studio 2005.
I've used the Data Application Block in the Microsoft Enterprise
Library 2.0 to make all of my SQL calls.
The application runs fine on my local machine but throws a CAS error
on client machines that says:
Request for the permission of type
System.Data.SqlClient.SqlClientPermission
|
by: JoaquimC |
last post by:
Hello all,
I've a C# application connecting to a SQL Server 2005 DataBase and it all works well in development ambient. I'm developing with Visual Studio 2005 and i can connect to the DataBase with no problem.
The problem is: when i try to run the application directly from the exe file, every time there is a connection to the same database (and with exactly the same connection string) that i connected with no problem in development...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |