Like the topic says, can ASP Classic use registration free components? This is on Windows Server 2003. If so, how do I go about doing that?
If not, could anyone please provide some alternatives?
By Registration Free I assume you mean DLLs that are not registered as ActiveX components using regsvr32. If that's the case then no, not directly from ASP 3.0 though you could use it remotely via DCOM using CreateObject. The reason why is without registering it there is no ProgID to reference to find the ActiveX component.
By alternative, I guess you don't mean components that do require registration? 'Cause there are loads of those...
A less common way of using COM with ASP that is quite convenient is to use Windows Scripting Components (WSC). From 4GuysFromRolla:
One of the biggest disadvantages of
developing COM components using one of
these high-level languages is the
time-intensive process of altering an
existing COM component. For example,
say that you are developing a COM
component. You add some properties and
methods and start using it on your
site. Now, say that you wanted to add
a new method. After adding this method
you would have to recompile the COM
component, reregister it, and stop and
restart the Web server...
To solve for this annoyance, Microsoft
has created Windows Script Components,
which, as their name implies, are COM
components created with script! These
components can be developed with any
Windows scripting language (VBScript,
JScript, PerlScript, Python, etc.).
Since these components use script, you
can literally cut and paste your ASP
script into one of these scripted
components! Also, you can edit a
Windows Script Component's code and
the changes are automatically
reflected - no recompiling, no
restarting the Web server, and no
reregistering the component!
For more info, check out these links:
http://msdn.microsoft.com/en-us/library/07zhfkh8(VS.85).aspx
http://technet.microsoft.com/en-us/library/ee692823.aspx
https://web.archive.org/web/20210927201615/http://www.4guysfromrolla.com/webtech/050400-1.shtml
Related
I have a website developed in old technologies like ASP, ActiveX, COM and some other legacy technologies. I want to re write the application in ASP.Net MVC, I'm not sure how to remove those ActiveX and COM and which is the alternate option to use for those components. Another pain point is i do not have the source code of ActiveX and COM dlls, So we want to re-write the application as earliest possible, can anyone suggest the possible option that how i can start migration.
Is it possible that i can replace the ActiveX components one by one ant test the functionality and re-write another Activex component?
Also can somebody share the materials/links to best understand ACtivex and COM ?
I have literally had to do exactly the same thing.
I want to answer your question properly:
Is it possible that i can replace the ActiveX components one by one ant test the functionality and re-write another Activex component?
You could but that sounds unnecessary.
Also can somebody share the materials/links to best understand ACtivex and COM ?
Create a blank ASP project
Set the target framework to be whatever (.net 2.0?)
Copy and paste all your files into this project, so that the web.config is in the root.
Now, to get your COM and Activex elements, right click the "References" folder and add reference. Goto "Extensions" and you should see COM modules there. You need at least the Microsoft ActiveX etc etc scripts. I imagine you have some lines like CreateObject('ADODB.CONNECTION'). You can search using the object explorer as to which COM modules contain which objects.
Tick them to include them, then build.
It might take a bit of fiddling, and there were some objects I couldn't find, and also some I had to download an install manually (but then after that they appeared in the extensions menu, so it was straightforward).
I managed to get an ASP2 project working in Visual Studio 2015 this way.
Has there ever been a more confusing/difficult time to be a web developer using the Microsoft stack? That's not really my question... I know that the answer is a categorical no. :)
The single page app template that comes with VS 2013 is deplorable.
I've been working on building up a similar project template that uses Angular JS on the client, but I'm starting to spin my wheels a bit porting over the external (openId/oauth) login features.
I believe this is because of the lack of good, single-point-of-truth, and current documentation for Katana's auth/security bits and also because of how unreadable the client side code is in the S.P.A. template in visual studio 2013.
I know that I can get through it, but while I'm struggling with it, I'm wondering:
Are there any good community provided project templates or example code bases in existence that use .NET 4.5 (MVC5/Web Api 2), Angular JS, the new ASP.NET Identity stuff, and the Katana packages?
There's HotTowel.Angular, but it takes no stance on security. Besides, it's a Nuget package, which can't or shouldn't dictate as much as a proper project template can.
I agree with your observations. I have found the following setup that seems to meet your requirements and I think works very well (I don't have a template), I would suggest the following:
Create an empty WebApi2 project and adopt authentication/authorization depicted here
Use a regular index.html in the base directory as a launching point for your angular application. You can either maintain your client packages with nuget, npm, or bower.
Use whatever technique you like for organization of client code.
Personally, I would create 3 projects, One for client code, (mydomain.com) One for your api (api.mydomain.com) and one for your Model/Repository/Data Access layer.
update
Here is an open-source project that might be what you're looking for!
How to create web application using Qt?
This depends on what you mean by "web application". If you mean an application that can show parts of a web page in its interface as rendered HTML, like a browser can...yes. Qt incorporates something called QtWebKit:
http://doc.qt.io/qt-5/qtwebkit-index.html
(Note: Back in the olden days it was Microsoft--I think--who first made an embeddable Internet Explorer control so that you could fetch a URL into the midst of some MFC or VB application and run a browser in the midst of your otherwise-form-based application. The event hooks for Microsoft's solution sucked, Qt's are much better.)
Anyway, this is great if you want people to install your application on their machine, where it fetches web data but takes advantages of native features to be richer than a browser could. But be careful because these days native apps have to be really outstanding to surpass the advantage of something that runs in a browser they already have.
HOWEVER If you are trying to use QtCore to push server-side content out and fulfill web requests, that'll be an uphill battle. You might find some related examples if you look hard enough:
https://web.archive.org/web/20100922075100/http://labs.qt.nokia.com/2006/12/20/whats-this-cgi/
Very few people use C++ (much less Qt) to generate web pages server-side. Yet there are still some doing it, even in pretty cool ways:
http://www.webtoolkit.eu/wt
...regardless, QtCreator will be no help in that kind of pursuit.
The functionality you are asking for does not exist within Qt itself. However, there exists (at least) one third party library that allows some of the Qt code for a desktop app to be re-used to a certain extent for serving up a web app:
http://cutelyst.org/
However, this does not magically allow you to write a QML interface with QML Widgets and have a visual interface accessible via a web browser.
What do you mean by "web application"? Is it a desktop app with web features? If so, yes Qt in general is very good for that.
If you mean a kind of server that outputs HTML, then you should use something else because you would have to reinvent many wheels to make it work.
You'd require to run or embed web server. It would be more whise to turn to a Apache Web Server or Apache Tomcat based approach. Otherwhise you'd run somewhat against the odds.
Consider also using some HTTP server library like libonion or Wt. Wt is close in spirit to Qt. However, you won't use Qt itself. libonion is lower level (and you may want to use browser-side Web frameworks like e.g. JQuery or AngularJS with it).
If you already have some Web server, you could consider developing some FastCGI application in C++.
You surely need a good understanding of HTTP protocol and of HTML5 & AJAX.
Since this is 11 years old, I thought I'd come here to tell you that it does indeed seem possible now that qt supports webassembly. The newest version, 6.4 (newest version as of today jan 31 2023), now offers support for webassembly and their website has various examples of apps built with qt that run in the browser.
https://www.qt.io/qt-examples-for-webassembly
I have a ASP.Net web application that I want to use as a reusable user control library in other web applications.
One solution for this problem is to use what Scott Guthrie has described here:
http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx
that is to copy ascx/aspx files (without their code-behind) in the web applications which use the control library.
I actually see another solution: to embed the ascx/aspx in the User control library and then use a custom virtual path provider to get them.
Does anybody know which solution is the best ?
From the deployment point-of-view, the virtual path provider seems to be better.
However the 'ascx/aspx copy' solution is easier to implement (no need to create a custom virtual path provider).
I really do not like Scott's solution. I believe it is ungly and creates overhead that is not necessary. I have also seen something similar in action and it just didn't work for me.
I too had the same requirement as you describe and I used the virtual path provider option. This way I could reuse all my user controls between web applications easily and without work arounds.
The virtual path provider has a couple of issues though:
If your ascx file has any server tags (in javascript or any other place for that matter) that cause an issue you will get a run time error that is not that helpful.
You have to rebuild your application every time you do a change to the ascx's mark up or to Javascript that exists on the file it self in order to see the results. That can be a real pain if you are trying to change the design of an existing control.
I have used the solution as described in this article and it worked very well:
http://www.codeproject.com/KB/user-controls/EmbeddedUserControl.aspx
I hope that helps...
I ran into this same situation a few weeks ago and I could not make Scott's solution work. I instead used Custom Server Controls and put those in their own Class Library.
I really don't think its a good idea to use user controls that way. If you need them in a separate library, you should convert them to server controls.
Do you guys know about an ajax toolkit (or something similar to the m$-ajaxtoolkit) for mono??
Microsoft's ASP.NET AJAX Control Toolkit works on Mono, and is open source (Ms-PL). That doesn't preclude the use of jQuery, though. There are actually several third party AJAX libraries and control toolkits that support Mono, and many are compatible or work in conjunction with ASP.NET AJAX.
I agree with Brian, but want to add that you should read Dave Ward's series on jQuery and ASP.net. He really distills the essence of what you can do with jQuery, PageMethods, and WebForms without MS Ajax. These ideas are directly applicable to the Mono / Linux environment.
Here's a list of essential posts:
Using jQuery to directly call ASP.Net Ajax PageMethods
Use FireBug To Learn jQuery
Simplify calling ASP.NET Services with jQuery
I'd recommend rolling your own using jQuery. That's what m$ is doing now anyway.
Debugging Mono website
Do you remember, that you have no development environment in this machine? You can install it, or download Mono liveCD with openSuse. But before doing it, please note, that GTK# (it’s devenv) is not very user friendly. It even worse, then Eclipse. So let’s try to understand first whether we can fix small compatibility problems without entering code.
The most convenient method to debug web site on Mono is by using XSP and XSP2 mini web servers. Just enter the directory of the site and run it. By default you’ll be able to access the site by using ... (it also be written for you). Enter and notice whether you have any errors in console. No? Keep doing
The most common problem is “error 500” with nonsense stack. If it contains ScriptManager error Type not found, the problem is in Web.config file. Try to regenerate it to be compatible to Mono (for example, Mono has different version of System.Web.Extensions assembly. In ASP.NET 3.5 it has version 3.5, Mono has only 1.0.61025.0 (the old AJAX.NET). To recreate your web.config all you have to do is to execute “mconfig af AJAX Web.config” It will create default web.config file, supports System.Web.Extensions (AJAX features).
Not helped? Keep doing. Let’s look another time into the stack – if it contains errors in “EnablePageMethods” or “ShouldGenerateScript” or “EncryptString” – the problem is serialization. Mono has very limited support for JSON, XML and SOAP serialization. Try to look into your code and notice if you have classes, marked with [Serializable] or you are transferring your own classes by using PageMethods. If so, replace it with regular strings (my grandma serialization).