I have working web page, that uses ActiveX control
ActiveX control was developed by previous programmer (he is out of reach now)
I did some changes in ActiveX control source code and now I need to somehow change current ActiveX control for my changed.
So my question is
Q: How to change old ActiveX control for new one on server.
Thanks in advance for any help you are able to provide.
If the existing ActiveX is in written in C++ and visual studio, then simply follow the following steps:
Make the required changes in the source code.
Build the upgraded ActiveX control using the F5 key on the Visual
Studio.
Copy the ActiveX to the server and manually register by writing the
following code in the cmd with admin rights. * regsvr32
"location of your ActiveX control"
Now you can use your updated ActiveX control either in IE or any other supported container.
Related
I'm developing a tool which will automatically install a software in PC.
I'm trying to do this with Coded UI in visual studio 2013.
To install the software I need to click on the "Next" button on setup window. But when I click on the button its showing a warning -
Access to the application is denied
Here is the screenshot of the issue -
How can i automate the process?
Is there any better approach rather than Coded UI that I should think about to install the software automatically?
Just run Visual Studio 2013 in Administrator mode.
See this thread to get more clear idea.
You can try using Win32 API methods inside the generated test method to get the window handle for the next button control and see if either 'send message' or 'post message' (win32 api methods) can be manually added to achieve the required click action. For more details about win32 api methods usage and commonly used methods please refer the below links:
https://msdn.microsoft.com/en-us/library/windows/desktop/ff468919(v=vs.85).aspx
http://www.c-sharpcorner.com/UploadFile/SamTomato/clicking-a-button-in-another-application/
I created ActiveX control and it's .msi installer in a way described in this tutorial http://haseebakhtar.wordpress.com/2011/05/31/creating-an-activex-control-in-net-using-c/.
Then I installed that ActiveX control using this installer and tried to execute it in IE9. Installation went fine. And after that I got an excellent work of my component in a web browser.
Next time I ran the installer once more to uninstall the component. It seemed that everything was fine since I didn't have any errors while uninstalling the component and the folder of installation was removed from the disc. But then I could see that the activeX control continue to execute anytime I reload the page in IE. At first I thought that the IE had buffered it and then I decided to clear all browsing history. But it didn't help. I also restarted IE and my web server but that didn't give any changes. ActiveX control is still working.
My questions:
1) How can I uninstall it in proper way?
2) Should I uninstall and install my activeX component anytime I want to see any changes I did? Is there any easier way to see results of my work in IE?
After your have uninstalled your control, search the file system for its DLL and the registry for its GUID. If the GUID is still registered, that'd mean the uninstaller did not do its work properly. The DLL still could be there, if you had your web page open during the uninstall pass (as the web page would keep the DLL loaded). It should be gone upon reboot, though; if it is not, that would be again a problem of the MSI script.
Note, you could have your control installed automatically by IE without MSI, provided the control only uses HKEY_CURRENT_USER hive for its registration, here is how. Although, you would need to digitally sign your control package for this to happen, which is always a good idea anyway.
I have a WPF dll with a user control. It works just fine when I use it in a WPF project as a reference.
I needed to test in a mixed environment. So I created a Windows Forms solution, added the reference to both the WPF dll and the WindowsFormsIntegration dll. I placed an ElementHost in the form.
In the code behind, I called using on the WPF user control namespace, created an object of the user control and assigned it as the child of the ElementHost. Till this point, intellisense also seemed to work fine. The moment I built the project, however, I got a build error saying that the WPF namespace that I had used was not found.
All dlls are built in .NET 3.5 and the client solution is also in .NET 3.5. Is this a known issue? What could be off with this scenario?
Can you please follow the following link to check whether you have referred all the dll's which is necessary to run WPF custom control in Winform
http://msdn.microsoft.com/en-us/library/ms742215.aspx.
I created a control library by adding refrence to office interop excel to do some excel automation in client.The control works fine in windows forms Now i need to add the control in asp.net can somebody tell how to do that.
a windows class library will work just fine in asp.net. however, if you make a windows from control (or user control, etc) the control (etc.) will NOT work in asp.net.
all you have to do is add a reference to the assembly in your project. If your assembly references other assemblies, you will probably have to reference those in your project as well. As long as you do not attempt to create instances of controls that have a informs UI, you should be OK.
You cannot use Office Interop in an ASP.NET application, or any other server-based application. Please see Considerations for server-side Automation of Office, and please don't try it.
What are the steps to deploying a project created in VS2008 (windows forms and c#) as a ActiveX control hosted in ie? I have a file uploader project that I want to be hosted on a webpage that users can navigate to, click 'trust this active x control' and the application runs on the page in the browser, just like a java application.
To be clear, I'm not looking for ClickOnce (that is an installer) and I don't want the user to have to modify their .Net security or add a trusted site (so just putting the .dll file in a OBJECT tag doesn't work). Do I need some digital signature, some certificate something? I've found references to this but no step-by-step guide to it (like I got for java).
Any suggestions? This seemed like it'd be the easiest part of the project but its turning out to be by far the hardest, I can't make any headway on it.
Thanks,
Sam
And the answer is, sadly, that .net "activeX controls" aren't like COM activeX controls (VB6), even if you make the .net control com-visible you can't register it with the OS the same way. What you have to do is:
1) Create your .net dll file
2) Create an installer exe (I did it with InstallShield, looks like it can also be done in VS)
3) Package that installer into a cab file
4) Point to that cab file in IE.
What this results in is in IE the little 'activeX' confirm drops down, then the 'do you trust this app' comes up, then UAC (vista/w7) and then you get to run through the normal application install process: installer window comes up, confirm, pick install dir. After thats done, your control appears on the page in IE.
The way it used to work in COM was once you did the little activeX confirm drop down (and UAC) the app would just run
Now, the above is only if you need/want it to be .Net 2.0 compatible. If you don't mind only being compatible with 3.0 or higher you can do an XBAP application:
What is Microsoft's roadmap for in browser applications? Silverlight, ClickOnce, ActiveX, dlls
And you can even just take your .Net dll you spent the last 3 weeks learning how to make (frick) and jam it into the WPF application:
How to put a custom windows forms control in a WPF application?
Hope this helps others.
Sam
We deploy AX control in two forms:
CAB file. Installation process as you described in question. You need sign control, pack it into CAB and sign the CAB file. More details you can find here: Packaging ActiveX Controls.
Standalone installer. MSI file for users without admin privileges for manual installation.