Visual Basic Development Bookmark and Share   
 Home > Visual Basic Interop and Upgrade > Error Loading DLL
 

Error Loading DLL

Hi!

I have looked everywhere in net but none solved my issue. I have a project that was created in VB6+sql server 2000. I am trying to migrate it to VB.NET.
The project is made up of3 sub projects. data access layer, business layer and presentation layer. I successfully migrated both DAL and BOL using VBupgrade.exe but when I tried to upgrade PL it complainted and said ensure it complies. originally i have vs installed in 2005 and not vb6. just to ensure that the project compiles fine I installed vb6.at times I also get error which is mentioned as in http://www.eggheadcafe.com/forumarchives/VisualBasiccom/Jan2006/post26072868.aspso I thought I should start from beginning and I opened all 3 vb6 project in vb6 environment. set the compatibily to project only and tried to compile first DAL, and then BL regenerated dll for each and when I tried to generate for PL it says access denied to overwrite existing DLL. i couldnt figure out why. now when I simply do "start with full compile in PL" I get error "Compile Error: Error loading DLL" which hits inclass moduleas below
-----------------------------------------------------------------------------
'local variable(s) to hold property value(s)
Option Explicit

Public Function FGetErrAction(Response As Response, lngErrNo As Long, strErrSrc As String, strErrDsc As String) <--here error isthrown

Dim strReturnAction As String

On Error GoTo FGetErrAction_Error

strReturnAction = FDBFunctions(lngErrNo, strErrSrc, strErrDsc)

'Response.Clear

Response.Write strReturnAction

FGetErrAction_Exit:
Exit Function

FGetErrAction_Error:

Call FLogEvent(Err.Number, Err.Source, Err.Description)

Response.Write conErrErr1

End Function
------------------------------------------------------------------
I have already spend more than 3 days not sure whats wrong.

could anyone help me please? I have tried searching for reference offunction FGetErrAction but I cant see any reference. when i delete everything from this module the error hits at .bas module as below
Private Sub SOpenConnection(ByRef adoconErrors As ADODB.Connection, ByRef adoconErrLog As ADODB.Connection)
'
'Descr: Opens and returns ADO Errors and ErrLog database connection's
'
'Inputs:
'adoconErrors - ADO connection
'adoconErrLog - ADO connection
'
'process: Opens ADO connection's

Dim strConn As String
Dim strUsID As String
Dim strPass As String
Dim strDSN As String

On Error GoTo SOpenConnection_Error

Set adoconErrors = CreateObject("ADODB.connection")

adoconErrors.open conErrorsFileDsn, conErrUserId, conErrUserPwd

Set adoconErrLog = CreateObject("ADODB.connection")

adoconErrLog.open conErrLogFileDsn, conErrUserId, conErrUserPwd

Exit Sub

SOpenConnection_Error:

Err.Raise Err.Number, Err.Source, Err.Description

End Sub

I think its something to do with ADODB.connection but what should I do about it?

could any one please help?

foremorecoast  Tuesday, May 26, 2009 1:43 PM
Are there any errors in the Output window that would provide more information about the DLL in question?

Also, if you're attempting to compile any DLLs from VB 6.0 you may be getting an access denied error because the file is in use by your .NET app. You can generally use the Process Explorer utility to identify these types of problems.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Wednesday, May 27, 2009 1:48 PM
Also read chapter 14 and chapter 20 of this book(download it by Entire Book). Commonly there are some changes in data binding. You need to modify that part.

http://msdn.microsoft.com/en-us/vbrun/ms788236.aspx
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Riquel_Dong  Thursday, May 28, 2009 3:52 AM
Hi!

I am using "Microsoft Visual Basic 6.0
For 32 Bit Windows Development" tool to compile the project. by doing CTRL+ALT+O doesnt produce any output or anything. I think the file is in use as compatibily level was set to binary. is there any way I can trace the error to get detail information about what its complaining about?

thankyou

Bikash
foremorecoast  Thursday, May 28, 2009 8:07 AM

OK, I didn't realize the error was occurring in the VB 6.0 environment.

