Re: VB.NET code on a network share
From: Eidolon (aabdis_at_yahoo.com)
Date: 06/25/03
- Next message: Eidolon: "Re: VB.NET code on a network share"
- Previous message: Eidolon: "Re: Will this work to bind VS.2002 to Framework v1.1 ??"
- In reply to: Stuart Douglas: "VB.NET code on a network share"
- Next in thread: Eidolon: "Re: VB.NET code on a network share"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 25 Jun 2003 09:53:58 -0400
Heres what i did and it worked....
1. Generate a Strong-name Key file with SN.EXE
2. Make sure to sign your assembly with your key file
- You add lines in the AssemblyInfo.vb as follows:
<Assembly: AssemblyKeyFile("W:\\LIB\\YourKeyFile.SNK")>
<Assembly: AssemblyDelaySign(False)>
* (note: the DelaySign line is really a design decision for your
specific team.
You should use the same SNK file for all your companies projects.)
3. Using the Control Panel\Administrative Tools\Microsoft .NET Framework 1.0
Configuration tool, add a trust on your strong name.
* (note: Use the appropriate version for your Visual Studio. With 2002,
use the 1.0 config, vor Studio 2003 use the 1.1 config. Even with
1.1
framework installed, Studio 2002 still uses and compiles to 1.0).
To add the trust, do as follows:
1- In the config util, go to the "Runtime Security Policy" section.
Then go to Machine > Code Groups >All_Code.
2- Right click All_Code and go to "New. Give your group a name
(such as "My Signed Code" or something) and a description.
3- Click Next, then in the drop down, select "Strong Name"
4- Click the Import button that shows up, browse to and select
your newly signed assembly.
5- Turn *OFF* the checkboxes for Name and Version.
(this way itll trust ALL your projects signed with the same SNK).
6- Click Next, and select the permission level you want for your code.
(for our own progs we just used Full Trust. You may want to further
research that).
7- Click Next, then Finish.
Note that this will let you run the code without getting the Security
exception thrown. However, the IDE will still warn you about it when you
open the project (have'nt figured out how to turn that off. If you do, id
love to hear). In step 1 of adding the trust, there is a
User/Machine/Enterprise level. The Enterprise level would probably help you
with final deployment (my guess), so you may want to look into that.
Hope this helps,
- Aaron.
"Stuart Douglas" <stuart.douglas@npws.nsw.gov.au> wrote in message
news:04b601c33abd$6a4e9270$a501280a@phx.gbl...
> I have a VB.NET project located on a shared network drive. I get a warning
each time I open the project telling me that the network is not a trusted
location and that I might get security exceptions.
>
> The project has an OracleDataAdapter and OracleConnection. At
initialisation I get a Security Exception.
>
> If I move the project to a local drive it runs OK.
>
> What do I need to do to reconfigure the security so that it runs from the
network?
>
> Once the application is built it will be deployed on the company network.
Are there any additional things I need to do for deployment?
>
> Can someone point me to a compreshensive resource the gives a step-by-step
explanation of how to configure security for projects on a network share?
>
> Thanks for any help.
- Next message: Eidolon: "Re: VB.NET code on a network share"
- Previous message: Eidolon: "Re: Will this work to bind VS.2002 to Framework v1.1 ??"
- In reply to: Stuart Douglas: "VB.NET code on a network share"
- Next in thread: Eidolon: "Re: VB.NET code on a network share"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]