LightSwitch HTML Client pubished on azure get an 400.0 bad request error

Well, I have this problem: "Request failed with status code '400' and the status text 'Bad Request'." when I run my LightSwitch HTMLClient application that are published in Azure Web Applications.
I already look everywhere for 3 days and still could not find the answer to this problem.
I hope someone in this forum can help me.
Thanks.

Hi, thank you for respond.
let's see, the fiddler throws these:
NOTICE: Don't follow the links, they are dummies
GET http://myapp.azurewebsites.net/ApplicationData.svc/$metadata
400 Bad Request (text/html)
The Request
GET /ApplicationData.svc/$metadata HTTP/1.1
MaxDataServiceVersion: 3.0
Accept: application/xml
Referer: http://myapp.azurewebsites.net/HTMLClient/default.htm
Accept-Language: es-MX,es;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Connection: Keep-Alive
Host: myapp.azurewebsites.net
Cookie: ARRAffinity=354b4b5b87b2f1e4e8b6c19a5566c6e055bf3e4047b54b4d2ea846ba1b33d561; msls-client-parameters=preferredLanguage=es-MX; ASP.NET_SessionId=bkf52whz0rkufhcxmqrfuirm
The Response
HTTP/1.1 400 Bad Request
Cache-Control: private
Content-Type: text/html
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Powered-By: ASP.NET
Date: Wed, 01 Apr 2015 04:23:39 GMT
Content-Length: 1647
Connection: Keep-Alive
The azure logs, the lightswitch diagnostic and the debugger not show any difference from these.

