locked
Error when logging in to Silverlight client OOB app - any ideas? RRS feed

  • Question

  • Hello,

    I have a Silverlight client app, developed in VS2013, which we have been trying to install for several weeks now. The server admin chap does not want to allow external admin access, so I've been having to email him deploy packages, which have often failed to run.

    We finally have something installed, but when I try to log on, I get the following error...

    Load operation failed for query 'Login'. An error occurred when parsing the Cookie header for Uri 'http://www.mydomain.com/Admin/DesktopClient/Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/Login'.

    Anyone any idea what this means? I've searched around, but can't find anything useful.

    I started Fiddler and tried again, but it didn't show anything that looked like it might help. I'm not actually sure what I'm looking for though.

    I really don't want to have to change the app more that necessary, as each change requires me to send the server chap the package, him to find time to install it, then for me to try it and find I have to change something else. It's a major pain, and for the first time since developing with LS, I really wish I'd used something else. All other apps I've written have been installed on my local server, so deployed without problems once it was set up. Deploying remotely has been the worst nightmare I've ever encountered in 35 years of software development.

    Anyway, rant over. Anyone able to help me? Thanks in advance.


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Wednesday, June 18, 2014 3:32 PM

Answers

  • Aha! Got it!

    It turned out that the web.config didn't have a connection string for the intrinsic database. No idea why, but when I added one, it worked :)

    Thanks again for all the help.


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    • Marked as answer by Mr Yossu Thursday, June 19, 2014 5:04 PM
    Thursday, June 19, 2014 5:04 PM

