473,597 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GUIDs, snks, reflection and ILMerge

JT
Hi,

I am having trouble finding information about GUIDs and strong-names
and don't really know what I need. If that's too ambiguous, please
tell me where to look for info on these.

Here's what I am trying to accomplish: I need to know what assembly is
calling methods in a web service. I also use ILMerge.exe to merge my
assemblies into a single executable. One of the dlls in the executable
calls the web service. I need to enforce that only this dll makes
calls to the web service. After ILMerge, I can't use reflection to
obtain the name of the dll that calls the web service and besides
that's not quite a unique ID. The dll that calls the web service will
be distributed for use in other applications, but I need to know that
the dll I'm distributing is making the calls to the web service and not
any other assemblies.

I believe a GUID would be sufficient to identify the calling dll, but I
can't find any information that tells me how to get the GUID of this
calling assembly. After reading some help files and some posted
discussions, I now think that a strong-name will not necessarily change
when the assemblies are recompiled, but I don't know enough to know how
difficult it is to create a snk file. I also don't know if merging my
assemblies will keep me from being able to obtain either a GUID or
strong-name key of the assembly.

I'm sure there are high-level discussions out there. Can anyone point
me to an example of programmaticall y retrieving an assembly's GUID
and/or creating snks and programmaticall y retrieving the public key of
an assembly? Is there a better way for me to identify a calling
assembly after it's been merged?

Thanks,

JT

Dec 2 '06 #1
3 3783
JT,
I am not "100%" on this, but my experience with ILMerge tells me that after
a merge, you are really only dealing with *one* assembly - the result of the
merge.
So, you will likely need to look at something more along the lines of CAS
(Code Access Secrurity) to ensure that only certain classes can have access
to the WebService proxy class in your merged assy.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"JT" wrote:
Hi,

I am having trouble finding information about GUIDs and strong-names
and don't really know what I need. If that's too ambiguous, please
tell me where to look for info on these.

Here's what I am trying to accomplish: I need to know what assembly is
calling methods in a web service. I also use ILMerge.exe to merge my
assemblies into a single executable. One of the dlls in the executable
calls the web service. I need to enforce that only this dll makes
calls to the web service. After ILMerge, I can't use reflection to
obtain the name of the dll that calls the web service and besides
that's not quite a unique ID. The dll that calls the web service will
be distributed for use in other applications, but I need to know that
the dll I'm distributing is making the calls to the web service and not
any other assemblies.

I believe a GUID would be sufficient to identify the calling dll, but I
can't find any information that tells me how to get the GUID of this
calling assembly. After reading some help files and some posted
discussions, I now think that a strong-name will not necessarily change
when the assemblies are recompiled, but I don't know enough to know how
difficult it is to create a snk file. I also don't know if merging my
assemblies will keep me from being able to obtain either a GUID or
strong-name key of the assembly.

I'm sure there are high-level discussions out there. Can anyone point
me to an example of programmaticall y retrieving an assembly's GUID
and/or creating snks and programmaticall y retrieving the public key of
an assembly? Is there a better way for me to identify a calling
assembly after it's been merged?

Thanks,

JT

Dec 2 '06 #2
Hi,

You're trying to verify, on the service end, whether a particular assembly
calls into your "public" web service methods, correct?

You'd have to send more than just a GUID or public key to the server in
order to secure the app, but even any encryption scheme that you may decide
to use can be easily spoofed from the machine that's hosting the valid
assembly itself. It would just be security through obscurity on the local
machine.

You might be better off just ensuring that any calls into the web service
are validated by a key that only the client can have, regardless of the
assembly in which it is called from. This can be done using encryption and
authentication. Also, try to design your web service so that it doesn't
expose any private implementation details, wherever possible (e.g., don't
accept password parameters, disable WSDL generation)

You may also want to look into encryption using WSE to protect the web
service from external attacks.

"Encrypting SOAP Messages Using Web Services Enhancements"
http://msdn2.microsoft.com/en-us/library/ms996945.aspx

Unencrypted SOAP messages are just clear-xml, so any eavesdropping app could
easily read the messages and send them to the Web Service on behalf of your
valid assembly. Not good ;)

You could use SSL for transport-level security, for example.

To authenticate the client you can use basic or digest security in IIS or a
digital certificate, for example.

Here's a really good article on Web Service security (Written for 1.1 but it
certainly applies to 2.0 as well from what I've read):

"Chapter 12 - Building Secure Web Services"
http://msdn2.microsoft.com/en-us/library/aa302428.aspx

--
Dave Sexton

"JT" <jt@onemain.com wrote in message
news:11******** **************@ 16g2000cwy.goog legroups.com...
Hi,

I am having trouble finding information about GUIDs and strong-names
and don't really know what I need. If that's too ambiguous, please
tell me where to look for info on these.