Did you check your project References to see if any of the libraries are listed as "missing"?


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Thursday, May 28, 2009 11:59 AM
I am not so used to vb 6.0. I am more of a vb.net programmer. I can see the BOL it requires is in the reference. what else reference should i need
I think it does have all the references that are required. another thing. It has .Dsr file and when i try to click on it says "IIS or peer web services version 3.0 or later must be installed to run webclasses" but i do have IIS 6.0 installed. please help.. or at least help me to get some useful error so i could track it down. thankyou
foremorecoast  Thursday, May 28, 2009 12:08 PM

Let's back up a bit. First, can you compile the application (and COM components) in Visual Basic 6.0 w/o any problems? Does the resulting executable run w/o any errors?


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Thursday, May 28, 2009 12:56 PM

I can compile both BOL.dll and DAL.dll except presentationlayer.dll. this is where my whole problem lies

thankyou. its a web application that i am trying to compile.

foremorecoast  Thursday, May 28, 2009 1:58 PM
OK so with the Presentationlayer project open in Visual Basic 6.0, if you click on Project...References are any of the libraries added to the projectlisted as "missing"?
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Thursday, May 28, 2009 2:20 PM
no it doesn't. does it ever? I have never seen anything called 'Missing' in references as yet. if there should be missing should it be at the top of the list where everything is checked?

thankyou
foremorecoast  Thursday, May 28, 2009 10:55 PM
humm could be realated to this article http://support.microsoft.com/default.aspx?scid=kb;EN-US;248418I'll give it a try and post if it fixes. thankyou
foremorecoast  Thursday, May 28, 2009 11:45 PM

after following the article above. I installed service pack 6.0. I managed to successfully compile and create DLL. now when I run the project I get warning

"The MTSTransactionMode property for one or more classes in this project has been set to indicate that the class
should be run under MTS. To debug an MTS class, you must make the project into a DLL. IT is strongly recommended that
you set the Project Properties, Version Compatibility open to Binary Compatibility using that DLL and then register the
DLL with MTS. If you wish to continue anyway, select 'Yes'", I ignored the error. ran the service called Distributed transaction cordinator and it opens up

http://localhost/VSPresentationLayer/VaultSystem.ASP with error below Error Type:
Server object, ASP 0178 (0x800A0005)
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
/VSPresentationLayer/VaultSystem.ASP, line 14

Browser Type:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)

Page:
GET /VSPresentationLayer/VaultSystem.ASP
----
this article gave bit of hunch but I failed to find "VB ASP debugging" as I am using XP
http://support.microsoft.com/kb/259725/EN-US/

could you please point me as to how i could fix this issue? also when i expand DCom config it was asking me to register lots of things with {C00998} not sure what that meant but I think its registering COM component.

thankyou

foremorecoast  Friday, May 29, 2009 2:05 PM
What is VaultSystem.ASP? Is this a Web Class project?
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Friday, May 29, 2009 2:22 PM
yes it is. thank you
foremorecoast  Friday, May 29, 2009 2:38 PM
What is the line (14) of codein the ASP page that is generating the error?

Edit:

Also, check out the below MS KB article to see if it applies"

BUG: ASP error 80070005 "Server.CreateObject Access" when you create a Visual Basic component



Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Friday, May 29, 2009 4:14 PM

I am using win XP so that link is not really helpful. below are the codes that are in ASP page

<%
Server.ScriptTimeout=600
Response.Buffer=True
Response.Expires=0

If (VarType(Application("~WC~WebClassManager")) = 0) Then
Application.Lock
If (VarType(Application("~WC~WebClassManager")) = 0) Then
Set Application("~WC~WebClassManager") = Server.CreateObject("WebClassRuntime.WebClassManager")
End If
Application.UnLock
End If

This is where error is->>>>Application("~WC~WebClassManager").ProcessNoStateWebClass "VSPresentationLayer.VaultSystem", _
Server, _
Application, _
Session, _
Request, _
Response
%>

thankyou

foremorecoast  Saturday, May 30, 2009 12:55 AM
Hi!

I forgot to mention it automatically createsa virtual directory when i ran the project. after reading this article http://www.brainbell.com/tutors/Visual_Basic/Foundations_The_Free_Stuff.htm, http://www.avdf.com/oct98/art_id003.htmlI am getting bit familiar with web class, how it creates asp file dynamically etc. but my objective is to convert the existing VB 6 web application into asp.net.