Similar Messages

  • SSRS reports from Lightswitch Html Client

    I have created a Lightswitch desktop application that list the available reports that are stored in a table and also provides a button that when clicked launches the web browser to the URL for the report on the SQL server. My problem is now I'm trying to
    create the HTML client for the application and have no experience with Java Script. Does anyone know how to accomplish the something that I did on the desktop application on the HTML client?
    Below is the code that I used to open the URL in the browser in the desktop application.
    Imports Microsoft.LightSwitch.Threading
    Imports System.Runtime.InteropServices.Automation
    Namespace LightSwitchApplication
    Public Class ListReports
    Private Sub RunReport_Execute()
    ' Write your code here.
    Dim uri As New Uri(ReportsSet.SelectedItem.ReportAddress) 'website stored in the ReportsSet.ReportAddress field
    If (AutomationFactory.IsAvailable) Then
    Dim shell = AutomationFactory.CreateObject("Shell.Application")
    shell.ShellExecute(uri.ToString)
    ElseIf (Not System.Windows.Application.Current.IsRunningOutOfBrowser) Then
    System.Windows.Browser.HtmlPage.Window.Navigate(uri, "_blank")
    End If
    End Sub
    End Class
    End Namespace

    This may help:
    Creating Reports in LightSwitch HTML Client
    // Show Loading message
    var LoadingDiv = $("<div></div>");
    var Loading = $("<h1>&nbsp;&nbsp;&nbsp;&nbsp;Loading Report...</h1>");
    Loading.appendTo(LoadingDiv);
    LoadingDiv.appendTo($(element));
    // Get Report
    var HTMLContent = $("<div></div>").html(
    "<object width='650px' height='650px' data='../reports/ReportViewer.aspx?SurveyId="
    + contentItem.screen.SurveyId + "'/>"
    // Make report appear on top of the Loading message
    HTMLContent.css({
    "margin-top": "-50px"
    HTMLContent.appendTo($(element));
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • Extending Screens for Multi-Select in the LightSwitch HTML Client

    Hi i
    read Mike Droney's article of 
    Extending Screens for Multi-Select in the LightSwitch HTML Client
    But i just want to understand the code, so what is the ‘__isSelected’ property? from where does it come?
    why does the contentItem.value.details have an ‘__isSelected’ property?
    is the value of the contentItem not the screen?
    and also how can i implement the ‘Can Execute Code’ only if one or more check boxes are checked?
    Thanks  

    But i just want to understand the code, so what is the ‘__isSelected’ property? from where does it come?
    why does the contentItem.value.details have an ‘__isSelected’ property?
    is the value of the contentItem not the screen?
    and also how can i implement the ‘Can Execute Code’ only if one or more check boxes are checked?
    The '__isSelected' property is a private member of the class msls.ContentItem related to the backing data for the selected item.  That is to say, it would be a private member if JavaScript actually had encapsulation and information hiding like a typical
    object-oriented language. I like to reference David Herman's description from his book
    Effective JavaScript:
    Often, JavaScript programmers resort to coding conventions rather than any absolute enforcement mechanism for private properties. For example, some programmers use naming conventions such as prefixing or suffixing private property names with an underscore
    character (_). This does nothing to enforce information hiding, but it suggests to well-behaved users of an object that they should not inspect or modify the property so that the object can remain free to change its implementation.
    ...which means that it's generally not recommended to directly get or set backing data properties like __isSelected, instead working with the public property 'selectedItem', although it may work fine in certain cases like this one.
    To make _canExecute fire only when an item in the list is selected to enable a button method, try:
    return (screen.Contacts.selectedItem !== null);

  • Lightswitch HTML Client - Detail picker for each related List Item

    I have a doubt in Lightswitch Html Client application.
    Scenario:
    Suppose i have two tables  "Property" and "PropertyVaues".
    A Property can have many PropertyValues is the relationship between them.
    I want to show the data on screen like below:
    Property List:
    XYZ            [___10____(+)]
    MNO          [___abc____(+)]
    PQR           [___30.5___(+)]
    Xyz  is the list item
    assume [___10____(+)]  is the detail picker of
    PropertyValues which allow to select one value related to
    XYZ Property item, and same for other list items.
    Only Related "PropertyValues" for each list item must be available in the detail picker.
    Please help me out if any one has the solution to solve it.
    Or you can give me any other way to accomplish the above scenario.
    Thanks

    Hello Josh,
    I am implementing it on AddEdit screen.
                      (1)                                              
    (2)                           
    Screen description:
    [Note: Some Images are in my next post]
    1. Image(1) shows the list of properties (GSM, Mill Name, CMS). These Properties have its respective property values in drop down.
    2. When i select any value from the dropdown list (eg. 10 from GSM). the value is assigned to all other drop down.
    [shown in image(3) next post]
    (4) Again when suppose i select value for "Mill Name" Property as "Abc", it is assigned to all other drop down.
    [shown in image(4) next post]
    I want that a property value must be assigned to its respective Property only.
    Please help me on this. Or suggest me another way out to accomplish such scenario.
    Thanks
    Ravi Patel

  • I cannot update 2 changes to portfolio, get error bad request error 400

    I hit edit portfolio and I made a change to the number of share and to cost price per share. I hit enter and get message Bad Request Error 400

    Can you make the changes while you are in Private Browsing mode?
    In Private Browsing mode any cookies that you have from regular are not accessible.
    *https://support.mozilla.org/kb/Private+Browsing
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode

  • Getting a Bad Request Error upn logging into website - Safari goes right in

    Trying to access South Carolina Library information for students at an educational institution. When we get to the login page for the place we need to go, Firefox comes back with a 400 Bad Request Error. If the students use Safari, it goes right through. I prefer them to use one browser and would prefer Firefox. Any thoughts? Narrowing it down, it has something to do with networking and Firefox. I can log on as a local admin on the MAC and Firefox will go right through, but if the students log into to the MAC using Open Directory, I get the Bad Request message.

    Trying to access South Carolina Library information for students at an educational institution. When we get to the login page for the place we need to go, Firefox comes back with a 400 Bad Request Error. If the students use Safari, it goes right through. I prefer them to use one browser and would prefer Firefox. Any thoughts? Narrowing it down, it has something to do with networking and Firefox. I can log on as a local admin on the MAC and Firefox will go right through, but if the students log into to the MAC using Open Directory, I get the Bad Request message.

  • I get "bad request error 400" when I try to log on to my gmail account. Safari allows me to access the account. What's the problem?

    I cannot open my gmail account on Firefox as of yesterday. I get, instead, Bad request Error 400. This is a recent devlopment and rather annoying. Safari works fine.

    You're welcome

  • Runtime Error in VS2012 (Update4) LightSwitch HTML Client

    I have a desktop (Silverlight) application, I upgraded the project to add the HTML Client. Now when I run the HTML Client, it shows this message box on the browser:
    "The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error."
    I started my desktop application in VS2012 Update 2, and now it is in the Update 4. The interesting thing is that when I make new Project and then add HTML Client, I will not receive this error and it works fine.
    It shows this error only on that specific project (Which I started on VS2012 Update2, later Update3 and now Update4) and that project is very big (more than 100 tables and screens), therefore I can not make that from scratch again.
    I have to add HTML Client to my project. I really appreciate if someone can help me.

    "The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error."
    Hi Keysen,
    First you need install Microsoft.LightSwitch.Client.JavaScript.Runtime 2.5.2. This update can be downloaded from the NuGet Gallery, see:
    http://www.nuget.org/packages/Microsoft.LightSwitch.Client.JavaScript.Runtime/
    Because this issue is project specific, you can also turn the build output, in the
    Options window, find Projects and Solutions >> 
    Build and Run. Find Diagnostic in the drop-down for MSBuild project build output verbosity. It will give detailed information why this happens.
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to access the C# file in server from Lightswitch HTML Client

    Hi,
    In that LightSwitch HTML Application i have some c# file in the server project.How can i access those C# file in the screens (HTML Client project )
    thanks,
    goblalakrishnan s
    gobalakrishnan S

    Hi,
    with implementing Generic File Handlers (.ashx)
    See follow link:
    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/174/Full-Control-LightSwitch-ServerApplicationContext-And-Generic-File-Handlers-And-Ajax-Calls.aspx
    regards
    j.nord

  • 'Days Elapsed' computed field in lightswitch HTML client

    I am developing a simple lightswitch HTML application to keep track of research experiments. I have a table called 'Experiments' and one of the fields is 'ExperimentDate'. I want to display the number of days that have passed since the date of experiment.
    Is there any way to do this?

    Use a custom control to display 'ExperimentDate' and display the calculation. Use in-built JavaScript datetime functions or add a JavaScript library such as moment.js. Similar to this MSDN article sections:
    Format a Date
    Moment.js
    You can see the use in this
    stackoverflow post.
    var date1 = new Date("02/Feb/2015 00:00:00"),
    date2 = new Date("25/Feb/2015 10:09:00"),
    diff = date2.getTime() - date1.getTime(),
    days = Math.floor(diff / (1000 * 60 * 60 * 24));
    Cheers
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

  • [VS2013 Update4] HTML Client loading child and grandchild entities in separate OData requests even when not needed?

    Repro steps:
    create new LightSwitch HTML C# app
    Attach to Northwind OData service - http://services.odata.org/V3/Northwind/Northwind.svc/
    include Order_Details, Orders, and Customers
    add screen -> browse data, choose Order_Details
    in the tile list that comes up, add other screen data, Order.Customer.ContactName
    delete the 3 columns it added by default (deleting them isn't necessary to cause the issue, just makes the issue more obvious)
    F5 and F12 in the resulting browser and make sure to check the Network tab
    The resulting tile list shows just the contact names of the customers for the orders, as you'd expect, but they fill in slowly instead of all at once.
    In the Network tab, you'll notice the first data request is what's expected in terms of including the associated child and grandchild entities
    http://localhost:54553/NorthwindEntitiesData.svc/Order_Details?$expand=Order/Customer,Order&$top=45
    Now, I'm a little confused at this point why it's not using $select to only fetch the particular properties needed, instead of it including all the Order and Customer properties as well, but that's secondary to this particular issue.
    If you check the response, you'll see that the JSON returned definitely includes (as you'd expect) the Order and Customer, and the Order.Customer.ContactName in particular is definitely included - here's the first few lines of the response (reformatted to
    be readable)
    "odata.metadata": "http://localhost:54553/NorthwindEntitiesData.svc/$metadata#Order_Details",
    "value": [{
    "Order": {
    "Customer": {
    "CustomerID": "VINET",
    "CompanyName": "Vins et alcools Chevalier",
    "ContactName": "Paul Henriot",
    After that is a bunch of further requests for Customers and Orders based on id, even though the first request already included all the data we need to display them.
    http://localhost:54553/NorthwindEntitiesData.svc/Customers?$filter=CustomerID%20eq%20%27VINET%27
    http://localhost:54553/NorthwindEntitiesData.svc/Customers?$filter=CustomerID%20eq%20%27TOMSP%27
    http://localhost:54553/NorthwindEntitiesData.svc/Customers?$filter=CustomerID%20eq%20%27HUNGO%27
    ...etc...
    As you'd imagine, these requests have a pretty big negative effect on performance, especially if you have multiple columns exhibiting this effect.
    Is this By Design?  Am I doing something wrong?  Is there a workaround for this?
    Thanks!

    After that is a bunch of further requests for Customers and Orders based on id, even though the first request already included all the data we need to display them.
    http://localhost:54553/NorthwindEntitiesData.svc/Customers?$filter=CustomerID%20eq%20%27VINET%27
    http://localhost:54553/NorthwindEntitiesData.svc/Customers?$filter=CustomerID%20eq%20%27TOMSP%27
    http://localhost:54553/NorthwindEntitiesData.svc/Customers?$filter=CustomerID%20eq%20%27HUNGO%27
    ...etc...
    This really has bad impact on lightswitch performance, you can submit it to Visual Studio Connect Site, https://connect.microsoft.com/VisualStudio

  • Getting Bad request error while trying to get a specific document details from c#.

    Hi,
    While trying to retrieve a specific document details using RESTful WS API from C#, it is throwing "The remote server returned an error: (400) Bad Request" exception.
    the request URL i am using for this is like;  "http://<Server>:6405/biprws/raylight/v1/documents/1111"
    But it is working fine, if i change my request URL to get the dataproviders of the same document like; "http://<Server>:6405/biprws/raylight/v1/documents/1111/dataproviders"
    Please let me know if i am missing any thing in first case, getting the details of a specific document, while sending a request to RESTful SDK.
    Thanks,
    Kalyan

    I think you are using “Content-Type” header or an “Accept” header.
    You should be using “Accept: application/xml” for that request
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center
    Canada
    Follow us on Twitter

  • Getting "HTTP 400 Bad Request" error when submitting form

    I am using APEX 3.1.2. I have a form based on a table. The form contains check boxes, a multiple select item, some text items and some text boxes with HTML editors. It had been working properly but now is giving me the dreaded "The web page can not be found..." error page as soon as I click create when in create mode or the update or the delete button when editing a row of data. The URL in the address area of the browser is: "http://ndhoast.tsh.mis.mckesson.com:7778/pls/apex/wwv_flow.accept" and the tab says "HTTP 400 Bad Request".
    Any help would be greatly appreciated!

    Do you have any extra Javascript components added in? We've been doing work with ExtJS and Oracle Apex, and I've noticed that on one particular page there is a bad request thrown when a doSubmit() is called. When the Javascript is commented out, the page works fine.

  • Lightswitch HTML Client 2013 - Navigation property load works Intermittently on phone, but works all the time in desktop browsers

    Hi,
      I have this code which is adding a record and re-loading a navigation property "ldDailyLogDetails_FK".
    afterClosed:
    function   (viewScreen, navigationAction) {
                    if
      (navigationAction === msls.NavigateBackAction.commit) {
                          screen.ldDailyLogDetails_FK.load();
         It successfully adds a record and then redisplays this new record on all browsers, but on my phone it adds the record ok, but sometimes, it dosnt seem to refresh (or load) the page with the new record.  
          I also wonder if there is any place I might go to get some "phone vs desktop browser" information and advice?
          I have tried screen.ldDailyLogDetails_FK.refresh(); as well.
    david

    Hi David,
    From your description above, it seems that this issue happens occasionally. At the same time you can also use some tool to test your lightswitch application, such as:
    Fiddler, it will be helpful to troubleshoot.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to show/hide build in search box in javascript for LightSwitch html clients?

    Hi
    For each collection on content item, there is built-in showSearch button we can add, once the user clicks on the search, a pre-built-in-search-box shows up above the collection so user can search items in the list. How can I show/hide the pre-built-in-search-box
    in javascript?
    Any help will be appreciated
    The built-in showSearch on content item
    The user clicks the search button, and the pre-built-in-search-box shows up to allow user to enter search terms
    jl

    Hi Joe,
    Welcome to Lightswitch forum.
    If you want to show/hide showSearch button, you can execute this line to show the button,
    this.FindControl("showSearch").IsVisible = true;
    Or execute the line below:
    this.FindControl("showSearch").IsVisible = false;
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Special characters to be displayed on the invoice PDF

    Hi, We have a requirement to display the name of the contact person of BTP in invoice PDF as "Stefan König".  I have a doubt that if we translate the text field in the respective language whole name will be affected.  As we need both english characte

  • BSEG X FB03

    Hello! In BSEG the column u201CPlanned amountu201D have value just for credit postings (without the corresponding debit). Is that correct or should it have postings for both Debit and Credit? Thanks

  • How did my Air get Hijacked?

    I hope this is the correct section for this question. I was trying to use my MBA in an Airport lounge when very strange things started to happen. The cursor started to erratically select things on the screen, jumping around on its own and both left a

  • Catching message errors after submit

    Is there any way to catch message after submitting report? I mean any type of message, i.e. E,S,I and so on. And if it's possible, I need to suppress them. Maybe this can work with help of the system calls?

  • Constant static

    I've been recording on Garage Band using the built in mic and a pair of headphones plugged into the jack. Everything was fine until 8/18 - when I opened GB and tried to record I got some terrible static. It was similar to the static I got when the Ma