Here's what I am trying to accomplish: I need to know what assembly is
calling methods in a web service. I also use ILMerge.exe to merge my
assemblies into a single executable. One of the dlls in the executable
calls the web service. I need to enforce that only this dll makes
calls to the web service. After ILMerge, I can't use reflection to
obtain the name of the dll that calls the web service and besides
that's not quite a unique ID. The dll that calls the web service will
be distributed for use in other applications, but I need to know that
the dll I'm distributing is making the calls to the web service and not
any other assemblies.

I believe a GUID would be sufficient to identify the calling dll, but I
can't find any information that tells me how to get the GUID of this
calling assembly. After reading some help files and some posted
discussions, I now think that a strong-name will not necessarily change
when the assemblies are recompiled, but I don't know enough to know how
difficult it is to create a snk file. I also don't know if merging my
assemblies will keep me from being able to obtain either a GUID or
strong-name key of the assembly.

I'm sure there are high-level discussions out there. Can anyone point
me to an example of programmaticall y retrieving an assembly's GUID
and/or creating snks and programmaticall y retrieving the public key of
an assembly? Is there a better way for me to identify a calling
assembly after it's been merged?

Thanks,

JT

Dec 2 '06 #3
JT
Thanks for the replies, guys. I think you've given me some really good
advice and things to look into. I'll be digging into all this
tomorrow. I'm hoping WCF will make all this easier, but that's
something else I haven't looked into enough.

Thanks,

JT

Dec 2 '06 #4

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

Similar topics

3
995
by: Tim Marsden | last post by:
Hi, I am trying to use ILMerge to consolidate a .exe and serval .dll's into a single .exe. (VB.NET) I am using the following command. ILMerge.exe /wildcards /log:Log.txt /keyfile:"C:\MyKey.snk" /t:winexe /out:Merged.exe Primary.exe *.dll I get the follow result at the end of my log file:
1
2218
by: Oz Sozen | last post by:
I want to use ILMerge in my project, but it requires a framework version that I cannot find the download for (2.0.7.... something). The latest I can see is 2.0.5. Does anybody know where I can find this framework or a version of ILMerge that works with an earlier framework. Thanks.
4
33879
by: J.Marsch | last post by:
I notice that when I generate various guids, they appear to have a mix of upper and lowercase letters. Is the uniqueness of a guid case-sensitive? In other words, if I generate a guid, and then store it in a database that is case insensitive (or if I convert the letters to upper), is it still statistically unique?
1
10892
by: vector | last post by:
I've got an application that generates GUIDs. A lot of GUIDs. Lots of GUIDs that end up in files on disk, taking up space. I'd like to continue using the Guid.NewGuid() function as my unique tag generator, but I'd also like to compress them to base 36 strings, which should retain their uniqueness but save me disk space. I've looked at various base conversion functions, and haven't found a suitable one. Further, I don't need an AnyBase...
2
1150
by: Howard Kaikow | last post by:
Being lazy, I sometimes copy a project to another directory, then tweak the code. A problem arises because then both projects have identical GUIDs in the .sln file, and in the assembly file. Is there any way to change the GUIDs, other than by overcoming my laziness and creating a New Project instead of copying the files? --
0
1980
by: Dennis | last post by:
I am trying to use ILMerge to create a single executable. Below are the DOS command lines that I am using: cd c:\program files\ilmerge ilmerge /lib:c:\programming\vs-projects\recipes\bin /target:winexe /out:c:\RecipeSinglePgm.exe Recipes.exe Interop.ADODB.dll Interop.ADOX.dll Interop.JRO.dll MultiBoxControl.dll MultiGridControl.dll I don't get any errors noted nor do I get the file "c:\RecipeSinglePgm.exe"
0
1254
vikramadith
by: vikramadith | last post by:
I'm having some issues merging dlls into my exe Basically I have three VS projects, one producing an exe, and the other two producing dlls. Let us just call it MyApp.exe, Lib1.dll and Lib2.dll. All are written in C#. MyApp references both dlls. Now, I want the dlls to be merged into the exe, so I used ILMerge (with the Gilma UI) to do so. According to the ILMerge output, the merge works fine without any errors. However, when I try and...
28
3867
by: Todd Carnes | last post by:
I have read several threads regarding using ILMerge to combine all your dlls with your exe to create one single exe file....I don't get it. Why would you ever want to do this? Todd
1
1268
by: kulabhishek | last post by:
Hi, I am using ILMerge tool to merge the all the dlls into one. In my case I do not want to include one dll into output one. But my other dlls are using the reference of that dll. How it can be done using ILMerge? Regards Abhishek
0
8381
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8035
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
6688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3886
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3927
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2404
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1494
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1238
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.