VB.Net 2003 “应用程序生成了一个无法处理的异常”故障分析与解决

前端之家收集整理的这篇文章主要介绍了VB.Net 2003 “应用程序生成了一个无法处理的异常”故障分析与解决前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

刚接触VB.net,前几天写了个TCP服务器程序,在自己电脑上,完全没问题。

传到一个win2003 sp1的机器上 无法运行,

出现 应用程序生成了一个无法处理的异常 这种错误

折腾了一天,问题解决,总结出了一些办法,希望对读者有帮助。

(前提是在自己电脑上可以正常运行)

可能原因1: 引用了VB 6的外部ActiveX控件(如Common Dialog、MCI、MSWinSock等)

  分析: 如果你在用户的电脑装上VB.Net 2003会发现,这个控件确实无法引用,错误为“没有使用此 ActiveX 控件的许可证”。经过一番搜索,找到解决方案。

  解决: 在用户的电脑,将以下内容保存为注册表存根(*.reg)后导入

REGEDIT
HKEY_CLASSES_ROOT/Licenses = Licensing: Copying the keys may be a violation of established copyrights.

// Masked Edit Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/BC96F860-9928-11cf-8AFA-00AA00C00905 = mmimfflflmqmlfffrlnmofhfkgrlmmfmqkqj

// Chart Control 6.0 (OLEDB) license key
HKEY_CLASSES_ROOT/Licenses/12B142A4-BD51-11d1-8C08-0000F8754DA1 = aadhgafabafajhchnbchehfambfbbachmfmb

// Common Dialog Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/4D553650-6ABE-11cf-8ADB-00AA00C00905 = gfjmrfkfifkmkfffrlmmgmhmnlulkmfmqkqj

// ADO Data Control 6.0 (OLEDB) license key
HKEY_CLASSES_ROOT/Licenses/C4145310-469C-11d1-B182-00A0C922E820 = konhqhioohihphkouimonhqhvnwiqhhhnjti

// Common Controls-3 6.0 license key
HKEY_CLASSES_ROOT/Licenses/38911DA0-E448-11D0-84A3-00DD01104159 = mcpckchcdchjcjcclidcgcgchdqdcjhcojpd

// Windows Common Controls-2 5.0 (SP2) license key
HKEY_CLASSES_ROOT/Licenses/9E799BF1-8817-11cf-958F-0020AFC28C3B = uqpqnqkjujkjjjjqwktjrjkjtkupsjnjtoun

// Windows Common Controls license key
HKEY_CLASSES_ROOT/Licenses/57CBF9E0-6AA7-11cf-8ADB-00AA00C00905 = aahakhchghkhfhaamghhbhbhkbpgfhahlfle

// Data Bound Grid Control 5.0(SP3) license key
HKEY_CLASSES_ROOT/Licenses/556C75F1-EFBC-11CF-B9F3-00A0247033C4 = xybiedobrqsprbijaegcbislrsiucfjdhisl

// Data Bound List Controls 6.0 license key
HKEY_CLASSES_ROOT/Licenses/096EFC40-6ABF-11cf-850C-08002B30345D = knsgigmnmngnmnigthmgpninrmumhgkgrlrk

// Internet Transfer Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/78E1BDD1-9941-11cf-9756-00AA00C00908 = yjrjvqkjlqqjnqkjvprqsjnjvkuknjpjtoun

// Multimedia Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/B1EFCCF0-6AC1-11cf-8ADB-00AA00C00905 = qqkjvqpqmqjjpqjjvpqqkqmqvkypoqjquoun

// Chart Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/7C35CA30-D112-11cf-8E72-00A0C90F26F8 = whmhmhohmhiorhkouimhihihwiwinhlosmsl

// Windows Common Controls-2 6.0 license key
HKEY_CLASSES_ROOT/Licenses/4F86BADF-9F77-11d1-B1B7-0000F8753F5D = iplpwpnippopupiivjrioppisjsjlpiiokuj

