473,289 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Broken compatibility for assembly GetNAme() in 2.0

WT
Hello,
We have a license system that checks the assembly name and version using
..NETLicenseManager API (Cf Nikhil K. book on server controls) , using a
deployment project we are able to set the assmbly name and version for
resulting dll, and it works ok.
string assemblyPart = type.Assembly.GetName().Name;

string versionPart = type.Assembly.GetName().Version.ToString();
But in dev phase, our assembly name is automatically generated without
possibility of control and it is very uneasyto work with, solution should be
to put #if everywere the license is tested or the assembly name is get from
..net, but this practice doesn't allow real testing.

So what to do: something has been broken here going from 1.1 to 2.0.
What to do ?
Any idea welcome.

CS
May 13 '06 #1
6 1199
Hi MT,

Thank you for posting!

Regarding the code:

string assemblyPart = type.Assembly.GetName().Name;

Can you tell me where is the 'type' from? Is it from a Page class?

And I'm not quite clear about your question about "something has been
broken here going from 1.1 to 2.0". Have you tried the suggestion provided
by Ken Cox in your other post regarding this issue? BTW, the Web
Application Projects 1.0 is released just a few days ago. This new model is
ideal for web site developers who are converting a Visual Studio .Net 2003
web project to Visual Studio 2005.
Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 15 '06 #2
Hi CS,

Sorry for the typo in your name in previous post.

Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 15 '06 #3
WT
Hello Walter,

No pb with typo.
Concerning the Ken Cox answer, I don't see it, I will refresh my outlook
subscription to this newsgroup.
My project is now converted to 2.0.
type is an instance of a class that resides in the App_Code folder, when I
run my web application under VS2005 debuger , I get in assemblyPart a name
like App_dzk23, each new run gives a different name.
So it is uneasy to test something.

Regards
CS

"Walter Wang [MSFT]" <wa****@online.microsoft.com> a écrit dans le message
de news: yf*************@TK2MSFTNGXA01.phx.gbl...
Hi MT,

Thank you for posting!

Regarding the code:

string assemblyPart = type.Assembly.GetName().Name;

Can you tell me where is the 'type' from? Is it from a Page class?

And I'm not quite clear about your question about "something has been
broken here going from 1.1 to 2.0". Have you tried the suggestion provided
by Ken Cox in your other post regarding this issue? BTW, the Web
Application Projects 1.0 is released just a few days ago. This new model
is
ideal for web site developers who are converting a Visual Studio .Net 2003
web project to Visual Studio 2005.
Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

May 15 '06 #4
Hi CS,

Have you tried the Web Application Projects addin? Would you mind letting
me know the result of the suggestions? If you need further assistance, feel
free to let me know. I will be more than happy to be of assistance.

Have a great day!

Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 18 '06 #5
WT
Hi Walter,

Yes it solved it for final project, but in dev phase, assembly name is lost.
That's a reat problem.

CS
"Walter Wang [MSFT]" <wa****@online.microsoft.com> a écrit dans le message
de news: oH**************@TK2MSFTNGXA01.phx.gbl...
Hi CS,

Have you tried the Web Application Projects addin? Would you mind letting
me know the result of the suggestions? If you need further assistance,
feel
free to let me know. I will be more than happy to be of assistance.

Have a great day!

Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

May 18 '06 #6
Thank you for your quick response.

I've done some test using Web Application Projects add-in, but was unable
to reproduce the problem. Here's the steps I used to test it:

1) Create a new Visual C# "ASP.NET Web Application"
2) Create a new class Class1
3) In Default.aspx.cs, Page_Load:

Class c1 = new Class1();
Response.Write(c1.GetType().Assembly.GetName());

The result shows correctly the Project's assembly name.

If I use following code in Page_Load:

Response.Write(this.GetType().Assembly.GetName());

It does show an assembly name which is dynamic, but I think it's the same
behavior with ASP.NET 1.1 which is expected.

If there is anything I misunderstood, please feel free to post reply here.
Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 18 '06 #7

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

Similar topics

6
by: David Lindgren | last post by:
Hi. I'm using automatic increase on the assembly build number. Only problem is it's doesn't increase. Anyone know what might cause this? In AssemblyInfo.cs: Thanks!
3
by: Aamir Mahmood | last post by:
Hi all, How can I set the version information (major, minor) in my assembly. And also how can I easily get it at runtime? - AM
1
by: jez123456 | last post by:
Hi, I'm trying to add the product, title and version number to my main form with the following code. I've tried using this code in the public class FrmMain section but I get the error thisAsm'...
2
by: e_zverev | last post by:
Hi The question concerns the ways ASP.NET loads required assemblies into it's app domain. I know of a deprecated feature of clr assembly detection in which the use of environment variable...
18
by: Praveen Ramesh | last post by:
Hi, Is there any way to add the @Assembly reference to the aspx files programmatically from inside a custom control (when it gets dropped on to the page from the toolbox)? I have a custom...
4
by: Phil Galey | last post by:
I created an About box and am able to get all the assembly information from the program to show up in the About box except the Version. I created the About box as a separate Windows application,...
3
by: Jim Shank | last post by:
I am attempting to embed a text resource in my assembly and following MSDN article...
1
by: Andrew | last post by:
In ASP.NET 1.1 I used to retreive the version of my code-behind assembly using following syntax: Assembly.GetExecutingAssembly().GetName().Version The version was defined in AssemblyInfo.cs using...
8
by: puzzlecracker | last post by:
is there a way to create a library (assembly/dll) where I can only export few class? I don't want client to use or know about other internal classes in the assembly. Thanks
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.