473,806 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.TypeInit ializationExcep tion

Jm
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it bit
by bit. The program uses a dll which contains a servername and domain name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long as it
was registered. Now ive made a new dll and compiled it and made a refernce
to it in the software as i did under vb6. The problem is first off if i try
to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\Syste m32) i get a strange error saying the dllregisterserv er entry
point is not found ? If i try to run the software i get a the exception. So
im guessing ive done something wrong along the way and need a bit of help to
get back on track. The .EXE file normally runs of a mapped network drive and
the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks
Nov 21 '05 #1
4 7393
Jm
Hi all

Well i half solved my problem, i found that i had to assign a strong name to
my dll and put in the assembly directory on the machine. Which it now runs
from local hard drive ok but not from network, what else am i doing wrong ?

"Jm" <ja*****@ihug.c om.au> wrote in message
news:cr******** **@lust.ihug.co .nz...
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it bit by bit. The program uses a dll which contains a servername and domain name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long as it was registered. Now ive made a new dll and compiled it and made a refernce
to it in the software as i did under vb6. The problem is first off if i try to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\Syste m32) i get a strange error saying the dllregisterserv er entry point is not found ? If i try to run the software i get a the exception. So im guessing ive done something wrong along the way and need a bit of help to get back on track. The .EXE file normally runs of a mapped network drive and the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks

Nov 21 '05 #2
>Which it now runs
from local hard drive ok but not from network, what else am i doing wrong
?
Is security the issue here?

http://tinyurl.com/48z5l

I usually just run the wizard and chose "Adjust .Net Security" and grant the
computer Full Trust for intranet zone. Probably not the safest thing to do,
but it works and I only got to do it once.

Greg

"Jm" <ja*****@ihug.c om.au> wrote in message
news:cr******** **@lust.ihug.co .nz... Hi all

Well i half solved my problem, i found that i had to assign a strong name
to
my dll and put in the assembly directory on the machine. Which it now runs
from local hard drive ok but not from network, what else am i doing wrong
?

"Jm" <ja*****@ihug.c om.au> wrote in message
news:cr******** **@lust.ihug.co .nz...
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it

bit
by bit. The program uses a dll which contains a servername and domain
name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long as

it
was registered. Now ive made a new dll and compiled it and made a
refernce
to it in the software as i did under vb6. The problem is first off if i

try
to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\Syste m32) i get a strange error saying the dllregisterserv er

entry
point is not found ? If i try to run the software i get a the exception.

So
im guessing ive done something wrong along the way and need a bit of help

to
get back on track. The .EXE file normally runs of a mapped network drive

and
the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks


Nov 21 '05 #3
Jm
Hi greg

Yep, was a security issue, all fixed now. Thanks

"Greg Burns" <greg_burns@DON T_SPAM_ME_hotma il.com> wrote in message
news:Og******** ******@tk2msftn gp13.phx.gbl...
Which it now runs
from local hard drive ok but not from network, what else am i doing wrong ?
Is security the issue here?

http://tinyurl.com/48z5l

I usually just run the wizard and chose "Adjust .Net Security" and grant

the computer Full Trust for intranet zone. Probably not the safest thing to do, but it works and I only got to do it once.

Greg

"Jm" <ja*****@ihug.c om.au> wrote in message
news:cr******** **@lust.ihug.co .nz...
Hi all

Well i half solved my problem, i found that i had to assign a strong name to
my dll and put in the assembly directory on the machine. Which it now runs from local hard drive ok but not from network, what else am i doing wrong ?

"Jm" <ja*****@ihug.c om.au> wrote in message
news:cr******** **@lust.ihug.co .nz...
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it

bit
by bit. The program uses a dll which contains a servername and domain
name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long
as it
was registered. Now ive made a new dll and compiled it and made a
refernce
to it in the software as i did under vb6. The problem is first off if i

try
to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\Syste m32) i get a strange error saying the dllregisterserv er

entry
point is not found ? If i try to run the software i get a the
exception. So
im guessing ive done something wrong along the way and need a bit of
help to
get back on track. The .EXE file normally runs of a mapped network
drive and
the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks



