Showing posts with label assembly. Show all posts
Showing posts with label assembly. Show all posts

Saturday, March 24, 2012

Strong Assembly Name

I have following question:

Why Strong Naming?
When I need It?

RegardsStrong naming an assembly means someone can't go into your assembly and
modify it. In other words, someone can't hack it, put a trojan in it and
make it look like it's ur doing.

In my opinion you'd do it when you are shipping a product or even more so a
component/library. If you are doing internal developement (enterprise
development) or you are shipping to a single client (contract work) it
becomes less important. Of course, it barely takes any time...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:C299AF7D-A09E-4514-9036-42874803C7ED@.microsoft.com...
>I have following question:
> Why Strong Naming?
> When I need It?
> Regards
> If you are doing internal developement (enterprise development) or you
> are shipping to a single client (contract work) it becomes less important.
> Of course, it barely takes any time...

In fact, it's better to NOT use the GAC for this type of thing generally, as
it makes it a pain in the butt to make changes and update them. For example,
in our system, we make changes on a weekly (usually) basis. And since our
stuff is safely behind a firewall, and other security systems, there's no
need to go to the trouble.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
I'd rather be a hammer than a nail.

"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uW90zLpwFHA.2792@.tk2msftngp13.phx.gbl...
> Strong naming an assembly means someone can't go into your assembly and
> modify it. In other words, someone can't hack it, put a trojan in it and
> make it look like it's ur doing.
> In my opinion you'd do it when you are shipping a product or even more so
> a component/library. If you are doing internal developement (enterprise
> development) or you are shipping to a single client (contract work) it
> becomes less important. Of course, it barely takes any time...
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
> http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
>
> "Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
> news:C299AF7D-A09E-4514-9036-42874803C7ED@.microsoft.com...
>>I have following question:
>>
>> Why Strong Naming?
>> When I need It?
>>
>> Regards

Strong Assembly Name

I have following question:
Why Strong Naming?
When I need It?
RegardsStrong naming an assembly means someone can't go into your assembly and
modify it. In other words, someone can't hack it, put a trojan in it and
make it look like it's ur doing.
In my opinion you'd do it when you are shipping a product or even more so a
component/library. If you are doing internal developement (enterprise
development) or you are shipping to a single client (contract work) it
becomes less important. Of course, it barely takes any time...
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:C299AF7D-A09E-4514-9036-42874803C7ED@.microsoft.com...
>I have following question:
> Why Strong Naming?
> When I need It?
> Regards
> If you are doing internal developement (enterprise development) or you
> are shipping to a single client (contract work) it becomes less important.
> Of course, it barely takes any time...
In fact, it's better to NOT use the GAC for this type of thing generally, as
it makes it a pain in the butt to make changes and update them. For example,
in our system, we make changes on a wly (usually) basis. And since our
stuff is safely behind a firewall, and other security systems, there's no
need to go to the trouble.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
I'd rather be a hammer than a nail.
"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uW90zLpwFHA.2792@.tk2msftngp13.phx.gbl...
> Strong naming an assembly means someone can't go into your assembly and
> modify it. In other words, someone can't hack it, put a trojan in it and
> make it look like it's ur doing.
> In my opinion you'd do it when you are shipping a product or even more so
> a component/library. If you are doing internal developement (enterprise
> development) or you are shipping to a single client (contract work) it
> becomes less important. Of course, it barely takes any time...
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
> http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
>
> "Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
> news:C299AF7D-A09E-4514-9036-42874803C7ED@.microsoft.com...
>

Strong name assembly

