473,804 Members | 3,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Registering An Assembly with the GAC

Hi, I am attempting to register an Assembly with the GAC programmaticall y
from within a C# test system I am writing. Unfortunatly the test user that
the test system is runs under does not have sufficient rights to register an
assembly. I have tried to work around this by using
WindowsIdentity .Impersonate() to emulate the administrator and then starting
a new process that runs gacutil.exe. However, it seems like the spawned
process is not using the Administrators credentials.
What I am looking for is either some way to run the gacutil as the
administrator so the dll can be registered every time the application is run
( yes its inefficient, but this Assembly is in beta and changes very often,
and as this is supposed to be an automated nightly test it has to use the
latest build ).
Alternatively, it seems to me that there should be some security setting
that lets a non-administrator register assemblies. I have looked around for
it but could not find it.

Thank you for you time
Carlson Quick
Nov 15 '05 #1
2 1423
( yes its inefficient, but this Assembly is in beta and changes very often,
and as this is supposed to be an automated nightly test it has to use the
latest build ).


Can't you keep it as a private assembly during development, and wait
with the global registration 'til later?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 15 '05 #2
I wouldn't mind doing such a thing, ( in the least ). However I am just the
intern, and the powers that be want to test with the fully signed assembly
in the GAC ( for various reasons some better than others ). Also, the
existing test system keeps all of its dll's in one spot (not in the bin
directory, and this set of tests has to blend in with all of the existing
stuff).

"Mattias Sjögren" <ma************ ********@mvps.o rg> wrote in message
news:el******** ******@TK2MSFTN GP11.phx.gbl...
( yes its inefficient, but this Assembly is in beta and changes very often,and as this is supposed to be an automated nightly test it has to use the
latest build ).


Can't you keep it as a private assembly during development, and wait
with the global registration 'til later?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

Nov 15 '05 #3

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

Similar topics

0
1160
by: Dan Bass | last post by:
One day, out of the blue, anything COM interop related stopped building. When building any project (VB / C#) that has a COM interop interface (my own home grown projects, or a Visual Studio .Net Add-in), I get the following error: Build complete -- 0 errors, 0 warnings Building satellite assemblies... Registering project output for COM Interop... COM Interop registration failed. Type library exporter can not load required library...
2
1993
by: glenn | last post by:
I have written a COM Server in C# and its working perfectly. I am not ready to deploy to client computers to begin the real testing and am now wondering how to perform. The part that confuses me is that you can not use regsvr32 to register the COM server so I'm wondering if placing it inside the .NET library will automatically take care of registering it so non managed code programs can access it or do I have to manually use the regasm...
3
306
by: Arvind P Rangan | last post by:
hi, I have compiled a .dll. steps followed is try to upload the dll to global assembly method 1: al /i:temp.dll but this gives an error method 2: gacutil /i temp.dll - this uploads dll to global assembly. Next how can i use it. if i type imports temp it gives error its not shown in the references list also.
1
1574
by: Anthony Yott | last post by:
Folks, I have a C# .NET Assembly that is called from an MFC C++ application. The assembly is marked as COM visible so I'm accessing the assembly from MFC C++ via COM. Everything works great but here is my question: I need to create an event in the .NET Assembly and have the MFC C++ application register for this event and handle the event. Can anyone provide an example or a link for doing this? Any help would be
3
18850
by: billr | last post by:
I have created a simple .net class library AdapterLibrary.dll, which contains a single class definition AdapterLibrary.Service (code at end of posting). I have signed the assembly and I attempt to install in the GAC. Using Visual Studio 2005 (.net 2.0) to build the dll results in me not being able to install the assembly in the GAC. *********************************************
0
1479
by: fcaico | last post by:
I have a .NET 1.1 C# application that needs to connect to a custom web service for authentication and system access. This web service uses a custom SOAP header for security purposes. In the past this has been a non issue because I simply registered a SoapHeaderExtension in the application's App.Config file. Now, however, we have need of using this C# client code in an assembly which doesn't have access to an app.config file (long...
1
2190
by: shivkumar2004 | last post by:
Hi!, I am developing a chat system using vb.net in vs 2005. I am getting the following error while registering the events. error details: System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Type System.DelegateSerializationHolder and the types derived from it (such as System.DelegateSerializationHolder) are not permitted to be
3
1170
by: Phil | last post by:
VB2005 I have created a class library project. I have created a class using the COM class template. In the Application tab under My projects if I click on Assembly Information, the 'Make assembly COM-visible' box is checked. In the Compile tab the 'Register for COM Interop box is checked. In the Signing tab the 'Sign the assembly' box is checked, and I have created a .snk file. The Delay sign only box is not checked. I have built the...
2
1633
by: PGP | last post by:
I have an assembly i need to register for COM interop. This assembly has other assembly dependencies that need not be visible to COM. Although, when i turn on "Register for COM Interop" in the project setting for the target assembly and compile, it gives me an error "COM Interop registration failed. Could not find a type library for assembly <dependent assembly>" Is there a way to not have the dependent assembly registered for COM...
0
9706
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10319
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
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
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
7616
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...
1
4297
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
3
2990
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.