locked
Javascript:false, System.NotSupportedException: The URI prefix is not recognized error RRS feed

  • Question

  •  

    Hi,

     

    I am trying to record a Web test for our internal web site. I just created a new project and new web test. All that i did for the web test was open it up. And there is a few icons that i think i am getting error on. But i am not sure.

     

    All that I see that next to the x (failed) icon it says "javascript:false"

    In the details i see:

    System.NotSupportedException: The URI prefix is not recognized.
       at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
       at System.Net.WebRequest.Create(Uri requestUri)
       at Microsoft.VisualStudio.TestTools.WebStress.WebTestTransaction..ctor(String requestUrl)
       at Microsoft.VisualStudio.TestTools.WebStress.WebTestInstrumentedTransaction.CreateTransaction()
       at Microsoft.VisualStudio.TestTools.WebStress.WebTestInstrumentedTransaction.Execute(WebTestCaseContext testCaseContext, AsyncCallback completionCallback, Object callerState)

     

    And my web test fails because of that.

    The same issue i had in VS 2005. I found this post on the forum http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2386218&SiteID=1

     

    and thought that in 2008 version this issues goes away.

     

    Can please anyone help me to figure out why I am having this error, is there any work around or this is still a bug in theVS 2008.

     

    Thank you

    Monday, December 17, 2007 10:07 PM

Answers

  • Well, a better way out would be to install the RTM version of VSTS 2008 which does fix the problem.

     

    If you set "Parse Dependent Links" to false, then none of the dependent requests on your web pages (images usually, but also javascript files, style sheets) will not be fetch when you run the Web test (or load test containing the web test).   This may be OK in cases where you are mostly worried about the performance of dynamic pages (such as .aspx pages), but page time measurements might be off because the dependent requests are not being fetched.

     

     

    Tuesday, December 18, 2007 4:35 PM
    Moderator
  •  

    This issue gets fixed in the VSTS 2008 RTM version.

    Thank you

    Thursday, January 3, 2008 10:35 PM