Hi,
For different reasons would like to strong name my web application, but am
unable to do so. When I try to build my project with the AssemlyKeyFile
attribute set in Assemblyinfo, I get a error message saying Unable to emit
assembly: Referenced assembly 'DateTextBox' does not have a strong name.
DateTextbox in this case is a thirdparty control that I am using in my
project (Have no source code for this). Is there any workaround to this ?
Regards
NiclasDateTextBox : is this managed code or unmanaged code. i mean r u doing any
interop here?
avnrao
"MS Newsgroups" <nospam.lindblom_niclas@.hotmail.com> wrote in message
news:u7rGC8bLEHA.1264@.TK2MSFTNGP12.phx.gbl...
> Hi,
> For different reasons would like to strong name my web application, but am
> unable to do so. When I try to build my project with the AssemlyKeyFile
> attribute set in Assemblyinfo, I get a error message saying Unable to emit
> assembly: Referenced assembly 'DateTextBox' does not have a strong name.
> DateTextbox in this case is a thirdparty control that I am using in my
> project (Have no source code for this). Is there any workaround to this ?
> Regards
> Niclas
>

Strong Name Assembly

I have a strong named assembly. It installs fine on my XP Pro Machine via
the .net configuration tool. When I use the same tool to install it on a
W2003 machine it says it isn't strongly named.
As I don't have vs.net. Ihave been compliling my vb file as a module and
then using al.exe to sign it with a strong name. It seems to work on my
machine. When I copy the dll to the 2003 machine it doesn't. Does it need
any additional files than the dll. Also the W2003 machine is .net v2 whereas
my machine is .net v1. Any ideas? Regards, Chris.Get .NET 2.0 SDK (FREE) for you dev box and try it again

--
Daniel Fisher(lennybacon)
http://www.lennybacon.com

"Chris" <123@.123.com> wrote in message
news:uZ6CKud7FHA.444@.TK2MSFTNGP11.phx.gbl...
>I have a strong named assembly. It installs fine on my XP Pro Machine via
> the .net configuration tool. When I use the same tool to install it on a
> W2003 machine it says it isn't strongly named.
> As I don't have vs.net. Ihave been compliling my vb file as a module and
> then using al.exe to sign it with a strong name. It seems to work on my
> machine. When I copy the dll to the 2003 machine it doesn't. Does it need
> any additional files than the dll. Also the W2003 machine is .net v2
> whereas
> my machine is .net v1. Any ideas? Regards, Chris.

Strong name assembly

Hi,

For different reasons would like to strong name my web application, but am
unable to do so. When I try to build my project with the AssemlyKeyFile
attribute set in Assemblyinfo, I get a error message saying Unable to emit
assembly: Referenced assembly 'DateTextBox' does not have a strong name.
DateTextbox in this case is a thirdparty control that I am using in my
project (Have no source code for this). Is there any workaround to this ?

Regards

NiclasDateTextBox : is this managed code or unmanaged code. i mean r u doing any
interop here?
avnrao
"MS Newsgroups" <nospam.lindblom_niclas@.hotmail.com> wrote in message
news:u7rGC8bLEHA.1264@.TK2MSFTNGP12.phx.gbl...
> Hi,
> For different reasons would like to strong name my web application, but am
> unable to do so. When I try to build my project with the AssemlyKeyFile
> attribute set in Assemblyinfo, I get a error message saying Unable to emit
> assembly: Referenced assembly 'DateTextBox' does not have a strong name.
> DateTextbox in this case is a thirdparty control that I am using in my
> project (Have no source code for this). Is there any workaround to this ?
> Regards
> Niclas

Strong Name Assembly

I have a strong named assembly. It installs fine on my XP Pro Machine via
the .net configuration tool. When I use the same tool to install it on a
W2003 machine it says it isn't strongly named.
As I don't have vs.net. Ihave been compliling my vb file as a module and
then using al.exe to sign it with a strong name. It seems to work on my
machine. When I copy the dll to the 2003 machine it doesn't. Does it need
any additional files than the dll. Also the W2003 machine is .net v2 whereas
my machine is .net v1. Any ideas? Regards, Chris.Get .NET 2.0 SDK (FREE) for you dev box and try it again
Daniel Fisher(lennybacon)
http://www.lennybacon.com
"Chris" <123@.123.com> wrote in message
news:uZ6CKud7FHA.444@.TK2MSFTNGP11.phx.gbl...
>I have a strong named assembly. It installs fine on my XP Pro Machine via
> the .net configuration tool. When I use the same tool to install it on a
> W2003 machine it says it isn't strongly named.
> As I don't have vs.net. Ihave been compliling my vb file as a module and
> then using al.exe to sign it with a strong name. It seems to work on my
> machine. When I copy the dll to the 2003 machine it doesn't. Does it need
> any additional files than the dll. Also the W2003 machine is .net v2
> whereas
> my machine is .net v1. Any ideas? Regards, Chris.
>