// Windows Common Controls 6.0 license key
HKEY_CLASSES_ROOT/Licenses/ED4B87C4-9F76-11d1-8BF7-0000F8754DA1 = knlggnmntgggrninthpgmnngrhqhnnjnslsh

// Comm Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/4250E830-6AC2-11cf-8ADB-00AA00C00905 = kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun

// DataGrid Control 6.0 (OLEDB) license key
HKEY_CLASSES_ROOT/Licenses/CDE57A55-8B86-11D0-b3C6-00A0C90AEA82 = ekpkhddkjkekpdjkqemkfkldoeoefkfdjfqe

// DataList Control 6.0 (OLEDB) license key
HKEY_CLASSES_ROOT/Licenses/A133F000-CCB0-11d0-A316-00AA00688B10 = cibbcimbpihbbbbbnhdbeidiocmcbbdbgdoc

// DBWin license key
HKEY_CLASSES_ROOT/Licenses/D015B071-D2ED-11d0-A31A-00AA00688B10 = gjdcfjpcmjicjcdcoihcechjlioiccechepd

// MSDBRPT license key
HKEY_CLASSES_ROOT/Licenses/9DF1A470-BA8E-11D0-849C-00A0C90DC8A9 = cchcqjejhcgcqcfjpdfcdjkckiqikchcojpd

// FlexGrid Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/72E67120-5959-11cf-91F6-C2863C385E30 = ibcbbbebqbdbciebmcobmbhifcmciibblgmf

// MAPI Controls 6.0 license key
HKEY_CLASSES_ROOT/Licenses/899B3E80-6AC6-11cf-8ADB-00AA00C00905 = wjsjjjlqmjpjrjjjvpqqkqmqukypoqjquoun

// MSRDO 2.0 license key
HKEY_CLASSES_ROOT/Licenses/B1692F60-23B0-11D0-8E95-00A0C90F26F8 = mjjjccncgjijrcfjpdfjfcejpdkdkcgjojpd

// RemoteData Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/43478d75-78e0-11cf-8e78-00a0d100038e = imshohohphlmnhimuinmphmmuiminhlmsmsl

// Windowless Controls 6.0 license key
HKEY_CLASSES_ROOT/Licenses/80E80EF0-DBBE-11D0-BCE2-00A0C90DCA10 = qijimitpmpnpxplpvjnikpkpqoxjmpkpoivj

// PictureClip Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/6FB38640-6AC7-11cf-8ADB-00AA00C00905 = gdjkokgdldikhdddpjkkekgknesjikdkoioh

// Rich TextBox Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/DC4D7920-6AC8-11cf-8ADB-00AA00C00905 = iokouhloohrojhhhtnooiokomiwnmohosmsl

// Sheridan Tab Control license key
HKEY_CLASSES_ROOT/Licenses/190B7910-992A-11cf-8AFA-00AA00C00905 = gclclcejjcmjdcccoikjlcecoioijjcjnhng

// SysInfo Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/E32E2733-1BC5-11d0-B8C3-00A0C90DCA10 = kmhfimlflmmfpffmsgfmhmimngtghmoflhsg

// Winsock Control 6.0 license key
HKEY_CLASSES_ROOT/Licenses/2c49f800-c2dd-11cf-9ad6-0080c7e7b78d = mlrljgrlhltlngjlthrligklpkrhllglqlrk

      你可以制作安装程序,自动导入这段注册表。

可能原因2: .NET Framework 语言包不同

  分析: 使用Visual Studio.Net 2003开发的应用程序,使用.Net Framework 1.1,如果开发者的Framework为英文版,而用户的Framework为中文版,或类似情况,可能出现这种问题。

  解决: 使用户电脑与开发者电脑的语言包一致

可能原因3: 运行所需的库文件缺失

  分析: 可能是你引用的ActiveX控件或.NET库的OCX或DLL文件没有随软件一同发布,导致程序找不到库文件

  解决: 发布时带上引用的DLL或OCX文件

猜你在找的VB相关文章