All replies

  • Hi Mr Yossu,

    Nobody is giving more attention to the problems of silverlight client in this forum, nor does it seem that he has support until 2021, hardly anyone responds to a question related to silverlight client. 
    My applications are hosted on dedicated virtual servers, the only thing the staff did was install windows server, all the rest of the settings and install programs on server I made it. leaves a little more expensive but this mode is very worthwhile because I have no worries, I connect via terminal service on the server and when I need to update the application is very easy. 

    Of the various problems I have had this type then I decided as follows: 

    1) Reinstalling. Net framework on the server 
    2) Configuring IIS correctly 
    3) Checking the anti-virus server (he blocked a few times) 
    4) Checking the server ports are freed 

    I use only the silverlight client in my applications and I am very happy. 
    'll just migrate to the HTML client when leaving his desktop version and is 
    better than silverlight.

    I hope some of these tips help you.

    Wednesday, June 18, 2014 8:35 PM
  • Hello, thanks for the reply.

    The way Microsoft dumped Silverlight developers without any support, and dropped all help in these forums is a disgrace. I know they are looking forward, but the way they just turned their backs on us is not acceptable.

    Which doesn't help unfortunately. As the app is installed, and does start, I'm pretty certain that the problem is nothing to do with the four points you mentioned. It seems to be something happening after it loads up and tries to authenticate.

    I guess I'll have to redeploy as a web app and see if the trace helps. Sigh, real pain this.

    Thanks again.


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Thursday, June 19, 2014 1:14 PM
  • This can happen if your application name contain spaces.

    Remove the spaces on all locations, also in web.config, where you will have to update the name field in the record for your application.

    //Sven


    Sven Elm


    • Edited by Sven Elm Thursday, June 19, 2014 2:14 PM
    Thursday, June 19, 2014 2:14 PM
  • This can happen if your application name contain spaces.

    Remove the spaces on all locations, also in web.config, where you will have to update the name field in the record for your application.

    Not doubting you, but are you sure about this? I have deployed LS apps before with spaces in their names. In fact, every one I have ever deployed has had spaces.

    I can try it and see. Do you know offhand if this can be done by editing the deployed files? The reason I ask is that redeploying the app is a major pain, as I don't have admin access to the server. I do have FTP access, so if I can just go in and edit some files, it would be quicker.

    Thanks again


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Thursday, June 19, 2014 2:20 PM
  • If you run in web mode instead the error will go away, I hope.

    //Sven


    Sven Elm

    Thursday, June 19, 2014 2:22 PM
  • If you run in web mode instead the error will go away, I hope.

    Well, as I said before, if this is to do with the spaces, all of my LS apps have spaces in the name, and all of them have been OOB apps.

    Do you know of a quick way to change the app to web instead of OOB without redeploying? Is it just a change in a file somewhere, or do I have to redeploy?

    Thanks again


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Thursday, June 19, 2014 2:30 PM
  • You need to redeploy to make it a browser app.  Can you publish the app to one of your machines or a free Azure Web Site and see if the problem occurs?  This way you could debug the problem without having to send the guy the package.

    David Kidder | Senior SDET | Microsoft | LightSwitch

    Thursday, June 19, 2014 3:14 PM
    Moderator
  • Hi,

    Don't think it's possible. the value is changed in the client.vbproj.


    Sven Elm

    Thursday, June 19, 2014 3:16 PM
  • Maby this is the problem on your clients server:

    UnsafeHeaderParsing

    validation errors that occur during HTTP parsing

    Headers names should not have spaces in them.

    This has to do with .Net Framework.

    Maby you can do:

    VB
    
    <ConfigurationPropertyAttribute("useUnsafeHeaderParsing", DefaultValue := False)> _
    Public Property UseUnsafeHeaderParsing As Boolean
    
    c#
    
    [ConfigurationPropertyAttribute("useUnsafeHeaderParsing", DefaultValue = false)]
    public bool UseUnsafeHeaderParsing { get; set; }
    
    

    Don't the the problem will occur with https, only with http.

    I know you have spaces in all your applications but maby this only occurs on your clients IIS.

    /Sven


    Sven Elm


    • Edited by Sven Elm Thursday, June 19, 2014 3:26 PM
    Thursday, June 19, 2014 3:25 PM
  • Do you have specifications on your clients server?

    /Sven


    Sven Elm

    Thursday, June 19, 2014 3:29 PM
  • in web.config:

    <system.net>
     
    <settings>
      
    <httpWebRequest useUnsafeHeaderParsing="true" />
     
    </settings>
    </system.net>


    Sven Elm

    Thursday, June 19, 2014 3:31 PM
  • Try the web.config change directly on the server.

    Then you don't have to redeploy

    Maby it works :)

    Sven


    Sven Elm



    • Edited by Sven Elm Thursday, June 19, 2014 3:34 PM
    Thursday, June 19, 2014 3:33 PM
  • Hi Sven, thanks for all the replies!

    Unfortunately, I don't know much about the server. What specifically did you want to know and I'll ask.

    I tried modifying the web.config like you showed, but it didn't help. Looks like I'm going to have to send him another package with spaces removed from the name, and the app set to web and see if that gives any clues.

    Thanks again


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Thursday, June 19, 2014 3:47 PM
  • Aha! Got it!

    It turned out that the web.config didn't have a connection string for the intrinsic database. No idea why, but when I added one, it worked :)

    Thanks again for all the help.


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    • Marked as answer by Mr Yossu Thursday, June 19, 2014 5:04 PM
    Thursday, June 19, 2014 5:04 PM
  • Fantastic. Great. Happy for you.

    Sven Elm

    Thursday, June 19, 2014 5:18 PM
  • Hmm, not so fantastic after all. Every time I rebuild the deployment package (which I seem to need to do to update the files in the app.publish folder), it replaces my connection string with a placeholder. I've specified the connection string in the publish wizard, but it's always removed in the deployed web.config.

    Any ideas? Thanks again.


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Thursday, June 19, 2014 7:38 PM
  • Can you do it manual in the web.config. I mean addining the connection string in the web.config. I had this problem before and resolved it by adding it manual.

    Sven Elm

    Thursday, June 19, 2014 8:09 PM
  • Can you do it manual in the web.config. I mean addining the connection string in the web.config. I had this problem before and resolved it by adding it manual.

    Sven Elm


    You can also do it on the server directly in the web.config. Maby it will be overwritten on next deploy, but better then nothing.

    Sven Elm

    Thursday, June 19, 2014 8:13 PM
  • Yeah, I did add it manually before deploying. It's just very annoying that it wipes it out every time.

    I did realise that web.config is unlikely to change, so I've just stopped copying that file. Still annoying, but I'm past caring! At least I've finally got a working app, even with various annoyances.

    Thanks again


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Thursday, June 19, 2014 8:28 PM