How do I deploy my Win Form application to other computers on the network. I
tried "Build Solution" and "Build ProjectName", and then I run the exe out of
the bin folder and get the error about "not allowed by the security policy…..
Request for the permission of type System Data.SqlClient.SqlClientPermission,
System.Data…." : "
System.Security.SecurityException: Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelp er(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)"
My Win Form application connects to MS SQL 2000, the connection string is in
App.config file. 5 2649
Hi Mike,
if you are trying to run the exe from one computer when it is located on
the disk of another computer you could run into security issues by trying to
run an exe not located on the local disk.
The easiest thing would be to try copying the exe locally onto the remote
computer and then executing it.
Mark
"Mike L" wrote: How do I deploy my Win Form application to other computers on the network. I tried "Build Solution" and "Build ProjectName", and then I run the exe out of the bin folder and get the error about "not allowed by the security policy….. Request for the permission of type System Data.SqlClient.SqlClientPermission, System.Data…." : " System.Security.SecurityException: Request for the permission of type System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. at System.Security.CodeAccessSecurityEngine.CheckHelp er(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken)" My Win Form application connects to MS SQL 2000, the connection string is in App.config file.
Hi Cadel,
Thanks for your post.
Yes, .Net has the Code access security to only enforce partial trust for
network share application. And defautly, it does not give
SqlClientPermission for network share application.
We can run "Microsoft .NET Framework 1.1 Configuration" tool in the control
panel, then expand "Runtime Security Policy"->"Code Groups"->"All Codes",
right click this node, then select "New...". In the popup dialog, type a
code group name, press "Next", in the next dropdownlist, select "URL", in
the textbox input your Exe's URL, such as
"\\msjeff\temp\ComboBoxTest\ComboBoxTest\bin\Debug \XXX.exe" press "Next".
Select "Full Trust" permission set for this application. Then your network
share running application will have full trust permission on the
application.
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Worked local, but I want the exe on the fileserver, with 15 computers access
it.
So, if I need to make a change to my Win Form application, I can update the
exe in one place.
Will I have to go the the .Net security configuration for each computer?
""Jeffrey Tan[MSFT]"" wrote: Hi Cadel,
Thanks for your post.
Yes, .Net has the Code access security to only enforce partial trust for network share application. And defautly, it does not give SqlClientPermission for network share application.
We can run "Microsoft .NET Framework 1.1 Configuration" tool in the control panel, then expand "Runtime Security Policy"->"Code Groups"->"All Codes", right click this node, then select "New...". In the popup dialog, type a code group name, press "Next", in the next dropdownlist, select "URL", in the textbox input your Exe's URL, such as "\\msjeff\temp\ComboBoxTest\ComboBoxTest\bin\Debug \XXX.exe" press "Next". Select "Full Trust" permission set for this application. Then your network share running application will have full trust permission on the application.
Hope this helps.
Best regards, Jeffrey Tan Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Hi Cadel,
Thanks for your feedback.
Yes, I see your concern. However, this is the default CAS setting of any
machine installed .Net Framework. That is, defaultly, .Net does not trust
the Sql operation of network shared application. We have to explicit tell
the .Net to trust our application.
Because our Winform application runs with .Net code, we can not use .Net
code to config the CAS settings, or this will become a security hole.
Currently, I think we have 2 options:
1. Manually config all the client machines to trust our network shared
application
2. First use a bootstrapper unmanaged application to config the .Net
settings to trust our winform application. Then invoke our Winform
application to run.
For #2, to config the .Net settings, we can use CreateProcess API(or other
shell api) to invoke Caspol.exe to do the configuration. Caspol.exe is the
command line tool of .Net Security configuration snap-in. For more
information, please refer to the links below:
"Code Access Security Policy-Tool (Caspol.exe)" http://msdn.microsoft.com/library/de.../deu/cptools/h
tml/cpgrfCodeAccessSecurityPolicyUtilityCaspolexe.asp
"Using CasPol to Fully Trust a Share" http://blogs.msdn.com/shawnfa/archiv...30/344554.aspx
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Hi Cadel,
I am glad your problem is resolved. If you need further help, please feel
free to post. Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mary |
last post by:
I'm a newbie also. My app runs great on my PC. However, I don't want to run
it for everyone else which is what is happening now.
It's a pretty simple app, 1 windows form calls on 1 of 4 other...
|
by: Harry Simpson |
last post by:
I've got an Framework 1.0 app that generates reports using Crystal Reports.
It works fine when i deploy to a server that is fresh but if i deploy to a
server that already has some form of Crystal...
|
by: bob lambert |
last post by:
Help
I am trying to deploy to another pc a vb.net std 2002
windows form application. I am confused.
I created a project - windows form
I built form, compiled and debugged.
I created a...
|
by: alan |
last post by:
I've try to deploy my application by using Setup Wizard. But after I
build the setup application, it got a error said "unrecoverable
error!". I don't know what's the problem. In order to the what...
|
by: Frank |
last post by:
Hello,
I need some pointing in the right direction.
I have a working application, a main form and several subforms and classes.
I want the subforms and classes put together in a package so that...
|
by: AGP |
last post by:
I resisted for many years but I've just written my first app in .NET2005
and am looking to deploy my app with a third-party installer. ClickOnce
and the VS Installer do not meed my needs and I am...
|
by: Cirene |
last post by:
What is the best way to deploy a website created with VS 2008? (Now that
web deployment projects are delayed.)
I want to be able to modify the web.config file on the website.
Thanks!
|
by: =?Utf-8?B?QW5kcmV3X2QxMjM=?= |
last post by:
Here is my problem. I have an app that has over 9 web services. For years I
had not issues with clickonce but now it looks like the build is missing
XmlSerializers.dll.deploy. I did have this...
|
by: stephen |
last post by:
Hi,
I am using Click Once Deploy to deploy an application.(this application has
an .exe, .config, .xml files) and after deployment to a location, I checked
for the files and all the files are...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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,...
|
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...
| |