when I have a look into the virtual directory in IIS 6.0, in ASP.NET tab its pointing to 2.0 and looking for web.config project in application root. entirely this is incorrect. my first objective is to run the project as is and then look into migrating it into vb.net as I am notvery familiar with web classes etc and wanting to convert into asp.net

I am not sure what to do. I was thinking this will be purely migrating the code to .net and it will work fine. now I am guessing it will be a major conversion as there is only one asp file that is created dynamically and in asp.net i have to create seperate pages for every event. could you please give me some valuable advise as to how should i proceed with my vb 6 to .net 2.0 migration. thankyou
foremorecoast  Saturday, May 30, 2009 1:06 AM

The error for that line of codeis indicating that an instance of your Web Class cannot be created. I would suspect that it's either not registered or that there is a security issue of some type. Check the following MS KB article:

PRB: Server Object Error 'ASP 0178 : 800a0005' From WebClasses

At the moment you're not using .NET (it's Classic ASP and VB 6.0)so the Framework version isn't an issue. As far as converting the application is concerned, I would do some Googling with respect to converting a WebClass to an ASP.NET Web Form app.

Migrating to Web Forms



Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Saturday, May 30, 2009 2:25 AM

that didnt help too. I followed the instruction from article http://support.microsoft.com/kb/259725/EN-US/but still same error.

Btw, when i run the project by hitting F5, I below screen appears and I click yes.

Binary Compatibility has not been set for the project 'VSPresentationLayer'.

The MTSTransactionMode property for one or more classes in this project has been set to indicate that the class
should be run under MTS. To debug an MTS class, you must make the project into a DLL. It is strongly recommended that you
set the Project Properties, Version Compatibility option to Binary Compatibility using that DLL, and then register
the DLL with MTS. If you wish to continue anyway, select 'Yes'

I dont know may be it has something to do with this one too?
thankyou

foremorecoast  Saturday, May 30, 2009 4:13 AM
Did you check the Event log for errors relating to your problem?
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Saturday, May 30, 2009 1:50 PM

Hi, thankyou. after following this article I managed to fix few error shown in eventvwr http://geekswithblogs.net/mhamilton/archive/2006/12/19/101568.aspxthe initial error was iusr_computername and iwam_computername need to have some permission to machine debug manager. after giving permission I get another error that says.
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID

{DEB00F6B-CA04-473A-B29E-AA3F25EF07B5}

to the user SHRESTHA\IUSR_SHRESTHA SID (S-1-5-21-823518204-1078081533-839522115-1004). This security permission can be modified using the Component Services administrative tool.

upon searching for string "DEB00F6B-CA04-473A-B29E-AA3F25EF07B5" in regedit It shows application name 'VSPresentationLayer.VaultSystem'. Now I am guessing I need to register this dll in registry and give permssion to iuser_machine name? I did register the dll but i canfind in dcom folder as {DEB00F6B-CA04-473A-B29E-AA3F25EF07B5}. I have given launch and activation permission to internet guest account but seems to disappear.I have also giving full access to root directory of web folder to iusr_computername.
thankyou

foremorecoast  Sunday, May 31, 2009 6:03 AM
sorry this article fixes that error. http://www.d-a-l.com/help/windows-xp-help/52790-local-activation-permission-problem.htmlbut getting another error.
WebClass Runtime (0x800A801D)
An unspecified error has occurred
/VSPresentationLayer/VaultSystem.ASP, line 14

this time when i go to eventvwr the error is logged in 'application' level and below are the details

The WebClass runtime trapped the following error

Source: VaultSystem

Thread ID: 3228

Description: An unspecified error has occurred

foremorecoast  Sunday, May 31, 2009 7:07 AM
searched everywhere in net I dont know the error is not really specific. I am suspecting could it be database connection related?
foremorecoast  Sunday, May 31, 2009 1:52 PM
You can also post this issue to Migrating from ASP to ASP.NET for helps.

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Riquel_Dong  Monday, June 01, 2009 5:56 AM

this is the error in eventvwr

Event Type:Error
Event Source:WebClassRuntime
Event Category:None
Event ID:1
Date:6/1/2009
Time:10:25:58 PM
User:N/A
Computer:SHRESTHA
Description:
The WebClass runtime trapped the following error