Nov 21 '05 #4
Jm
Hi all

Is it possible to trap this error (the error being that a referenced dll has
not been added to the assembly cache on the machine) ?

Thanks

"Jm" <ja*****@ihug.c om.au> wrote in message
news:cr******** **@lust.ihug.co .nz...
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it bit by bit. The program uses a dll which contains a servername and domain name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long as it was registered. Now ive made a new dll and compiled it and made a refernce
to it in the software as i did under vb6. The problem is first off if i try to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\Syste m32) i get a strange error saying the dllregisterserv er entry point is not found ? If i try to run the software i get a the exception. So im guessing ive done something wrong along the way and need a bit of help to get back on track. The .EXE file normally runs of a mapped network drive and the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks

Nov 21 '05 #5

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

Similar topics

1
6399
by: Ethan | last post by:
I made a program that works fine as long as its on my machine, but as soon as i move it to a network drive it stops working. I'm still trying to run it on my machine just from a network drive and it gives me system.typeinitializationexception. Anyone know what changes when i move it to a network drive and try running it from there? I have also tried running it on a machine with .net
2
14051
by: Paul Gronka | last post by:
I've got a VB.NET windows application (written in VS .NET 2003) that makes a call to WMI for retrieving the MAC Address from the client's PC. It works on 4 out of the 5 PC's tested so far. All the workstations are DELLs running XP SP1a with the 1.1 .NET Framework. The following line of code generates an exception on the one PC: Dim oMac As New System.Management.ManagementClass("Win32_NetworkAdapterConfiguration") The error it...
1
2273
by: sys | last post by:
I made a smart client that I purposed to offer on a web server. But when I try to run it by dint of Internet Explorer, I get the System.TypeInitializationException in the IEExec.exe thread. My exe is signed and has full trust on my computer. And when I start the programm directly (C:\Inetpub\myfolder\sample.exe) it works fine. Has somebody an idea?
0
1654
by: Sagaert Johan | last post by:
this code using System; using System.Net.Sockets; namespace ConsoleApplication1 { /// <summary> /// Summary description for Class1. /// </summary>
3
23110
by: nick | last post by:
The program runs well on Local harddisk. But it always popup the exception if I run it on Netware mapping disk. After debugger say there is no source code on the exception. Also the following error shows. Very strange. Unhandled Exception: System.TypeInitializationException: The type initializer fo r "handnetconsole.Monitor" threw an exception. ---> System.Security.SecurityExce ption: Request failed.
1
4045
by: Maqsood Ahmed | last post by:
Hello, We have encountered a System.TypeInitializationException in our product. This exception occurs while closing the application when application called excel.Quit(). excel is an Excel.ApplicationClass object. The application was unable to load 'Microsoft.Office.Interop.Excel' file. Following the pre-bind state information: === Pre-bind state information === LOG: DisplayName = Microsoft.Office.Interop.Excel, Version=10.0.4504.0,
0
1499
by: user | last post by:
After starting a Windows Forms Application developed with VS 2005 Prof Beta 2, built in "Release" mode, I get "An unhandled exception of type 'System.TypeInitializationException' " When buildung in "Debug" mode, the application runs fine. Can anybody tell me whats wrong? Thanks
3
3711
by: linaj | last post by:
Hi, I have singleton class in C#: class Logger { static Logger lInstance = new Logger(); private Logger() {}
1
1494
by: nasambur | last post by:
Hi, i hav two classes as following; class1.cs ---------- namespace NAS { // fields // properties
0
601
by: =?Utf-8?B?TWFyY3VzIFNjaGFlZmVy?= | last post by:
Hi everybody, I'm working on my application for appr. 2 years and now suddenly I got an System.TypeInitializationException in one of my global modules. The error is thrown at the first call of a subroutine out this module. The code I was programming isn't related in any way with this module and I even hadn't loaded this module into the dev. enviroment the first time the error occured.
0
9718
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
9596
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
10617
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...
0
10364
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
7649
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
6876
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4328
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
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
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.