There is a mechanism for CodeSite Studio that prevents a user with the same license from seeing the messages of the execution of a program? - rad-studio

I need to restrict access to display messages generated by an executable. I noticed that when I shared this executable with a co-worker and when she ran it with CodeSite installed, she could see the messages generated by my test execution. I currently use RAD Studio XE7.
I don't want anyone other than me to be able to see the result of my executions, even if I share the executable I used for that task. I don't know if this is caused because we both have the same license for this tool.

Related

Launch Client Console App from Web Page

I've been asked to launch a Console App from a WebPage. Sounds hairy, but there is sound logic for it.
Basically, the page is a Dashboard page which only super admins can access. We have a Console app which needs to run on the client machine. It cannot run headlessly on the server.
I figured I'd have some kind of small file which is downloaded upon the button click. Then that file could be run from the resulting dialog which would launch the exe.
I know apple does something like that with podcasts. You can subscribe by downloading a small link that would behave as I described and open iTunes.
I had a quick go using ClickOnce, publishing the application to IISExpress where I had my site up and running, but had no success with that.
Is ClickOnce the way to go, or is there some other easier approach?
I've also tried just adding a shortcut with a link to that shortcut nd adding .lnk as a mime type in IIS with mimeType="application/octet-stream". I had no luck there and received a 404 error which I have not been able to resolve yet.
Edit
I should also mention that the Console application is not just a single exe assembly. It has dependencies on a bunch of other 3rd party dlls.
I am assuming here that this desktop application needs to be executed at client side. Thus it will be installed by you or someone in your department i.e available to download.
If it is the case then what you need is to register URI - just like skype URI where href="skype:28347839" lanuches skype automatically.
For reference please click here: http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx
otherwise, get clickonce - -choice is yours.
As you say, just put the console application (an .exe file) on the server, and link to it in a webpage. When the user clicks on the link the exe file will be downloaded. The user can then run the exe file on their own computer.
There will be some warning dialogs about security issues, but if your users trust your exe then they can accept those warnings.
If you get the console application signed, and/or maybe use Group Policy on your LAN you might be able to reduce or eliminate those warnings.

RadEditor ExportToPDF not generating PDF in client's environment

We are using the Telerik RadEditor control, specifically for it's ability to render a PDF via the ExportToPDF() method on the control. We find that this works great in our development and test environments but fails as soon as we get to our client's environment. What I mean by fails is that typically when you execute the ExportToPDF() method, a dialog box pops up with the name of the PDF file, it's size, and whether you want to open it or save it. In our client's environment that dialog window appears, but the file size does not appear. If you save the file, it's a blank document. The machines / environments are equal in their setup (IIS 6 on Windows server 2003). The only exception is that our client's machine is in a secure environment with no access to the internet.
We are loading form letters into the control and then creating the PDF once the user clicks a button, so I don't think this is being caused by bad data / invalid characters causing the PDF not to generate.
My questions are: does anyone have experience running the ExportToPDF() command in an environment with no access to the internet? Could this be a permissions issue? I can't seem to find documentation on whether the ExportToPDF() functionality uses a temporary directory to write the PDF out to while it's rendering. It may be as simple as that, but I'm having a hard time researching this issue.
I've also put a try / catch block around the ExportToPDF() method and I know it's not throwing any errors.
We are running an older version of RadEditor - 2009.3.1208 - it runs in a large application with other Telerik tools so upgrading the entire RadControl suite is not trivial (b/c of testing, etc) and is taking some time.
Any suggestions on what to try next / has anyone encountered anything like this with this control?
Thanks for your help in advance!
Richard
I doubt that the export functionality needs an active internet connection. Most likely something in your secured environment is blocking silently the export and it does not simply happen. My recommendation is to check the permissions/processes you have on the user machine and test the same outside of the local environment to compare the results.

Is it possible to have the entire contents of a class that tripped an error included in the stacktrace?

