473,395 Members | 1,412 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,395 software developers and data experts.

System.TypeInitializationException

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%\System32) i get a strange error saying the dllregisterserver 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 7339
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.com.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%\System32) i get a strange error saying the dllregisterserver 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.com.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.com.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%\System32) i get a strange error saying the dllregisterserver

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@DONT_SPAM_ME_hotmail.com> wrote in message
news:Og**************@tk2msftngp13.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.com.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.com.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%\System32) i get a strange error saying the dllregisterserver

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.com.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%\System32) i get a strange error saying the dllregisterserver 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
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...
2
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...
1
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...
0
by: Sagaert Johan | last post by:
this code using System; using System.Net.Sockets; namespace ConsoleApplication1 { /// <summary> /// Summary description for Class1. /// </summary>
3
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...
1
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...
0
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...
3
by: linaj | last post by:
Hi, I have singleton class in C#: class Logger { static Logger lInstance = new Logger(); private Logger() {}
1
by: nasambur | last post by:
Hi, i hav two classes as following; class1.cs ---------- namespace NAS { // fields // properties
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.