Strong naming assembly in an vb aspx project

I put my StrongNameKey.snk in my root foler.
in my assemblyinfo.vb I have:
<Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")>
I get the error "Error creating assembly manifest: Error reading key
file 'StrongNameKey.snk' -- The system cannot find the file
specified."
?
/MHi,
The placement of key depends on what mode are you compiling your vb project
with i.e. Debug or Release.
This is a VB issue cause the build directory for VB.NET assemblies is not
the same as the output directory, which usually is \bin (relative to the
project). If the solution configuration is in the default Debug mode, the
output directory is \obj\Debug. If in Release mode, it's \obj\Release. This
is where the strong
name key file must be placed.
HTH,
Piyush
<job@.bla.com> wrote in message
news:2hkd12t1gb8ic7v3tsmrc2eehdou99okpq@.
4ax.com...
> I put my StrongNameKey.snk in my root foler.
> in my assemblyinfo.vb I have:
> <Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")>
> I get the error "Error creating assembly manifest: Error reading key
> file 'StrongNameKey.snk' -- The system cannot find the file
> specified."
> ?
> /M
Hmm. my project is a web project and I only have a bin output folder.
Even in my unittest class project in the same solution, I have the
same error. Strange.
On Tue, 14 Mar 2006 10:07:02 -0500, "Piyush Daiya"
<pdaiya@.primeassociates.com> wrote:

>Hi,
>The placement of key depends on what mode are you compiling your vb project
>with i.e. Debug or Release.
>This is a VB issue cause the build directory for VB.NET assemblies is not
>the same as the output directory, which usually is \bin (relative to the
>project). If the solution configuration is in the default Debug mode, the
>output directory is \obj\Debug. If in Release mode, it's \obj\Release. Thi
s
>is where the strong
>name key file must be placed.
>HTH,
>Piyush
><job@.bla.com> wrote in message
> news:2hkd12t1gb8ic7v3tsmrc2eehdou99okpq@.
4ax.com...
>

Strong naming assembly in an vb aspx project

I put my StrongNameKey.snk in my root foler.

in my assemblyinfo.vb I have:
<Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")
I get the error "Error creating assembly manifest: Error reading key
file 'StrongNameKey.snk' -- The system cannot find the file
specified."

?

/MHi,

The placement of key depends on what mode are you compiling your vb project
with i.e. Debug or Release.
This is a VB issue cause the build directory for VB.NET assemblies is not
the same as the output directory, which usually is \bin (relative to the
project). If the solution configuration is in the default Debug mode, the
output directory is \obj\Debug. If in Release mode, it's \obj\Release. This
is where the strong
name key file must be placed.

HTH,

Piyush
<job@.bla.com> wrote in message
news:2hkd12t1gb8ic7v3tsmrc2eehdou99okpq@.4ax.com...
> I put my StrongNameKey.snk in my root foler.
> in my assemblyinfo.vb I have:
> <Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")>
> I get the error "Error creating assembly manifest: Error reading key
> file 'StrongNameKey.snk' -- The system cannot find the file
> specified."
> ?
> /M
Hmm. my project is a web project and I only have a bin output folder.
Even in my unittest class project in the same solution, I have the
same error. Strange.

On Tue, 14 Mar 2006 10:07:02 -0500, "Piyush Daiya"
<pdaiya@.primeassociates.com> wrote:

