Installing multiple Quartz.NET services on one machine - quartz-scheduler

I'm using Quartz.NET 2.2.400.0 and am experiencing problems installing multiple instances on a single machine.
I am trying to amend the name of the instance via the configuration file (Quartz.Server.exe) as follows:
<quartz >
<add key="quartz.checkConfiguration" value="false"/>
<add key="quartz.server.serviceName" value="CalSched"/>
<add key="quartz.server.serviceDisplayName" value="CalSched"/>
<add key="quartz.server.serviceDescription" value="CalSchedservice"/>
</quartz>
When running Quartz.Server.exe install without the above, everything works perfectly. When the service name is specified, the scheduler does not run.
I wondered if anybody would be able to shed any light on this?

This is an old thread. But I will put the answer here in case someone got same issue. When <quartz> tag (Quartz.Server.exe.config) is used, quartz will ignore configurations in quartz.config and therefore, this configuration line is ignored quartz.plugin.xml.fileNames = ~/quartz_jobs.xml. As a result, quartz won't read your job settings and won't run the job as expected.
So you need to move all your configuration to tag. You need to add
<quartz >
<add key="quartz.checkConfiguration" value="false"/>
<add key="quartz.server.serviceName" value="CalSched"/>
<add key="quartz.server.serviceDisplayName" value="CalSched"/>
<add key="quartz.server.serviceDescription" value="CalSchedservice"/>
<!-- MUST ADD -->
<add key="quartz.plugin.xml.type" value="Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin, Quartz" />
<add key="quartz.plugin.xml.fileNames" value="~/quartz_jobs.xml" />
</quartz>
And it will work.

Related

IIS 7.5: Special characters in URL rewrite external file

I have ran into the "max web.config size" for one of my applications running on IIS 7.5, Before editing the registry to increase this value, I tried to move all the rewriteMap rules into an external file but the server gave me back a 500 error.
After several checks I've noticed that this way will work
<rewriteMaps>
<rewriteMap name="OLDSITE">
<add key="/withonlythis_will_work" value="http://oldsite" />
</rewriteMap>
</rewriteMaps>
But if I put some non standard alphanumeric character it will crash (e.g.)
oldòsite
<rewriteMaps>
<rewriteMap name="OLDSITE">
<add key="/withonlythis_will_not_work" value="http://oldòsite" />
</rewriteMap>
</rewriteMaps>
Both rules work if I leave them on the webconfig, but the second one does not work on external rewritemap.config file
any clues?
Try to use the HTML named entity for ò that is &ograve ; (please remove space before ';'):
<rewriteMaps>
<rewriteMap name="OLDSITE">
<add key="/withonlythis_will_not_work" value="http://old&ograve ;site" />
</rewriteMap>
</rewriteMaps>

Modifying web.config with powershell to have smtp section

I'm trying to modify the web.config with powershell to add a smtp section. I saw this post :
http://ybbest.wordpress.com/2012/02/28/how-to-add-configuration-settings-using-spwebconfigmodification-and-powershell-script/#comment-1070
which add some appsettings defining smtp section. But I want to know if these line:
<add key="businessSupportEmailAddress" value="contosointergenfax#gmail.com" />
<add key="copyMoveTempFolder" value="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS\SharePointProducts" />
<add key="faxEmailAddress" value="contosointergenfax#gmail.com" />
<add key="fromEmailAccount" value="contosoAdmin" />
<add key="fromEmailAddress" value="contosointergenfax#gmail.com" />
<add key="smtpServerName" value="build.contoso.local" />
<add key="smtpServerPort" value="25" />
are the same as this :
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="testuser#domail.com">
<network defaultCredentials="true" host="localhost" port="25" userName="kaushal" password="testPassword"/>
</smtp>
</mailSettings>
</system.net>
Thanks
Nope.
First block represents key,value pairs that will be loaded in the default hash by the Configuration Manager (appSettings, see http://odetocode.com/Articles/345.aspx).
The other one is the .NET system config for mailing, mostly used in ASP webapps : http://msdn.microsoft.com/en-US/library/w355a94k.aspx
Thanks for visiting my blog and my solution is specific to a SharePoint project we are working on.In the end we actually end up putting the configuration settings into a list as we need the SharePoint timer job to access the configuration settings too.
If your solution is asp.net application , you should use the latter.

Web.config Transform

I have a config that has multiple connection strings. They all point to the same database server. Is there a way to replace a portion of the web.config, i.e.
<connectionStrings>
<add name="Conn1" connectionString="...DataSource=server1;Initial Catalog=DBName..." />
<add name="Conn2" connectionString="...DataSource=server1;Initial Catalog=DBName2..." />
</connectionStrings>
I want to change server1 with server 2. I could do this...
<add xdt:Transform="SetAttributes" xdt:Locator="Match(name)" name="Conn1" connectionString="...DataSource=server2;Initial Catalog=DBName..." />
<add xdt:Transform="SetAttributes" xdt:Locator="Match(name)" name="Conn2" connectionString="...DataSource=server2;Initial Catalog=DBName..." />
but wanted to see if there was a more all-inclusive way.
According the msdn documentation of web.config transformation there is no possibility for this kind of transformation. You can only do Replace, Insert, InsertBefore, InsertAfter, Remove, RemoveAll, RemoveAttributes and SetAttributes transformations.

Adquiring a SOAP trace for debugging is not woking

I am using Docusign API to create and retrieve "envelopes" for signing. (docusign.com for more info).
Basically i am having some issues trying to adquire a SOAP trace based on their instructions https://github.com/docusign/DocuSign-eSignature-SDK/wiki/How-to-acquire-a-SOAP-trace-for-debugging-%28Windows%29
And here is where i am needing some help. Has anyone, using these intructions from Docusing support (that comes from the Microsoft page and according to one Community Comments, seems not to work) been able to create a trace?
i have tried all possible combinations and i don't see no log file created so far.
I really appreciate any help you can provide me with.
Thanks
Here's the trace config I use in my App.config for DocuSign. You'll need to clean up the log a bit (look for "<<<" and ">>>" before/after each call.
First add this to the system.serviceModel section:
<diagnostics>
<messageLogging
logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="50"
maxSizeOfMessageToLog="500000000" />
</diagnostics>
Then add this to the configuration section:
<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="System.Net" tracemode="protocolonly" maxdatasize="52428800" >
<listeners>
<add name="MyTraceFile"/>
</listeners>
</source>
</sources>
<sharedListeners>
<!-- Set path here. Make sure the app has permission to write to the location.-->
<add
name="MyTraceFile"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\temp\DsTrace.log" />
</sharedListeners>
<switches>
<add name="System.Net" value="Verbose" />
</switches>
</system.diagnostics>
One more note, the DocuSign staff will really appreciate it if you remove the PDFBytes elements from your trace before you send it, unless that's needed for what you're having them troubleshoot.

Separate ConnectionStrings and mailSettings from web.config? Possible?

Is it possible to separate ConnectionStrings and mailSettings from web.config?
Devel environment has different IP addresses for connectionstrings and smtp mails because of development and testing. We dont want to do tests and devel using live machines and live IP addresses.
Is it possible?
I found the answer on MSDN:
<configuration>
<connectionStrings configSource="connections.config"/>
</configuration>
With file connections.config containing
<connectionStrings>
<add name="name" connectionString="conn_string" providerName="System.Data.SqlClient" />
<add name="name2" connectionString="conn_string2" providerName="System.Data.SqlClient" />
</connectionStrings>