ScriptResource.axd d querystring parameter - scriptresource.axd

We are referencing a .NET Ajax dll within our website.
When I access a page within the site, I can see that there are different 'd' querystring parameters for the same Ajax handler when I load the page from a specific server as opposed to when making the same request through the load balancer (see below).
The t parameter is hashed from the datetime stamp of the dll, I can see why that would differ. But why would the d be different for the same dll reference & version?
Load Balancer
/ScriptResource.axd?d=PmKR-yELzZqHd6ahn_jO60nmNNm2-7DLsOUMBdWWoRvNOUcZqhzFBQ1SazOIb9JQY7eSczxTV7nTOIlKEZZBR7BKeRX9crISkYs8BdYxT941&t=3388055b
Specific Web Server
/ScriptResource.axd?d=_51rN8R7C6p5eAgxsk7XbD-wE3JMst-TGEsez2WKD6lGzlajzn_VD0vFY-jVyPFOhR177ar5QLKJSTtrzdEMxmpQ0soRnXJjGfBuzlffYxU1&t=ffffffffe4190d3a

The hash value is calculated based on the "created" timestamp of the DLL in which the referenced script resides. If the two files have two different timestamps, the "d" value will be different.
These DLLs reside in the GAC (Global Assembly Cache). The specific DLLs we had problems with were System.Web.dll and/or System.Web.Extensions.dll.
A pain? Yes. The way we got around it was to copy the file from one of our two servers to the other. I think you can also do something similar to "touch".

Related

LinqPad - Share data between queries

I have two connections to two distinct servers.
I'd like to access data from databases on both servers. It seems impossible (or at least complicated).
I was thinking it may be easier to do some requests on one server, store the results in memory in some variable and then access that variable in another query on the other server.
I tried with static variables in MyExtensions as well as with
AppDomain.CurrentDomain.SetData("myVariable", results) and AppDomain.CurrentDomain.GetData("myVariable") but both don't work.
I had this same problem, but the solution ended up being much simple than I had expected.
Since I had a project with both of datacontexts (on different servers) I wished to query, I added a reference (F4 in a query, then Additional References->Find your bin folder or whatever) to the .dll of my project. I added a config/connectionstrings section to the app.config of the query that contained the names of the connectionStrings my project context was looking for with the correct connection Info.
This gave me not only access to my data context, but also much of the business logic (for instance, repos/dtos/viewModels/other transformations) from my project. From there, I could grab whatever I needed from DB/server A, put it my preferred data type (usually a List), and then have it interact with data from DB/server B as needed.
Hope this helps!

Merge two Endeca Servers (Endeca 3.1) into one. Including their current data

Let me explain in more detail:
1st: I'm running endeca 3.1, so Endeca Server here refers to 3.0's Data Domain.
I'm required to use an Endeca Server currently present on Endeca (Downloaded a Demo VM). All the info on it, including, groups, attributes and data, must be merged into out Endeca Server. (It can also be the other way around, i could merge my Endeca Server into this one.)
So far, i've tried to do the following:
1) Clone the Endeca Server
2) use the putCollection sconfig operation to create a collection on it with the same name i have on mine.
3) Load configurations using the LoadCollection & LoadAttributes graphs from OEID POC Template 3.1. I point to the new collection on the Configuration.xls file.
This is where i encounter an issue. The LoadAttributes graph gets a T/O message from the server's WS. Then the config WSDL becomes inaccesible for a while. I can't go beyond this point.
I've been able to load data into the collection, but i need to load the attributes first.
THanks in advance for your replies.
Regards
There are a few techniques.
Have you tried exporting the data domain and then importing it?
You can use the endeca-cmd tools to export to a file, and then import from that file. This would enable you to add 2 datastores into one server.
If you want to combine 2 datastores then that is a different question.
The simplest approach in 3.1 if the data collections are small. Extract then as CSV (via a data-table), convert to XLS and add them via self provisioning into separate collections within a single data store. If you are running in the VM this is potentially the easiest approach.
This can also be done using Integrator.
You don't need to load the attributes unless you are using multi-value types. You can call against the conversation web-service to extract data and then load it using 'bulk-load' I would not worry too much about creating the attributes unless this becomes essential due to their type or complexity. If you cannot call against the conversation web-service, then again extract as csv and load using Integrator.