>Hi,
>The placement of key depends on what mode are you compiling your vb project
>with i.e. Debug or Release.
>This is a VB issue cause the build directory for VB.NET assemblies is not
>the same as the output directory, which usually is \bin (relative to the
>project). If the solution configuration is in the default Debug mode, the
>output directory is \obj\Debug. If in Release mode, it's \obj\Release. This
>is where the strong
>name key file must be placed.
>HTH,
>Piyush
><job@.bla.com> wrote in message
>news:2hkd12t1gb8ic7v3tsmrc2eehdou99okpq@.4ax.com...
>> I put my StrongNameKey.snk in my root foler.
>>
>> in my assemblyinfo.vb I have:
>> <Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")>
>>
>> I get the error "Error creating assembly manifest: Error reading key
>> file 'StrongNameKey.snk' -- The system cannot find the file
>> specified."
>>
>> ?
>>
>> /M

Thursday, March 22, 2012

strong naming assembly

I am attempting trying to create an assembly with strong name
Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestKey.snk")]
I am getting an error saying it cannot read the key file
First, Where should that .snk file go?
Second, What could cause that error?
DerrickHi,
You can give absolute path also for the .snk file.
I believe VS.NET IDE looks for the .snk file in the devenv.exe folder
itself.
"Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@.pd7tw2no...
I am attempting trying to create an assembly with strong name
Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestKey.snk")]
I am getting an error saying it cannot read the key file
First, Where should that .snk file go?
Second, What could cause that error?
Derrick
Hi Derrick,
As for the making stong-named asembly issue, I think you Shiva's suggestion
that use the full absolutte path of the key file is reasonable. Since
you're using the relative path of the file(haven't specify the full path),
I'm not sure whether the problem is cause by this. Anyway, please have a
try and if you have anyother findings, please also feel free to post here.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Derrick,
You can use a relative path for this, but it should be relative to the
compiled assembly, not the project file. For example, if you keep the key
file in the project root folder and your assemblies get compiled to <project
root>\bin\debug or <project root>\bin\release, then your relative path must
point up two directories. e.g.:
[assembly: AssemblyKeyFile(@."..\..\TestKey.snk")]
HTH,
Nicole
"Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@.pd7tw2no...
>I am attempting trying to create an assembly with strong name
> Here is what I have done:
> called sn -k Tesstkey.snk
> placed this code in my class:
> using System.Reflection;
> [assembly:AssemblyKeyFileAttribute("TestKey.snk")]
> I am getting an error saying it cannot read the key file
> First, Where should that .snk file go?
> Second, What could cause that error?
> Derrick
>
>
>
Thanks for the help.
physical path wouldn't work because I have to move the projects between
machines. I used Nicole's suggestion to use the relative path of
"..\..\file.snk", and that worked. I had the file in the \bin\release\
folder, so that should have worked, but I can work with the relative path
approach.
Derrick
"Steven Cheng[MSFT]" <v-schang@.online.microsoft.com> wrote in message
news:Ic7VahfdEHA.2932@.cpmsftngxa10.phx.gbl...
> Hi Derrick,
> As for the making stong-named asembly issue, I think you Shiva's
suggestion
> that use the full absolutte path of the key file is reasonable. Since
> you're using the relative path of the file(haven't specify the full path),
> I'm not sure whether the problem is cause by this. Anyway, please have a
> try and if you have anyother findings, please also feel free to post here.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
> Get Preview at ASP.NET whidbey
> http://msdn.microsoft.com/asp.net/whidbey/default.aspx
>
Thanks, Nicole
That worked
Derrick
"Nicole Calinoiu" <nicolec@.somewhere.net> wrote in message
news:OJjcaIkdEHA.3704@.TK2MSFTNGP09.phx.gbl...
> Derrick,
> You can use a relative path for this, but it should be relative to the
> compiled assembly, not the project file. For example, if you keep the key
> file in the project root folder and your assemblies get compiled to
<project
> root>\bin\debug or <project root>\bin\release, then your relative path
must
> point up two directories. e.g.:
> [assembly: AssemblyKeyFile(@."..\..\TestKey.snk")]
> HTH,
> Nicole
>
> "Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
> news:9LfOc.137615$ek5.83297@.pd7tw2no...
>