A lot of time can pass between the moment a stack trace is generated and the moment the stack trace is thoroughly investigated. During that time, a lot can happen to the file in question, sometimes obscuring the original error. The error might have been fixed in the meantime (overlapping bugs).
Is it possible to get Stacktraces that show the offending file at the time of the error?
Not elegantly, and you normally don't want the user browsing through code that's throwing unexpected exceptions anyway (open door to an attacker).
Usually, what happens in a dev shop is that the user reports an error, stack trace, and the build it occurred on. As a tester, you can grab that build from your archives (you ARE keeping an archive of all supported releases somewhere handy, RIGHT?), install, run, and try to reproduce the error, working with the user to provide additional info as necessary. I've seen very few bugs that couldn't be reproduced EVENTUALLY, even if it required running the program against a backup of the user's production database to do it.
As a developer, you can download that build's source code from your version control repository (you ARE using version control, RIGHT?), and examine the lines in the stack trace to try to discover the problem by inspection, and/or build and run it to reproduce the error. Then, you go back to the latest source version, build, and run the same steps (a UI automation system can help out here), and if you don't get the error, someone else already found and fixed it. If you still get the error, you also got an updated stack trace with lines that match the current build, allowing you to set your breakpoints and step through.
What KeithS said, plus there are ways to capture more helpful state information at the time of the Exception using the Exception.Data property. See http://blog.abodit.com/2010/03/using-exception-data-to-add-additional-information-to-an-exception/
While KeithS' answer as pretty much correct, it can be easier and more elegant than you think. If you can collect a dumpfile (instead of just a stack trace), you can use a Symbol Server and Source Server in combination with your debugger to automatically pull your correct-version code from source control.
For example: if you enable PDB output and source-server integration in MSBuild, and upload the resulting PDBs to a symbol server, Visual Studio can automatically load the correct source control from a TFS or SourceSafe repository based on the information in a minidump.

Adobe AIR NativeProcess - UAC problems when trying to run update installers

I'm trying to use Adobe AIR 2's NativeProcess API to emulate the ApplicationUpdater but I'm encountering problems when I try to run the downloaded AppUpdater.exe file on computers with UAC (User Account Control) enabled.
When run without UAC enabled, the AppUpdater opens as usual and displays the standard Adobe replace dialog box. With UAC enabled, nothing happens at all.
Having run a few traces, it seems the problem arises when I call NativeProcess.start() - the code seems to stop running at this point, and does not run the following lines which exit the application in preparation for the AppUpdater to run.
I have added listeners for all of the possible events and error events that can be thrown, and added logging in each of them, but none of these are producing any output.
This issue only seems to affect installation executables (ones which windows warns will change settings on your computer). Calling java.exe -jar .... on the same computers in the same application works correctly.
I'm at a loss, so any help would be amazing!
After speaking to Adobe directly, I discovered that NativeProcess uses a windows API which is unable to elevate privileges which is why the installers wouldn't work. The workaround was to use File.openWithDefaultApplication which uses a different API that can elevate privileges, but this only works in a native-packaged AIR app (which was just fine for our app since it was already packaged in a native installer :))
adobe answer was http://kb2.adobe.com/cps/404/kb404888.html
but for real steps you should determine the application user privileges and determine UAC enabled, if yes - then warn end-user about it.
I'm expecting that you could do nothing with windows-thing from Adobe Air.

Why don't QLocalSocket/Server connections work when one process was invoked by an NSIS installer?

I have an NSIS installer that installs my Qt application. At the end of the install process, the installer gives the user the option to launch the application immediately.
My application uses QLocalSocket/QLocalServer to talk to other local instances of the application. (They talk to each other basically just to ensure that there's only one instance of the app running at a time.) However, on Vista, if one of the instances was started up by the installer, then other instances cannot talk to that instance unless they were also started by the installer (or uninstaller, interestingly).
The NSIS installer launches the app with the Exec command. The client tries to connect to the server through QLocalSocket::connectToServer, which fails with the error "QLocalSocket::connectToServer: Unknown error 5".
Can anyone explain this? What's the best way to work around it?
If 5 is a windows error code, it would mean access denied. Is there a way for you to change the security on this server (You would need to access the native pipe handle)?
The finish page run option has more issues than just this, the new process gets the wrong HKCU and user profile etc.
I would recommend just disabling the run checkbox on the finish page. (This issue goes all the way back to win2000 when RunAs was added)
If you really really want this run checkbox, you can use the UAC plugin, it will allow you to start a child process as the "correct" user.
Finally figured this out. The installer was running as admin (the install script said "RequestExecutionLevel admin"), and apparently it launched my app with those elevated permissions, which meant that other instances of my app running with user-level permissions couldn't connect to it. QLocalSocket/Server uses named pipes on windows, so I figure this is a windows security feature. I'm planning to work around this by using the UAC NSIS plugin, which I believe lets you run a process with user-level permissions.

Resources