Am using Quartz.Net to run a couple of scheduled jobs within a C# windows service hosted by Topshelf. I have started encountering a situation where the service does not run from source code and upon investigate I found the following error:
The debugger could not locate the source file 'c:\Program Files (x86)\Jenkins\workspace\Quartz.NET\src\Quartz\JobBuilder.cs'.
Any body know how to sort this out.
Related
I'm trying to write a timer-triggered Azure Function that downloads a bunch of data and processes it into a SQLite database. I've written code that does this and runs fine on my own machine. But, the same code in Azure yields a DllNotFoundException, complaining that the system can't load "e_sqlite3."
Here is the full error message (for the inner exception):
Exception while executing function: FnordFunction
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception
while executing function: FnordFunction --->
System.TypeInitializationException : The type initializer for
'SQLite.SQLiteConnection' threw an exception. --->
System.DllNotFoundException : Unable to load DLL 'e_sqlite3': The
specified module could not be found. (Exception from HRESULT:
0x8007007E)
at
SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
at
SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
at SQLitePCL.Batteries_V2.Init()
at SQLite.SQLiteConnection..cctor()
End of inner exception
Here are the steps to reproduce:
In Visual Studio 2017, I created an Azure Function project using the latest template.
I added my code files to the project, and edited the "Run" method to call the code.
Using NuGet, I added sqlite-net-pcl, and some other libraries I need. (I've also tried this with EntityFrameworkCore, using SQLite; that didn't work either).
Build
Publish
Run. Failure.
The problem might be that my code is wrong--but it works fine when I just make a console .exe.
The problem might be that VS2017 is not bundling the correct dll for SQLite when it builds. I'm not sure how to fix that. I've seen from other searches that the same error message pops up when the platform target is set to "Any CPU," but changing that to x86 or x64 does not fix the problem.
The problem might be that the SQLite libraries I have tried won't run in the Azure Functions sandbox. If so, are there any simple SQLite libraries that will run in the sandbox?
Thanks in advance...
The problem is that when running in a Function App, native binaries can't be automatically loaded from your bin folder, so it's not finding the DLL.
One way to solve this is to drop it in your D:\home\site\tools folder (e.g. using Kudu Console), as that folder is automatically place on the PATH.
I'm running an service on an server which calls an assembly to retrieve data from an webservice. The called assembly tries to establish an connection to an webservice. When trying to connect to the Web Service specified in the configuration file I always get the following message in the log File of the assembly:
System.IO.FileNotFoundException: fatal Error: File file:\C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a was not found !
I looked inside the folder the error message stated and found the System.Web.Services.dll.
Unit testing the assembly on my local machine runs without any errors.
I already used google to find an solution for this problem but couldn't find anything. Any suggestions or solutions? Im really stuck in this problem at the moment.
I hope that will help me with this issue.
I have a problem with a application (winforms) build with .net framework 4.5 and ReportViewer 11 (Reporv Viewer 2012). Ago few weeks I deploy using Windows Azure and install to clients, but when i run a report show me an exception.
**An error occurred during local report processing.
Failed to load expression host assembly. Details: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)**
When I deploy in network (LAN) was working fine, but when I deploy via internet i get this error, this error only occurs when i start the application via shortcut .appref-ms, but if I start application executing .exe file show report correctly.
Some else have this problem and how solve?
Thanks.
I found my problem.
I solve this only comment this line, because i dont use ngen ;).
i just comment attribute [LoaderOptimization(LoaderOptimization.MultiDomainHost)] in Main method. This works fine for me, check if you have and comment ;).
I have a web service added by service reference (called "MyServiceReferences") in my ASP .NET MVC 4 solution. Also I have an Active Directory service in another project in the same solution. I am trying to display user name (First name and Last name) in my web page using active directory users information. The problem is when I call
PrincipalSearcher.FindAll(), it works sometimes. The exception I am getting is
Could not load file or assembly 'MyServiceReferences.XmlSerializers'
or one of its dependencies. The system cannot find the file specified.
In my project build setting I have tried to set Generate serialization assembly "On". But it did not solve my problem.
Following command from visual studio command line solves the problem
Sgen.exe (locationOfTheDllFile)\MyServiceReferences.dll
But there is another following error occurs rarely (when attempting to load the page very very often)
[System.AppDomainUnloadedException] = {"Attempted to access an unloaded appdomain. (Exception from HRESULT: 0x80131014)"}
Logged into a customer environment today to check logs and just generally do an inspection, only to notice some tasks had failed in one application.
Application is written in c# .net v4 running inside of IIS and exports to Sharepoint 2007.
I can't be 100% sure if .net or SharePoint is the culprit. These are the errors I got:
Task Failed: Server was unable to
process request. ---> Could not find
file 'C:\Windows\TEMP\qbckfur1.dll'.
Export 26.05.2011 15:00:21 Failure
Task Failed: Server was unable to
process request. ---> Could not find
file 'C:\Windows\TEMP\2shjg2xb.dll'.
Export 26.05.2011 15:30:13 Failure
Task Failed: Server was unable to
process request. ---> Could not find
file 'C:\Windows\TEMP\b7utp199.dll'.
Export 26.05.2011 16:00:15 Failure
Task Failed: Server was unable to
process request. ---> Could not find
file 'C:\Windows\TEMP\ozr2umkm.dll'.
Does this look familiar to anyone?
This is a problem with XmlSerialization (beleive it or not). I ran into this with a custom ASP.NET MVC app. Apparently, when you call Serialize or Deserialize on types marked as "Serializable", .NET will generate an assembly on-the-fly to support the serialization and it attempts to write that assembly into 'c:\windows\temp'.
Even if Everyone has full control access to that directory I have still seen this occur when running an app from within an IIS App Pool. Especially in applications that has a lot of serialization activity.
If this sounds like your problem, the solution is to "pre-compile" the Serialization assembly and include it in your application with sgen, part of the Windows SDK.
This post highlights a similar issue: Serialization issue on MSDN Social
Here is the MSDN article on the tool: sgen reference
Final Note: There is a separate version of the Tool for .NET 4.0 so make sure you are using the correct version when generating your assembly.