Source: VaultSystem
Thread ID: 4268
Description: An unspecified error has occurred

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

please help. thankyou

foremorecoast  Monday, June 01, 2009 12:39 PM
HI Paul

below error was removed after following article http://www.aspdbsales.com/HowToRegister.asp

"The MTSTransactionMode property for one or more classes in this project has been set to indicate that the class
should be run under MTS. To debug an MTS class, you must make the project into a DLL. It is strongly recommended that you
set the Project Properties, Version Compatibility option to Binary Compatibility using that DLL, and then register
the DLL with MTS. If you wish to continue anyway, select 'Yes'"


how could i trap the exact error? this is the full error

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services


Technical Information (for support personnel)

  • Error Type:
    WebClass Runtime (0x800A801D)
    An unspecified error has occurred
    /VSPresentationLayer/VaultSystem.ASP, line 14

  • Browser Type:
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)

  • Page:
    GET /VSPresentationLayer/VaultSystem.ASP

  • Time:
    Tuesday, June 02, 2009, 11:51:51 PM

  • More information:
    Microsoft Support

foremorecoast  Tuesday, June 02, 2009 1:25 PM
Did you check your dependent components to determine which are configured to run under MTS/COM+. My guess is that it would be your data access component(s) and you can verify this by looking at the MTSTransactionMode property of the Class module in the Visual Basic development environment.

If it is set up to require a transaction then I would re-compile (w/Binary version compatibility) and then register (add it) to COM+ using the Component Services applet in Administrative Tools under Control Panel. Actually I would re-compile all of your dependent components for binary version compatibility and then re-compile the WebClass project and try running it again.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Tuesday, June 02, 2009 1:55 PM
All three projects DAL, BOL and PL uses MTSTransactionMode. these are the steps i followed
1. set binary mode in DAL, compiled it and created new dll
2. set binary mode in BOL, compiled it and created new dll that has ref to new DAL.dll
3. set binary mode in PL, compiled it and created new dll that has ref to new BOL.dll

registered to Com+ to all component of DAL, BOL, PL still same error. all of them are in binary version compatibility still same.

please help
foremorecoast  Tuesday, June 02, 2009 3:00 PM
Did any of the components start running in COM+ when you ran the WebClass? You can monitor this in the Component Services applet.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Tuesday, June 02, 2009 5:25 PM
none of the balls with X marks start running if thats what you mean?
foremorecoast  Wednesday, June 03, 2009 1:37 AM
Yes, that's what I mean. Can youuse aVB 6.0 Form and add the code tocreate instances of these components successfully? If you can, then the problem sounds like it's with running the WebClass.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Wednesday, June 03, 2009 3:11 PM

Hi Paul, do you mean I create a VB 6.0 windows form and try to initialize one of the classes and compile the project? not sure if thats what you meant? If I could initialize, does it means there is no problem running webclass? could you please point me or show an example how could i initialise? I have all the classes and bas files so If I have a class called

Car.cls in my new form I do

Car c = new Car();
c.getWheels();

is this what you mean?

thankyou

foremorecoast  Thursday, June 04, 2009 4:39 AM
I want to make sure that you can start the components in COM+.

Just create a new VB 6.0 app, add references to the components in your project, and then the use code from your WebClass to create instances of the components. What I usually do is create a Form with CommandButton and just put the code in the Click event to test the components.

If the COM+ components are configured and working properly you should see them start up in COM+.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Thursday, June 04, 2009 2:24 PM

Ok I just tried this link http://www.avdf.com/oct98/art_id003.htmland not sure If I came up with codes correctly as I am having problem creating dll. below are the codes

Option Explicit
Option Compare Text

Private Sub WebClass_Start()

Set WebClass.NextItem = WebClass.ServerVars

End Sub
Private Sub ServerVars_Respond()
ServerVars.WriteTemplate
End Sub

Private Sub ServerVars_ProcessTag()
Dim name As Variant

Select Case TagName
Case "WC@ServerVars"
TagContents = "<TABLE BORDER=1>"
TagContents = TagContents & "<TR><TD><b>Server Variables:</b></TD>"
TagContents = TagContents & "<TD><b>Value</b></TD></TR>"
For Each name In Request.ServerVariables
TagContents = TagContents & "<TR><TD>" & name & "</TD>"
TagContents = TagContents & "<TD>" & Request.ServerVariables(name)
TagContents = TagContents & "</TD></TR>"
Next
TagContents = TagContents & "</TABLE>"
Case Else
'no other tags
TagContents = "No tags found"
End Select

