I am using Addin framework for my project and i am using following code to shutdown addin.
AddInController ac = AddInController.GetAddInController(job);
ac.shutdown();
This works fine and shutdown and unload the addin from the memory in normal scenario. If code written in Addin throws any exception then above can not be able to shutdown the addin.
What should i write to handle this scenario?
Thanks,
Denish
Related
When I am trying to buid on TFS build server I got the following error:
Error CS2012: Cannot open 'xx.dll' for writing -- 'The process cannot access the file 'xx.dll' because it is being used by another process.'
Could anyone please help out with that?
If you are developing a web application or anything of the like make sure that your server process (usually IISExpress or something) is not being run.
Kill all the processes that maybe consuming your compiled code.
Alternatively, you can download Lockhunter and see which program is locking that file.
I am following the steps in this article for attaching WinDbg to IIS to find the root cause of an "External component has thrown an exception" error. I am using WinDbg 10 (from Windows 10 SDK) on a Windows 7 on an ASP.NET MVC .NET 4.6 (Visual Studio 2015) app. When I attach WindDbg to the w3wp.exe process, reload the web page, the browser just spins waiting for a response. As soon as I stop WinDbg, the response is received. Looks like WinDbg is stalling IIS for some reason. I have checked/unchecked the 'invasive' checkbox. I enabled/disabled CLR Exceptions. I am not professient in WinDbg.
Any ideas what might be the issue? Or other quick way to troubleshoot that kind of exception? I usually know the issue is a compile error in a partial view after spending some time but I am interested in learning WinDbg's way of finding it (if it can).
Attaching WinDbg will cause all threads to suspend. If that is the case, your command prompt looks like this, waiting for input:
At this time, if I understand the purpose of the linked article, you should enter things like
.symfix;.reload
.sxe clr
.loadby sos clr;.loadby sos mscorwks
To resume the threads and continue execution of the program, enter g. After that, the command prompt should change to
Now do something in your application and wait for an exception, then issue the commands mentioned in the article
!dumpheap -type CompilerError
!dumpobject <0xXXXX>
or (I would suggest)
!pe
I am trying to create a sample Delphi XE7 desktop app that will connect to SSRS 2005 web service but every time I try to call LoadReport web method, the following error is shown:
This is what I have done so far:
Create a desktop app.
Import WSDL for ReportExecution2005 and ReportService2005.
Create a button that call the web service based on the code shown
here. The web service locations as well as report are hardcoded for
simplicity purposes.
This is the code snippet from the link:
HTExec := tHttpRio.Create(nil);
rsExec := GetReportExecutionServiceSoap(False, ExecURL, HTExec);
// Load the selected report.
LRParams.Report := 'ReportName';
LoadParamsResponse := rsExec.LoadReport(LRParams); //here it fails
Note: I have already created a .NET win form app (VS2010 and VS2013) that consumes this web service without any issues, thus I know the web service and report to render are working OK. Sadly our requirements is for a Delphi solution, My educated guess is that the WSDL importer generated code is not correct and somebody out there may have come across with this issue before and know how to solve it.
I did a quick search for "http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/LoadReport"
and found this.
If it applies to you as well, it may be the case you're calling the service on an incorrect URL, use the one with ReportExecution2005.asmxin it, not ReportService2005.asmx
(There's a lot more here)
To find out differences between the Delphi version and the working version, use a HTTP proxy (Fiddler2) to capture the SOAP HTTP traffic in both setups.
If you have no access to the working environment, use SoapUI to create SOAP requests.
I have a web service located at www.mysite.com/qbwebservice.asmx using the QBXML SDK. If I have the code for QBWebService.asmx on my machine, can I attach a process to QBWEBConnector.exe and do remote debugging?
I have tried, however my breakpoint is never hit. Should I attach to another process?
The QBWebService.asmx code is not executing directly in QBWEBConnector.exe, so it won't do any good debugging that. The QBWebService.asmx code is executing on the web server, so you need to debug it there.
I've written a server in Delphi 2010 that needs to launch a console application every now and again to back up a database. The console application can send log information to the console window, but it is not required.
This works fine when running as an application, but when run as a service I get an access violation when launching the console application. This is the case even if I launch it hidden (SW_HIDE).
Is it possible to launch a hidden console application from a Windows service? The solution needs to work on XP, Vista and Windows 7.
EDIT: The access violation happens when I call ShellExecute.
If you are using ShellExecute, then don't: it won't work inside a service, and is almost never the best way to start a process.
Use CreateProcess in stead.
See this bunch of ShellExecute / CreateProcess question threads on stackoverflow.
--jeroen