Load Testing in VS 2010 - silverlight

I am performing a webtest containing 3 pages once of which is a Silverlight page and a Controller page (every page is invoked from controller page and again the control is given back to Controller page).
When the 1st link id clicked it generates one ID that has to be carried forward in every transaction till the completion of the transaction.
The 1st page is a Silverlight page it interacts thorough WCF services to do the transaction.while submitting A request through Silver light the WCF service generates a ID but since the data from the service is returned in XML form, the entire output of the wcfservice if treated as a string data of which is hardcoded which is found at the time of recording.
So, After coming back from the 1st page (silverlight) to the Controller page it is always coming with the same ID which is stored as a string in the service in the recorded test. Since I am not getting the PROPER ID I am not able to move forward to other pages.
Actually, according to me system is not detecting the data returned from a WCF web service as a dynamic one and instead treating it as a hardcoded string.
How to resolve it, please help.
Some errors of Load test are written below:
Extraction Rule Error ExtractValues event 139 No hidden fields were found in the response.
Exception WebTestException 84 There is no context parameter with the name '$HIDDEN1.ConfiguratorTracker$hdnWorkFlowGuid' in the WebTestContext

Make sure you've created an Extraction Rule that is based on the Text Response and not a hidden field. You might want to take a look at a RegEx Extraction Rule.

Related

mvc post list with number of record not working