End Sub


It also gives same error. thankyou. I am thinking if this works then components in com+ should be fine.

foremorecoast  Thursday, June 04, 2009 2:32 PM
would it be much easier if I just email you the project and have a look? thankyou
foremorecoast  Thursday, June 04, 2009 2:35 PM
Yeah just send the projects (zipped) to my Hotmail e-mail address. It's pclementiv and then@hotmail.com.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Thursday, June 04, 2009 2:46 PM
as per your suggestion I have emailed you the file.btw I am using xp OS, VS 6.0 IDE with service pack 6, sql server 2005.

thankyou for your help.
foremorecoast  Friday, June 05, 2009 7:55 AM
Got it. I will load it up and see if I can get it running.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Friday, June 05, 2009 12:20 PM
OK, here are the steps I followed (and the app ran OK the first time):

1) Created a folder under c:\Inetpub\wwwroot named "vs".
2) Used the IIS applet from Administrative Tools in Control to create a new virtual directory named "vs" using c:\Inetpub\wwwroot\vs.
3) Left all configuration and security settings for the IIS application as the default.
4) Opened the VSBusinessLogicLayer and VSDataAccessLayer projects in VB and compiled both.
5) Opened the VSPresentationLayer project in VB and compiled it.
4) In COM+ created an application named VSand added (registered) the VSBusinessLogicLayer and VSDataAccessLayer components in the application.
5) Copied all the files and subfoldersin the VSPresentationLayer folder to the Inetpub\wwwroot\vs folder.
6) Registered the VSPresentationLayer1.dll file in the Inetput\wwwroot\vs folder using the Regsvr32.exe utility.
7) Ran Internet Explorer and entered the following URL: http://localhost/vs/vaultsystem.asp
8) The following page was displayed: Compass Assessware with URL of http://localhost/vs/homepage.htm?logon=T

This is as far as I went since I probably need some sort of database access to logon I presume. Also, at this point I didn't see any of the components running in COM+ so apparently they are not used until you log in.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Friday, June 05, 2009 7:25 PM

Thanks Paul, I am still getting same error. I am using IIS 6.0. I have already created a application in Com+ called vault, so when i try to add VSBusinessLogicLayer and VSDataAccessLayer it says components already registered. below are the steps that I took to add. browse to COM+
create new application> create empty application>gave name "Vault" and activation type to server application> select account to MSHOME/shrestha(my windows login). inside the application added those components in same way. I can see Vault applicaiton running with X marking moving.

foremorecoast  Saturday, June 06, 2009 2:28 AM
OK, so is the logon screen being displayed or no? I was able to get that far w/o any problems. I didn't test the components as they don't appear to be used when the logon screen is displayed.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Saturday, June 06, 2009 3:36 AM
No I dont get that screen its same screen. when i check in event log it says same error "unspecified error". source is webclassruntime and more info below

The WebClass runtime trapped the following error

Source: VaultSystem

Thread ID: 2400

Description: An unspecified error has occurred

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

foremorecoast  Saturday, June 06, 2009 4:41 AM
foremorecoast  Saturday, June 06, 2009 3:43 PM
Did you try removing the virtual directory(in IIS)and the folder where the files are located and recreating everything? That would be steps 1, 2, 3, 5, 6, 7. Also, you may want to unregister the WebClass DLL and then re-register it after you have copied it to the new virtual directory folder.

Make sure your web server servicesare running as well.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Saturday, June 06, 2009 5:10 PM
thanks Paul that worked. I get to the logon screen. are there any where I can get more information about converting webclases with webforms thankyou once again
foremorecoast  Sunday, June 07, 2009 2:16 AM

when i click on any of the asp page it doesnt work. it takes me to blank screen. I can see application running. does the components should be running too? pages I have tried are

http://localhost/vs/VaultSystem.asp?form=f01006
http://localhost/vs/VaultSystem.asp?form=f01003&WhereFrom=extlogon

how do I debug the presentation layer?

