473,545 Members | 2,639 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a way to sign partial classes in Whidbey?

I want to make strong name for may apllication assemblies, but I don't know
where and how can I do it in Whidbey.

Help me please
Nov 19 '05 #1
3 1468
Check out this link ( copy and paste it )
in the Whidbey documentation:

ms-help://MS.VSCC.v80/MS.MSDNQTR.v80. en/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_fxadvance/html/2c30799a-a826-46b4-a25d-c584027a6c67.ht m

Essentially, there are two ways to sign an assembly with a strong name:

1. Using the Assembly Linker (Al.exe) provided by the .NET Framework SDK.

2. Using assembly attributes to insert the strong name information in your
code.

You can use either the AssemblyKeyFile Attribute
or the AssemblyKeyName Attribute, depending on
where the key file to be used is located.

You must have a cryptographic key pair
to sign an assembly with a strong name.

This public and private cryptographic key pair is used
during compilation to create a strong-named assembly.

You can create a key pair using the Strong Name tool (Sn.exe).
Key pair files usually have an .snk extension.

To get info about creating a cryptographic key pair, see :

ms-help://MS.VSCC.v80/MS.MSDNQTR.v80. en/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_fxadvance/html/05026813-f3bd-4d7c-9e0b-fc588eb3d114.ht m

in your Whidbey documentation

Juan T. Llibre
ASP.NET MVP
===========
"Vadim" <Va***@discussi ons.microsoft.c om> wrote in message
news:9A******** *************** ***********@mic rosoft.com...
I want to make strong name for may apllication assemblies, but I don't know
where and how can I do it in Whidbey.

Help me please


Nov 19 '05 #2
Hi, Juan!

Have you tried to do it yourself in Whidbey project ?

Including in my code like this

using System;
using System.IO;
using System.Data;
using System.Data.Sql Client;
using System.Xml;
using System.Xml.Xsl;
using Microsoft.Appli cationBlocks.Da ta;
using System.Reflecti on;

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

