What argument can be passed to Server.CreateObject function in VBScript? [duplicate] - vbscript

This question already has an answer here:
Error ASP 0177: 8007007e CreateObject fails for COM DLL
(1 answer)
Closed 11 months ago.
I'm working on a legacy application developed in classic ASP. One of pages has code written which goes like this -
Set secCon = Server.CreateObject("foo.methodname")
secCon.prop1 = Method1
I can't find any definition of foo.methodname anywhere in the code which is very frustrating. I guess my question is whether there is a way to create an instance of an object which doesn't have any definition in the code you're working on.

That’s just a placeholder / example
Usually you’d use Server.CreateObject to create to an external app, library or process, like for Database Connection, as an example
Worth reading this https://www.w3schools.com/asp/met_createobject_server.asp

Related

.Net 6 WebApplicationBuilder.WebHost.CaptureStartupErrors not working

I'm trying to migrate from Startup model to the minimal .NET 6 WebApplication method of running a web application, and I'm specifically interested in keeping the CaptureStartupErrors functionality working.
I am calling the following line on my WebApplicationBuilder, but it makes no difference:
webApplicationBuilder.WebHost.CaptureStartupErrors(true);
Since the code is now simply all laid out flat in the Program.cs' Main method, I actually don't know how this would actually work. If I throw an exception there, it will just exist the program. Am I missing something?

How to get clipboard content origin or generator [duplicate]

This question already has an answer here:
Get the origin data source with System.Windows.Clipboard?
(1 answer)
Closed 4 years ago.
My application is consuming HTML from clipboard.
I am trying to find a method that allows to get origin of the content, ideally to have some function that returns one of enum SOURCE { EMAIL, WORD, EXCEL, WEB, etc. }
So far I am using two sources of the information:
<meta generator="..." /> that comes in CF_HTML.
url of clipboard content (part of CF_HTML data).
But neither one is reliable for identification purposes. For example generator equals to "Microsoft Word 15" on content coming from MS Word, Windows Mail, MS Outlook. But EXCEL is fine - "Microsoft Excel 15".
I was also trying to get some meaningful info from GetClipboardOwner() API but it returns some generic window like "CLIPBOARDWND" or some as such.
So is the question: is there any stable method to get origin meta information of clipboard content?
Update: A bit of context, I am writing personal note taking application in Sciter where capture source should allow to classify notes properly (see "Attributes"):
i dont know if this is old, but you might check this answer: Get the origin data source with System.Windows.Clipboard?
if you can get the origin object then you can create a login to get what kind of app it is

coldfusion session variable not defined

Ive been monitoring the log files of my application recently and its got quite a few references of a certain session variable apparently not existing.
I Know its been defined, as its been part of the application since we built the very first version around 4 or 5 years ago.
So what Im wondering is... if CF throws an error stating that the session variable is undefined. is this an example of a race condition in CF ?
Or is there any other thing that could be causing this generally ?
The session variable is defined when the user logs in as part of their login credentials using a struct containing the users profile information.
At the point of adding an item to the users shopping cart, we must leverage a particular key of this struct to post to a legacy system.
From time to time we see that this variable is not defined. Which is really strange as its definitely there because if it wasnt, the struct that it resides in wouldnt exist.
This application is an application that has been migrated from CF 8 to CF10 and it could be the reason as to the cause of the issue.

Web API integrated with Entity framework 5 with database first approach [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have followed below steps
Created a new C# solution in VS 2012
Added a c# class Library project for creating Model from existing Database
Added a new EDMX file off of an existing database to above project
Built the project succesfully
added new C# Class library project for creating a repository class
Added a reference to Library project created in the step 1
Added a new class "XyzRepository" that has CRUD operations (written in L2E) required for web service methods
Built successfully
Created a new MVC 4 project of type WebAPI template and addded a ApiController
Inside the Api Controller Created a HttpPost method "UpdateStatus" with return type HttpResponseMessage
Instantiated XyzRepository and invoked _respository.UpdateStatus a bollean return type method
Constructed response using Content = new StringContent("");
Returned response
Consumed WebAPI using HttpClient from another MVC 4 project of type Internet Application template.
Ran the MVC 4 page to see the result and everything works fine.
Now the question
I have seen tonnes of discussions in several forums where Web API is integrated with repository patterns that interacts with POCO classes with code first approach. This approach uses IoC, DI and DatabaseCreation when model changes and so on.
Since i have a existing database i used Database First approach. But I am not entirely sure if my design has any flaws drawbacks in terms of concurrency, performance etc. Since all examples used code first approach that makes me nervous.
I wanted to hear opinions from experts so I don't get surprised later in the cycle.
We are using the same pattern for a large scale web application and there are no issues with concurrency. We have 40,000 people using the system daily with the Application hosted on Windows Azure cloud platform

When does OnEndPage method run for object created indirectly by ASP (classic) page

I'm trying to debug an issue which may be due to a delay in running some cleaup code that's in an OnEndPage method.
I have a LoginPage class (in VB6) which is normally created directly by an ASP page. But in another case, an ASP page creates another VB object, which then does approximately this
Set oLoginPage = Server.CreateObject("LoginPage")
Call oLoginPage.DoLogout;
Set oLoginPage = Nothing
Some crucial cleanup is done in the OnEndPage method of LoginPage class, and it looks like this happens asynchronously, and with enough of a lag to cause problems.
Can anyone confirm that OnEndPage runs asynchronously, and might lag a bit? I've not been able to find any mention of this in documentation, just that objects are garbage collected "as soon as the reference count goes to zero." But that doesn't seem to be what's happening in my code.
This is a VB6 application called by an ASP page. It needs to run on multiple versions of IIS from 5.0 upwards.
Thanks.
O.K., it's simpler than I thought. Apparently the OnEndPage method is run by ASP after all the rest of the stuff on the page is finished. This applies even to VB objects created indirectly (that is, created by VB objects that were created by the ASP page), as long as they are created using Server.CreateObject().

Resources