thankyou

foremorecoast  Sunday, June 07, 2009 2:26 AM
another thing, when i do a run with full compile in presentation layer it says virtual directory is going to be created and it creates virtual directory called VSPresentationLayer in IIS. when i try to put a debug in
Private Sub WebClass_Start() it doesnt breaks there. i check the components nothing starts running. "vs" application seems running. please help
foremorecoast  Sunday, June 07, 2009 2:40 AM
Hi Paul, could you please tell me why its not breaking in while debugging? I really dont know how can i determine whats wrong. thankyou
foremorecoast  Tuesday, June 09, 2009 1:16 PM
I haven't had a chance to take a look at the project again. I'll try sometime today.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Tuesday, June 09, 2009 1:45 PM
OK, I got debug working in the environment so I was able to track the problem down.

First, in order to get rid of the Access Denied error when you load the web page, run the IIS applet in Administrative Tools under Control Panel. Find the VSPresentationLayer folder (created by VB)under Default Web Site, right click and select Properties. Click on the Directory Security tab and then the Edit button. Clear the Anonymous access checkbox - the only one selected should be Integrated Windows Authentication. Click on OK to save the security settings and then OK again to close the properties. Close the IIS applet.

Open the TheLot.vbg groupproject. It should contain all of the project files. The first Function I set a debug breakpoint in was called f0002. This is the logon function. The way I figured that out was by looking at the URL in the blank page that appeared after clicking the Logon button (e.g. http://localhost/vs/VaultSystem.asp?form=f00002&browser=Microsoft Internet Explorer). You can do the same for other links. For example, if you click Join Compass it will display http://localhost/vs/VaultSystem.asp?form=f01003&WhereFrom=extlogon, which means that it's calling Function f01003 in the WebClass.

After I set a breakpoint in Function f0002, clicked the Run button in VB (it takes about a half minute to start the web app), andthen clicked on the Logon button on the homepage,I was able to step through the code, which called a business layer function and then a data access function, to see where the problem was. The error handling seemed to be kind of bad because it doesn't raise the error up the call stack once the components have been compiled and configured for COM+. However, it will show up in the Visual Basic IDE.

In any event, the problem is that the application is failing when the data access layer is trying to open the database. It's looking for a DSN (data source name)called Vault.I wouldn't know what type of database is being used since I don't have access to the system where this application runs. If you look in the Data Sources (ODBC) applet under Control Panel's Administrative Tools on your production system you should be able to figure it out. That is what you will need on your development system in order to access the database and successfully run the app.

One other tip, when working on WebClass apps, making changes to the presentation layer and re-running the app, you will need to stop and start IIS quite a bit to unload the Web Class DLL. You can do this easily through the WebClass Designer in VB 6.0, which has a Stop and Start button.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Wednesday, June 10, 2009 6:11 PM
thankyou. I tried to open the lot.vbg project. added a debug when the web page loads it says unspecified error. I unregistered VSPresentationLayer.dll and re-registered it and i could get to the home page screen but upon clicking the login button i couldnt step through to the code. it just goes to the blank screen. when i stop and start the application it again says unspecified error and i had to unregister and re-register the dll not sure what is causing this. could you please provide me step from the begging. that includes adding the com+ component. thankyou. Is there anything I am doing wrong in my end?
foremorecoast  Friday, June 12, 2009 1:38 AM
thankyou. I tried to open the lot.vbg project. added a debug when the web page loads it says unspecified error. I unregistered VSPresentationLayer.dll and re-registered it and i could get to the home page screen but upon clicking the login button i couldnt step through to the code. it just goes to the blank screen. when i stop and start the application it again says unspecified error and i had to unregister and re-register the dll not sure what is causing this. could you please provide me step from the begging. that includes adding the com+ component. thankyou. Is there anything I am doing wrong in my end?

Did you follow my other instructions? Did you change the security for the VSPresentationLayer app in IIS? Forget about the DLL. In order to step through the code you have to run the WebClass from the Visual Basic environment not the DLL.

Also, bring up the WebClass designer and stop and start IIS. Then run the project in Visual Basic again.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Friday, June 12, 2009 2:36 AM
Yes I did follow your instruction. I dont get access denied error despite I tick/untick anonymous access box. I hit F5 by opening the lot.vpg. home page opens up http://localhost/VSPresentationLayer/homepage.htm?logon=T when i enter some value in username and pwd it takes me to blank screen http://localhost/VSPresentationLayer/VaultSystem.asp?form=f00002&browser=Microsoft Internet Explorer but it doesnt break in my break points Function f00002(Response As Response, Request As Request, Session As Session) As String nor at the begining i.e. Private Sub WebClass_Start() thankyou Not sure what I am doing wrong.
foremorecoast  Saturday, June 13, 2009 12:36 AM
one more thing when I hit F5 and type login details in the home page of the browser i can see the application 'vs' start running but it takes me to blank screen could you please help me why its doing this? thankyou
foremorecoast  Sunday, June 14, 2009 12:20 PM
one more thing when I hit F5 and type login details in the home page of the browser i can see the application 'vs' start running but it takes me to blank screen could you please help me why its doing this? thankyou

This doesn't sound right. I would remove the "vs" project from IIS. Just right click on the application under Default Web Site and click Delete. I only had you add this application to get the application working.

There should still be the VSPresentationLayer application in IIS. This is project that you will be running in the Visual Basic development environment. Like I said before, make sure that Anonymous authentication is disabled for this application.

Next, open TheLot project group in Visual Basic. Find the VaultSystem module (under Designers) in the VSPresentationLayer project and double click on it to display the Web Class Designer. Click on the Stop button to stop IIS. After IIS has been stopped click on the Start (Play) button to re-start IIS. This will unload the application from IIS if it is running.

Now find the f00002 Function located in the f00 module. Set a debug breakpoint at the below line:

strlogMeIn = Request.QueryString("logMeIn")

Press F5 or the Play button to start the app. If you receive the MTS warning just click OK. In about 30 seconds to a minute the web application will display in your browser. Enter a user ID and password and click the Login button. After clicking the Login button the you should see the the breakpoint hilighted in Visual Basic. At this point you should be able to step through the code. The code will fail in the OpenConnection function of the m00301 module at the below line:

adoconn.Open conFileDsn, conUserId, conUserPwd

You will notice it's looking for a DSN called Vault (conFileDsn), which would be for establishing a connection to the database. I can't tell you anything about the ODBC DSN since it is not on my system.


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Monday, June 15, 2009 1:37 PM
when I just follow your instruction. hit F5 i get below error

Error Type:
WebClass Runtime (0x800A801D)
An unspecified error has occurred
/VSPresentationLayer/VaultSystem.ASP, line 14

its just too weird. do i need to delete and create com+ component?

please help
foremorecoast  Monday, June 15, 2009 2:04 PM

Did you turn off Anonymous authentication for the VSPresentationLayer app in IIS?


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Monday, June 15, 2009 2:14 PM
yes i did.
foremorecoast  Monday, June 15, 2009 2:15 PM

Try recreating the virtual folder using the following steps:

Run the IIS applet and delete any web application named VSPresentationLayer.
Stop and start the IIS service from the Web Class Designer in Visual Basic.
Click the Start button in Visual Basic to run the Web Class app, it should prompt you to create a new virtual root called VSPresentationLayer. Click OK.
Next, you should see a white page with the (Access Denied) CreateObject error in the web browser. Stop the application in Visual Basic and close the web browser.
Run the IIS applet and disable Anonymous authentication for the (recreated) VSPresentationLayer app.
Go back to Visual Basic and stop and re-start the IIS service from the Web Class Designer.
Set a debug breakpoint in the code that I mentioned before (f00002 Function).
Click on the Start button (or F5) in Visual Basic. The web app should display in the web browser.
Enter a user ID and password and click on the Logon button.
Now look in Visual Basic to see if execution has stopped at the breakpoint you set in the f00002 Function.


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Monday, June 15, 2009 2:44 PM

hi!

I get below error instead of access denied. Please note after disabling anonymous access and running the project just the way you mentioned also produces below error. This is the root of the problem.
--------------
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Click the Refresh button, or try again later.

Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Error Type:
WebClass Runtime (0x800A801D)
An unspecified error has occurred
/VSPresentationLayer/VaultSystem.ASP, line 14


Browser Type:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)