public partial class Log_aspx
{
.......

(key file lies in root of project folder)

I have an error:
"Error 1 S1548: Cryptographic failure while signing assembly
'c:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.4060 7\Temporary ASP.NET
Files\stockexch angew\ae722549\ e2e2fb71\virkeg ir.dll' -- 'Error reading key
file '..\..\sn.snk' -- The system cannot find the file specified. "
"Error 2 Warning as Error: Use command line option '/keyfile' or appropriate
project settings instead of
'AssemblyKeyFil eAttribute' F:\StockExchang e\Log.aspx.cs 10 11

What should I do?

"Juan T. Llibre" wrote:
Check out this link ( copy and paste it )
in the Whidbey documentation:

ms-help://MS.VSCC.v80/MS.MSDNQTR.v80. en/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_fxadvance/html/2c30799a-a826-46b4-a25d-c584027a6c67.ht m

Essentially, there are two ways to sign an assembly with a strong name:

1. Using the Assembly Linker (Al.exe) provided by the .NET Framework SDK.

2. Using assembly attributes to insert the strong name information in your
code.

You can use either the AssemblyKeyFile Attribute
or the AssemblyKeyName Attribute, depending on
where the key file to be used is located.

You must have a cryptographic key pair
to sign an assembly with a strong name.

This public and private cryptographic key pair is used
during compilation to create a strong-named assembly.

You can create a key pair using the Strong Name tool (Sn.exe).
Key pair files usually have an .snk extension.

To get info about creating a cryptographic key pair, see :

ms-help://MS.VSCC.v80/MS.MSDNQTR.v80. en/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_fxadvance/html/05026813-f3bd-4d7c-9e0b-fc588eb3d114.ht m

in your Whidbey documentation

Juan T. Llibre
ASP.NET MVP
===========
"Vadim" <Va***@discussi ons.microsoft.c om> wrote in message
news:9A******** *************** ***********@mic rosoft.com...
I want to make strong name for may apllication assemblies, but I don't know
where and how can I do it in Whidbey.

Help me please


Nov 19 '05 #3
Hi, Vadim.

re Error 1:
Check your .snk directory path.

Re Error 2:
You need to set the AssemblyKeyFile attribute:
[assembly: AssemblyKeyFile (".\\keyFile.sn k")]

Additionally : Are you also setting the DelaySignAttrib ute ?
[assembly: AssemblyDelaySi gn(true)]
[assembly: AssemblyKeyFile (".\\keyFile.sn k")]
or
[assembly: AssemblyDelaySi gn(false)]
[assembly: AssemblyKeyFile (".\\keyFile.sn k")]

What I would recommend is that you
send this question to the C# newsgroup :
microsoft.publi c.dotnet.langua ges.csharp

You're far more likely to get specialized expert help there.


Juan T. Llibre
ASP.NET MVP
===========
"Vadim" <Va***@discussi ons.microsoft.c om> wrote in message
news:F7******** *************** ***********@mic rosoft.com...
Hi, Juan!

Have you tried to do it yourself in Whidbey project ?

Including in my code like this

using System;
using System.IO;
using System.Data;
using System.Data.Sql Client;
using System.Xml;
using System.Xml.Xsl;
using Microsoft.Appli cationBlocks.Da ta;
using System.Reflecti on;

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

public partial class Log_aspx
{
......

(key file lies in root of project folder)

I have an error:
"Error 1 S1548: Cryptographic failure while signing assembly
'c:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.4060 7\Temporary ASP.NET
Files\stockexch angew\ae722549\ e2e2fb71\virkeg ir.dll' -- 'Error reading key
file '..\..\sn.snk' -- The system cannot find the file specified. "
"Error 2 Warning as Error: Use command line option '/keyfile' or
appropriate
project settings instead of
'AssemblyKeyFil eAttribute' F:\StockExchang e\Log.aspx.cs 10 11

What should I do?

"Juan T. Llibre" wrote:
Check out this link ( copy and paste it )
in the Whidbey documentation:

ms-help://MS.VSCC.v80/MS.MSDNQTR.v80. en/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_fxadvance/html/2c30799a-a826-46b4-a25d-c584027a6c67.ht m

Essentially, there are two ways to sign an assembly with a strong name:

1. Using the Assembly Linker (Al.exe) provided by the .NET Framework SDK.

2. Using assembly attributes to insert the strong name information in
your
code.

You can use either the AssemblyKeyFile Attribute
or the AssemblyKeyName Attribute, depending on
where the key file to be used is located.

You must have a cryptographic key pair
to sign an assembly with a strong name.

This public and private cryptographic key pair is used
during compilation to create a strong-named assembly.

You can create a key pair using the Strong Name tool (Sn.exe).
Key pair files usually have an .snk extension.

To get info about creating a cryptographic key pair, see :

ms-help://MS.VSCC.v80/MS.MSDNQTR.v80. en/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_fxadvance/html/05026813-f3bd-4d7c-9e0b-fc588eb3d114.ht m

in your Whidbey documentation

Juan T. Llibre
ASP.NET MVP
===========
"Vadim" <Va***@discussi ons.microsoft.c om> wrote in message
news:9A******** *************** ***********@mic rosoft.com...
>I want to make strong name for may apllication assemblies, but I don't
>know
> where and how can I do it in Whidbey.
>
> Help me please


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
2573
by: nospam | last post by:
I got three (3) files (1) Untitled.aspx (2) Untitled.aspx.1.cs (3) Untitled.aspx.2.cs These three files must be used together to make file #1, Untitled.aspx, page work via J.I.T. when the User first hits Internet Explorer 6.0 on your browser.
7
2638
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask it differently. FOUR QUESTIONS: The background: I got three (3) files
1
1844
by: Sebastian Sylvan | last post by:
Hey. I have two questions. First of all I'm using the Visual C# Express Beta. When you create a windows application it will automatically split the main form into two files using partial classes. In the solution explorer this is seen hierarchially as somthing like - MainForm.cs -> MainForm.Designer.cs
0
7490
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7425
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...
0
7935
jinu1996
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...
1
7449
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...
0
5069
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3479
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3465
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
734
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.