strong naming assembly

I am attempting trying to create an assembly with strong name

Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;

[assembly:AssemblyKeyFileAttribute("TestKey.snk")]

I am getting an error saying it cannot read the key file

First, Where should that .snk file go?
Second, What could cause that error?

DerrickHi,

You can give absolute path also for the .snk file.

I believe VS.NET IDE looks for the .snk file in the devenv.exe folder
itself.

"Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@.pd7tw2no...
I am attempting trying to create an assembly with strong name

Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;

[assembly:AssemblyKeyFileAttribute("TestKey.snk")]

I am getting an error saying it cannot read the key file

First, Where should that .snk file go?
Second, What could cause that error?

Derrick
Hi Derrick,

As for the making stong-named asembly issue, I think you Shiva's suggestion
that use the full absolutte path of the key file is reasonable. Since
you're using the relative path of the file(haven't specify the full path),
I'm not sure whether the problem is cause by this. Anyway, please have a
try and if you have anyother findings, please also feel free to post here.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Derrick,

You can use a relative path for this, but it should be relative to the
compiled assembly, not the project file. For example, if you keep the key
file in the project root folder and your assemblies get compiled to <project
root>\bin\debug or <project root>\bin\release, then your relative path must
point up two directories. e.g.:

[assembly: AssemblyKeyFile(@."..\..\TestKey.snk")]

HTH,
Nicole

"Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@.pd7tw2no...
>I am attempting trying to create an assembly with strong name
> Here is what I have done:
> called sn -k Tesstkey.snk
> placed this code in my class:
> using System.Reflection;
> [assembly:AssemblyKeyFileAttribute("TestKey.snk")]
> I am getting an error saying it cannot read the key file
> First, Where should that .snk file go?
> Second, What could cause that error?
> Derrick
>
Thanks for the help.

physical path wouldn't work because I have to move the projects between
machines. I used Nicole's suggestion to use the relative path of
"..\..\file.snk", and that worked. I had the file in the \bin\release\
folder, so that should have worked, but I can work with the relative path
approach.

Derrick

"Steven Cheng[MSFT]" <v-schang@.online.microsoft.com> wrote in message
news:Ic7VahfdEHA.2932@.cpmsftngxa10.phx.gbl...
> Hi Derrick,
> As for the making stong-named asembly issue, I think you Shiva's
suggestion
> that use the full absolutte path of the key file is reasonable. Since
> you're using the relative path of the file(haven't specify the full path),
> I'm not sure whether the problem is cause by this. Anyway, please have a
> try and if you have anyother findings, please also feel free to post here.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
> Get Preview at ASP.NET whidbey
> http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Thanks, Nicole

That worked

Derrick
"Nicole Calinoiu" <nicolec@.somewhere.net> wrote in message
news:OJjcaIkdEHA.3704@.TK2MSFTNGP09.phx.gbl...
> Derrick,
> You can use a relative path for this, but it should be relative to the
> compiled assembly, not the project file. For example, if you keep the key
> file in the project root folder and your assemblies get compiled to
<project
> root>\bin\debug or <project root>\bin\release, then your relative path
must
> point up two directories. e.g.:
> [assembly: AssemblyKeyFile(@."..\..\TestKey.snk")]
> HTH,
> Nicole
>
> "Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
> news:9LfOc.137615$ek5.83297@.pd7tw2no...
> >I am attempting trying to create an assembly with strong name
> > Here is what I have done:
> > called sn -k Tesstkey.snk
> > placed this code in my class:
> > using System.Reflection;
> > [assembly:AssemblyKeyFileAttribute("TestKey.snk")]
> > I am getting an error saying it cannot read the key file
> > First, Where should that .snk file go?
> > Second, What could cause that error?
> > Derrick