Page:
GET /VSPresentationLayer/VaultSystem.ASP

Time:
Tuesday, June 16, 2009, 5:36:34 PM


More information:
Microsoft Support

-------------

I checked the eventvwr and it has error

----
source: webclassruntime

The WebClass runtime trapped the following error

Source: VaultSystem

Thread ID: 3104

Description: An unspecified error has occurred

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

----

I really dont know whay its happening?
please help. thankyou

foremorecoast  Tuesday, June 16, 2009 8:07 AM
I'm running out of ideas. I think there might be a configuration issue with your machine. One other thing I would suggest, try deleting the files in Internet Explorer's Browsing history(Tools...Internet Options...Delete).

One suggestion I've seen involved uninstalling and re-installing .NET but I really don't know whether that would fix anything.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Tuesday, June 16, 2009 12:45 PM
Hi!

I have done everything except uninstalling .net as i dont see what it has got to do with running asp pages. below are the errors which i dont know about

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services


Technical Information (for support personnel)

  • Error Type:
    WebClass Runtime (0x800A801D)
    An unspecified error has occurred
    /VSPresentationLayer/VaultSystem.ASP, line 14

    could you please tell me what are the steps i should follow so i could get an exact error details. thankyou very much
foremorecoast  Sunday, June 21, 2009 12:38 PM
hi, what do you mean by uninstall and reinstalling .net? are you refering to sdk(3.5 runtime is what i have)or ide(vs .net 2005 is what i have)?
foremorecoast  Monday, June 22, 2009 10:06 AM
Ok, I am confused as to why its working at your end and not mine. I also tried exact same thing in another computer. computer description xp with sp2+IIS 6.0 installed visual studio .net 6.0 environment. installed service pack 6. followed all the steps you mentioned but same.. cant get my codes to debug. now I am asking do you used xp OS and .net 6.0 with service pack 6? are there anything I need to do to get the debug working? please help...thankyou
foremorecoast  Sunday, June 28, 2009 1:31 AM
I used Windows XP SP3. Did you remove the components from COM+? When debugging in the Visual Basic environment you want to make sure you're using the project files in the group project and not the COM+ components.
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Sunday, June 28, 2009 3:58 PM
wow that worked. thanks heaps but I am getting this error.
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I have set up my DSN to be compass with integrated security db pointing to vault database.