All replies

  • Are you running the Beta2 or RTM version of VS 2008?

     

     

    Monday, December 17, 2007 10:34 PM
    Moderator
  • Yeah, I am running the Beta2 Team Suit version.

     

    Also, i found that I can Parse Dependent Links to get rid of the javascript errors

    http://blogs.msdn.com/edglas/archive/2007/12/02/web-test-authoring-and-debugging-techniques-for-vs-2008.aspx

     

    So, is this a way out, or that affect web test somehow?

     

    Thank you for your respond Smile

    Sasha

     

    Tuesday, December 18, 2007 3:48 PM
  • Well, a better way out would be to install the RTM version of VSTS 2008 which does fix the problem.

     

    If you set "Parse Dependent Links" to false, then none of the dependent requests on your web pages (images usually, but also javascript files, style sheets) will not be fetch when you run the Web test (or load test containing the web test).   This may be OK in cases where you are mostly worried about the performance of dynamic pages (such as .aspx pages), but page time measurements might be off because the dependent requests are not being fetched.

     

     

    Tuesday, December 18, 2007 4:35 PM
    Moderator
  • Thank you for your respond and suggestions. My company is still in the process of purchasing the RTM version and I am not sure how ling it will take them to buy the license for it. But for now, i need to run at least one valid web test without any errors, even if i will use the "Parse Dependent Links" feature. (If this javascript error will be fixed in the RTM version then i am not worried about it for now). But i have to resolved some more errors that I've faced in my web test.

     

    I've faced with:

    Request failed: Context parameter '$HIDDEN1.__LASTFOCUS' not found in test context

     and HTTP/1.1 200 OK Transfer-Encoding : chunked

     

    For the LASTFOCUS error I’ve searched this link: http://blogs.msdn.com/slumley/pages/how-to-debug-a-web-test.aspx

    But there is no answer for my issue there. As I don't see any of the numbers after $HIDDEN, like it said in the link. All that I see is:

     

    QueryString Parameters

    T=95

    P=34

    MT=778

    RN=Control+Segmentation

     

    Form Post Parameters

    _EVENTTARGET=_ctls$lbSubmit

    _EVENTTARGET={{$HIDDEN1._EVENTARGUMENT}}

    _LASTFOCUS={{$HIDDEN1._LASTFOCUS}}

    _VEIWSTATE={{$HIDDEN1._VIEWSTATE}}

    VPosition = 0

    HPosition=0

    hidSubmit={{$HIDDEN1.hidSubmit}}

    _clt1.fm={{$HIDDEN1._cdtl1:fm}}

    _ctl1 : ptbRptFltrName:tb=New Filter

    RadEContentTextarea_ctl1_ptbFltrDesc_rm=

    _ctl1 : ptbFltrDesc:rm=

    _ctl1 : ddlClauseOp=And

    _ctl1 : ddlWhereCols=[CntrComments]|4000|231

    _ctl1 : ddlStatementop==

    _ctl1 : tbWhereText=

    _EVENTVALIDATION={{$HIDDEN1._EVENTVALIDATION}}

     

    Is this error related specifically for our web site? can we fix it somehow? Can it be fixed with the RTM version?

     

    About the second error I am not even sure, as i can't find any posts about that.

     

    Thank you very much for your help and your responds. Really appreciate that!

    Sasha

     

     

     

     

     

    Tuesday, December 18, 2007 5:28 PM
  • Bill, I also wan to ask you if I can determine somehow if VSTS 2008 RTM version will work for our web application. As I am facing some more errors, not only the javascript one (that can be resolved within VSTS 2008 RTM). I can't find any answers for all other errors, so i am thinking that RTM version won't help to resolve them? Is there any ways to check that before we will purchase the license for the RTM?

     

    Thank you in advice.

    Sasha

     

    Tuesday, December 18, 2007 10:30 PM
  • Sasha, Sean's post is a recipe for debugging these sorts of problems. Just like his post was talking about viewstate, you should be able to apply this same pattern of debugging to LASTFOCUS. You need to figure out how LASTFOCUS is used in the app (start by searching in the previous response) and whether or not it matters. If LASTFOCUS is not a dynamic parameter (my guess is it is not), you can just unbind it, which will cause it to revert to the recorded value.

     

    Ed.

     

    Wednesday, December 19, 2007 2:56 AM
    Moderator
  • Thanks for the resond!

     

    I think that my parameter isn't a dynamic one, at least looking at the web test editor. How can i unbind it so my web test passes? Right now It fails with 7 primary requests and 0 dependent requests. All errors that i have are for the parameters that i think not dynamic.... Do i need to set something up to unbind them?

     

    Thank you

     

    Wednesday, December 19, 2007 4:02 PM
  • Also, i think that my web test doesn't work at all, as I am loging in as Administrator, and it Requests my user name and password, but during the web test it shows that i am login in as a Guest and a few errors that i have because if the bad login during the web test, not in the beginning of it when i put the right user name and password.

     

    My co-worker said that this is all related to Javascripts. Is that a right assumption? And can this be resolved in RTM VSTS2008? Or can it be overrided somehow in Beta version? Maybe some settings?

     

    Wednesday, December 19, 2007 4:54 PM
  • If you haven't done so already for this test, click the 'set credentials' button in the toolbar above the test window..  That allows you to set what credentials will be used when the test is run.   You can bind those to a datafile so that different sets of credentials will be used (so it's not all the same user).

    I believe (and the MS guys will correct me please if I'm wrong) that said control applies only to the 'windows' credentials, and so don't affect sites that do their own security (as with most commercial sites).. but for internal websites that use integrated security, I believe that's where you control what 'user' is in play when the test is running.
    Wednesday, December 19, 2007 5:43 PM
  • Hi,

    I setup credentials and still I encountered those errors. Maybe i missed something when i was setting that up? As I understand I just need to put the name and password, right? Anything else?

    The cookies are ok, they got generated for each test run, so I think they are not hard coded. I know that our web site if doesn't recognize the user (i.e. doesn't recognize the cookies) will automatically think that this user is a Guest. Even if i just logged in as Admin.

    Can this be a Java errors, or java setup that not sending the right variables?

    I am pretty lost, and don't know what to look at more? Please help me with this....

    Thank you
    Sasha
    Thursday, December 20, 2007 12:39 AM
  • If by "these errors" you are referring to the context error regarding the LASTFOCUS parameter let me see if I can provide an explination for what's going on.

    I've just had to deal with something very similar in my tests.   Previously the developers had included a hidden parameter for 'lastpage' on virtually all pages..  So when you do a post from one of those pages, the post includes that hidden parameter..  This causes the system to look for and capture that parameter when it comes in, via the preceeding page..   In effect the system knows it will need that parameter for the following page, so it throws an error if it can't find it ..   hmmm maybe I can diagram this out in text  

      Pageone.(post or get).   contains hidden params including lastfocus in its response
     
       Pagetwo (post)   wants to post back those hidden values, including lastfocus in its request

     So then the devs decide that they don't need that hidden value after all.. and they stop including it on pageone... the problem is the coding in your test still expects it to be there for the data it needs when it does the post to get pagetwo --- So when you run the test, it fails at pageone, because the hidden value its looking for is not in the response of pageone

    the solution is simple actually..  Confirm the hidden value is really no-longer supposed to be on that page (talk to devs, or whatever) and then remove it from the post parameters for pagetwo.  Then inspect the rest of the test, and see where else you find the same situation because odds are that you're going to find it in a bunch more places  (helps if the devs can give you a list of pages for which they removed the hidden value.. in that case, any post operation following one of those pages will likely need to have the parameter removed from the post parameters..

      did that make sense?  if not we'll have to see if one of the MS folks can explain it better than I can.

    Thursday, December 20, 2007 7:39 PM
  •  

    Hi Chuck, thank you for your respond!

     

    Ok, one of a few errors I resolved. We are using Java Script for our background and it causes one of a few errors.

    But i still encounter another two errors.

    First one is "Javascript:False" which i think has to be resolved in the RTM version of VSTS 2008.

    The second one is: "Request Failed: Context parameter '$HIDDEN1.hidSubmit' not found in test context."

     

    I think this is the error that you were talking about (unfortunately i can't confirm that with my developers, as they all are on vacation Smile ). So could you please explain me how to remove this hidden value from the post parameters?

     

    Thank you

    Sasha

     

     

     

     

     

    Wednesday, December 26, 2007 4:10 PM
  • I think I figured out how to get rid of the hidden values from the post parameters. But now I have another question.

    Wil deleting the hidden values from the post parameters affect the results of the web testing itself? Will it affect time measurement? Or anything else?
    Wednesday, December 26, 2007 8:17 PM
  •  

    This issue gets fixed in the VSTS 2008 RTM version.

    Thank you

    Thursday, January 3, 2008 10:35 PM