I am using MVC architecture for my application.
Now, I have more than 1000 record which i am binding on Listbox.kindly check below screen shot.
Here, Left side list have more than 1000 records and my functionality is, User should select any record and move it to right side ListBox.
it;s work on my local system but when i deploy on iis6 web server it's giving me error. kindly check below image for error.
and also suppose i use less than 500 records.same functionality working properly.
so, i have to make changes on IIS or code or any limitation to post record on mvc?
Check Stack Trace
Looks like you are doing DoS attack on yourself. I think that you have 2 options:
alter web config(ref. http://geekswithblogs.net/renso/archive/2012/01/19/operation-is-not-valid-due-to-the-current-state-of.aspx):
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="2000" /></appSettings>
dont post whole form, just the part with data you need(carriers to be added). Either using jquery, or adding only fields to be posted inside form tag.

preventing IE Silverlight caching values in a grid

I have a silverlight application that displays some values in a grid. Another part of the application updates those values and saves the updates to the source data. All of this works fine including the updating of the displayed values in the grid...until you navigate back to the page later (by say hitting refresh). Then magically all the values in the grid are back to whatever they were the first time you went to the page. I can check and verify that the data is in the source system correctly, I can also make it work fine by going into internet options and setting the browsing history to look for a new version of the page every time you visit the page. But I can't guarantee that users will do this.
I have run into this MANY times before with IE but the normal fixes don't seem to work here. I have added a timestamp to the request for the XAP file to ensure that the file is being pulled every time but somehow that is not good enough. I've also added the pragma no-cache tag to the page and still no go. It seems like Silverlight itself is it's own special case. IS there something else that can be done in the SL object to make it refresh every visit??
What code are you using to populate the grid?
If you load the data when the page is created then it will only be pulled from the database once.
If you load the data when the page is loaded or navigated to then it will be pulled from the database every time the page is displayed.
As Ken Smith says in his comment:
move your data retrieval and population code to your main form's OnNavigate event, and out of Application_Startup
This means that if you update the data and then refresh the page it should show the new values.
(I can't be 100% certain without the code)

How to auto generate a webpage after user submits form

I am looking for some initial direction on this one because I cannot seem to find my way with it. Let me explain...
I am developing a website wherein a logged in site member (Joomla 1.6) can fill out a simple form and attach a pdf to be uploaded upon submission. The user then clicks the submit button and the page will refresh to a new and unique web page.
User Submits data on http://www.examplesite.com and then after submission a new web page is generated that is called http://www.examplesite.com/userSubmittedValue
This newly generated web page would come from a template that is specified by the administrator and, most important, it will display all of the information that the user submitted. Also, there would be a link to download the pdf they uploaded. The user could then view a list of all the pages they have created in this manner via their profile.
I have seen this all over, but I am at a loss for how to generate this. Any help is much appreciated.
This is not something you will be able to easily do or get a detailed answer for here. If you just wanted to do the submission form with a thank you page that shows the data submitted you could use any number of form wizard type extensions - http://extensions.joomla.org/extensions/contacts-and-feedback/forms
If you just needed a way for users to upload PDfs and have access to them you could use one of the file management extensions that offer front end upload features - http://extensions.joomla.org/extensions/directory-a-documentation/downloads
If the additional data that is being submitted is simply data related to the file - title, description, etc then one of the file download components should work fine for you. The choices are limited in 1.6 at this time though so you might have to go with 1.5 to get the extension that works best for your needs.
So this probably isn't the best way to do it if your using Joomla but it just might help.
I would use PHP and inside of you're directory have a file like "template.html". Then I would create some php to handle the task of....
Opening "template.html"
Finding and replacing the values that the user passed you
Save the "template.html" under a new name (userSubmittedValue.html)
Again, I never really use Joomla. If you were to try this I'd suggest checking out php's file system functions (http://us2.php.net/manual/en/ref.filesystem.php).
Hope this helps a bit.

Silverlight - Printing

I have a Silverlight application that has a DataGrid. I need to print the selected items in the DataGrid. However, I do not want to use a WritableBitmap. Is there a way for me to pass just those items to either a WCF Service or a .aspx page and render HTML that will prompt the user to print? If so, how?
Thank you,
If you're using Silverlight 4, you could use the printing API, but I guess you would not ask this question in this case.
In Silverlight 3, I think you have to resort to some kind of hack, where you SL code calls a JavaScript function, giving it the selected data in some format. This function could open a new window where the data is re-displayed in a print-friendly format and then printed.
I mention a new window, because I guess the window hosting the SL content already has some content that is unrelated to the data to print.
Prior to SL4:
Create a WCF service that:
takes in an XML blob
renders it as PDF (one way to do that is to use FO)
stores it in some temp area with unique id
returns the id to the client
Create an .aspx page that:
takes in an id of a PDF file returned by WCF service
streams the generated PDF to the client (with proper Content-Type)
SL client:
invokes WCF service and gets the id of the generated PDF file
constructs the URL of the generated PDF file
uses any of JavaScript tricks to popup that URL in the browser (one way is to have a hidden IFRAME and set its source to the URL)

Most efficient way to transfer images to a Silverlight client

I have an application that shows a screen of image thumbnails, each image is around 80k and they are stored in a database. To keep response time reasonable, the appilcation displays a placeholder image when it first starts and later downloads the images from the server. I'm expecting to show around 40 images on the screen at once so that's my batch size. What's the best way to serve these images up to the client? I've got two options in mind.
Create an ADO.NET Data Service that exposes the Images database table to the client. The client can asynchronously request the images, one at a time, and display them as they come back from the server. I've implemented this solution and it seems to work Ok; the speed isn't great and I feel like I could utilize the Http pipe better by requesting maybe 3 images at a time.
Create an HttpModule on the server that looks for requests that look something like /Images/1.jpg and then reads the database and returns the requested data. On the client side I can have many Image objects whose source points to the virtual Urls on the server. My theory is that by just giving Silverlight many Urls to deal with it may be able to transfer the images more efficiently than my code in option 1.
Would either of these methods be more efficient or is there another technique for getting this done? Thanks!
I don't know if it's more efficient, but I've accomplished a very similar task using an HTTP Handler (ashx). The handler pulls the image in from the database based on the Parameters in the uri (image ID), and then Silverlight fetches them asynchronously by setting the Source property of an Image control to the URI of the handler with the specific ID that I want in the query string. The Image control, in turn, is inside of an ItemsControl which allows me to display multiple images.
We are doing something very similar, and we are just using an ASPX page to server them up with a query parameter of the image identifier. We are also caching the images, and the ASPX page will used the cached value if it exists. If not, we pull it from the data store, cache it, and send it down. It is working really well for us.
Have you looked at using Deep Zoom? It's very efficient about progressive image loading, and gives you a nicer user experience when the images are fully loaded.
Examples:
Hard Rock Memorabilia site
Deep Zoom Pix

Resources