my connection looks like this

<%

MM_COMPASSUD_STRING = "DSN=COMPASS;Database=vault;"
%>
foremorecoast  Monday, June 29, 2009 10:38 AM
OK, so now you're as far as I got.

As I mentioned in a prior post, I don't know what that DSN is supposed to be and there is no way for me to figure that out. Those are created by the Data Sources (ODBC) applet under Administrative Tools in Control Panel. It is essentially your database connection. You would either need to check the documentation for the app (if there is any) or check the system where this application is currently running in order to determine what it should be.

BTW, what type of database is this supposed to be?


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Monday, June 29, 2009 12:33 PM
its a sql server database and I have set up a system DNS using integrated security. named DNS as Compass and pointed to vault DB. but still same error. driver i chose was sql server. thankyou
foremorecoast  Monday, June 29, 2009 1:41 PM
If it's a SQL Server database then I wouldn't even bother using a DSN. There are any number of connection strings you can use. See the below link. Since the app is using ADO you can try one of the OLEDB connection string examples:

http://www.connectionstrings.com/sql-server


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Monday, June 29, 2009 5:35 PM
Thank you, thank you, thank you. Registering asp.tlb per the http://support.microsoft.com/default.aspx?scid=kb;EN-US;248418 article solved my problem.
JohnMo  Wednesday, November 11, 2009 4:17 PM

You can use google to search for other answers

Custom Search

More Threads

• Catastrophic failure (Exception from HRESULT : 0x8000FFFF (E_UNEXPECTED))
• msflxgrd.ocx on web page disabled by KB973346
• WinIO.dll is not Registering.
• Unable to upgrade VB 6.0 to VB .NET
• Help links inserted by the VB6 upgrade wizard not working
• TopRow Property (MSHFlexGrid) equivalent in DataGridView?
• Office 2007
• InteropForms Toolkit 2.0 has been released!
• A "loaded" Introp Control - How to?
• Stumped on a problem with users not being able to access our SQL Server