Merge data from two websites into a PDF using ColdFusion

I have a project where a web page has a form where the user enters some information and then hits a button which uses this information (e.g. ZIP code) as part of a query to dynamically exports the results as a PDF or XLS file. The data I am querying is housed in an Oracle database on Server A.
Server A is controlled by a different contractor who is agnostic to our project (not antagonistic but not especially helpful). This other contractor controls the ColdFusion, Oracle database and Server A.
It turns out we now have updated information that is housed on Server B that the client wants to include in the PDF/XLS file. Server B is under my control but the data is in a Geographic Information System (GIS). Server B's data will be set up to be served out as a REST service which can accept input from Server A and spit out the answer. I can output the data in JSON format, XLS, PDF (and maybe CSV but I need to check). I cannot put the data (or software) onto Server A nor dump the contents into the Oracle database.
My question is this:
What techniques can I employ to successfully dynamically incorporate my updated data into this PDF ?
I am not sure if the client has Adobe LifeCycle (still checking) so I would like to have a solution that does not use this product.
I have poked around the internet and have found some resources (such as Populate_And_Merge_Multiple_PDF_Forms but I am still looking for some resources that describe a solution.
Many Thanks !
Creating a simple web service in ColdFusion is pretty straight forward. To consume your service the other company will use CFHTTP or their technology's equivalent.
In your CFC, make sure your function's access attribute is set to remote. Doing so will allow your function to be accessed from an outside source.
remote: available to a locally or remotely executing page or component
method, or a remote client through a URL, Flash, or a web service. To
publish the function as a web service, this option is required.
Also, specify your returnformat attribute to be JSON
The format in which to return values to a remote caller. This
attribute has no effect on values returned to a local caller. json:
serialize the return value into JSON format before returning it
remotely
I have also used returnformat of plain to prevent any other formatting by ColdFusion so if you wanted to create a custom output such as a simple list of values, use plain.
plain: ensure that the return value is a type that ColdFusion can
convert directly to a string, and return the string value without
serialization. Valid types include all simple types, such as numbers,
and XML objects. If the return value is a complex type, such as an
array, or a binary value, ColdFusion generates an error. If you
specify a returntype attribute, its value must be any, boolean, date,
guid, numeric, string, uuid, variablename, or XML; otherwise,
ColdFusion generates an error.
Sources:
CFFunction

Accessing a single RavenDB from different applications

I have a web project that stores objects in raven db. For simplicity the classes live in the web project.
I now have a batch job that is a separate application that will need to query the same database and extract information from it.
Is there a way I can tell raven to map the documents to the classes in the batch job project that have the same properties as those in the web project.
I could create a shared dll with just these classes in if that's needed. seems unnecessary hassle though
As long as the structure of the classes you are deserializing into partially matches the structure of the data, it shouldn't make a difference.
The RavenDB server doesn't care at all what classes you use in the client. You certainly could share a dll, or even share a portable dll if you are targeting a different platform. But you are correct that it is not necessary.
However, you should be aware of the Raven-Clr-Type metadata value. The RavenDB client sets this when storing the original document. It is consumed back by the client to assist with deserialization, but it is not fully enforced. The logic basically is this:
is there ClrType metadata?
if yes, do we have that type loaded in the current app domain?
if yes, then deserialize into that type
if none of the above, then deserialize dynamically and cast into the type
requested (basically, duck-typing)
You can review this bit of the internals in the source code on github here.

Is there a way to change referenced library files during processing?

I have a .NET customer framework that functions much like a Workflow. It uses reflection to get a listing of all of the processes it is capable of from a specific folder, and starts them via reflection with a known start point (all of them have a method called "Process"). Since these files are only called to do the processing and not part of the compile... is there a way for me to be able to drop in a new reference library (DLL) for one of the processes that is being updated without restarting the whole process?
Here is my flow...
START
Load list of references
Load work, assign to references
After X Time, refresh references (or
on WCF refresh command being sent)
Is it possible to do this, or do I do I need to actually stop and restart the assembly base to be able to recognized the new reference file?
Yes you can with Assembly.Load but I think you need to look at MEF first.