locked
Deployment errors - please help me deploy a 3-tier app RRS feed

  • Question

  • Hello,

    I've been battling with deployment and can't get it to work. As far as I know, I have all the prerequisistes on the server (went through this blog post carefully).

    Is it possible to deploy to a site that isn't the default one? All the demos and walkthroughs leave the service URL as http://myserver and the site/application as "Default web site/Whatever". Maybe I'm unusual, but I actually have more than one site running on the server!

    I tried using the full URL of where I want the LS to live for the service URL (eg http://www.somedomain.com/Admin), and setting the site/application appropriately (eg somedomain.com/Admin, where "somedomain.com" is the name of the site in IIS admin, and Admin is the name of a root folder that has been set to be an application with the same alias), but I get the following error when I try to deploy...

    Error    1    Web deployment task failed.(Remote agent (URL http://www.somedomain/Admin/MSDEPLOYAGENTSERVICE) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.)
    The requested resource does not exist, or the requested URL is incorrect.
    Error details:
    Remote agent (URL http://www.somedomain/Admin/MSDEPLOYAGENTSERVICE) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.
    An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.
    The remote server returned an error: (404) Not Found.    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets    964    10    JBD.WebSite.AdminLS

    Now I have checked, and the WebDeployent Agent service is started (see this screen shot from the server), so that's not the problem. However, I have looked at the server, and not surprisingly, the Admin folder of the web site is empty (I didn't put anything in there yet). I don't know if MSDEPLOYAGENTSERVICE is some clever trick that IIS uses to call something else, or if it expecting to find a file or folder there of that name, but if so, where is it supposed to have come from?

    This is my current position after trying many different things. I'm getting very frustrated at how difficult it is to deploy this app.

    I would be very grateful if anyone can help. Thanks


    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, July 28, 2011 12:50 PM

Answers

  • Can you email me (bmoore) and we can work on this offline a bit?  The symptoms suggest a problem with the WebDeploy 1.1 install but the resintall should fix that...

    Garth Henderson just spent almost two and a half hours on Skype with me, and I think we have finally sorted it out.

    I need to spend some more time checking it carefully, but there are two areas that are definitely things to watch...

    1) You seem to need to have Web Deploy version 1.1 and 2.0 on bot the client and server to be able to deploy. I can't confirm this without uninstalling and reinstalling, and trying all combinations, but we didn't have any success at all until we had both versions on both machines.

    2) I strongly suspect that there is incompatibility with having a Lightswitch project in the same solution as a ASP.NET project. I already had an ASP.NET project (along with several other projects, mostly class libraries supporting the web site), and I added a Lightswitch project to that solution. This gave some odd results, like when you switch to file view and show all files, it doesn't show the Clientgenerated or Servergenerated folders at all. I don't know for definitive, but I tried a standalone LS project, using the same database and so on, and it deployed fine.

    As I said, these are only preliminary findings, and I need to check them a lot more carefully before coming to any firm conclusions, but hopefully they may help someone.

    For the record, when doing a web deploy, we used the following settings in the deploy wizard (only the important ones mentioned)...

    *) We unchecked the "IIS server has the LS deployment requisites installed" option

    *) For the publish output, we used "https://10.0.0.100/" for the service URL, which is the IP address of the server on my local network. I suspect that any IP address or domain name would work, but I didn't check this. We didn't need to add anything else to this URL.

    *) On the same tab, the site/application was "domainname.com/applicationname" where both of those names are what is shown in IIS admin. The user name and password are the Windows log in for the server.

    *) Database connections are fairly obvious. The first one was the sa log in, and the second was the lower permissions one used for general data access.

    *) On the Authentication tab, we said yes to create the app admin the first time, then said no on subsequent deploys.

    *) On Other Connections, we used the seond conn string from the database tab.

    *) We created a test certificate. Garth was adamant that we do this, even though it was a temporary one. I haven't tested what happens if you try deploying without a certificate.

    That was it! It's been a long night (now nearly 11pm), and I can't think straight enough to be sure I got all the details right. I hope to have time to go through this in more detail, but that will have to wait until after the family holiday!

    Hope this helps someone.


    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, August 11, 2011 11:17 PM
    Thursday, August 11, 2011 9:50 PM
  • @Yossu - are you still seeing this?

    Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound

    That can be caused by auth settings on the virtual app (or parent) - if you've enabled forms or windows auth, you also need to disable basic/digest, etc.  IOW have only Anonymous and Forms enabled.  If you're not deploying via the LS prereqs you have to configure it manually.

    Or if you're past that, let me know where you're at...

     

     

    • Marked as answer by Mr Yossu Monday, August 29, 2011 11:22 AM
    Tuesday, August 16, 2011 9:59 PM
    Moderator

All replies

  • I always publish my 3 tier apps by building a package on disk. Maybe that is a workaround for your problem. You have to choose "Create a package in disk", after that copy the file on server and import the package (details).

    hth

    Andreas

    Thursday, July 28, 2011 1:37 PM
  • Hi Andreas,

    As I wasn't getting anywhere with remote publishing (which would be a lot more useful if I could get it to work), I tried publishing to disk. This seemed to work fine, except for two issues...

    1) When I imported the package into IIS, it created the database, and created the ASP.NET tables, but didn't create any of my own tables. I am effectively left without a database! I checked the option to create the database, which it did, and have no idea why it didn't create my tables. I made sure that the checkboxes under the "Deploy SQL database" section were checked (everything was checked by default, and I didn't change anything). I ended up having to script my database manually on my development machine, and copying the script into a query window on the server. This is not very impressive.

    2) When I finally got the application running, I was able to add another user. However, when I went to the real part of the app (ie not the admin section, but the bit with the screens I created), it said it was unable to load the data, and that I should check my network connection and try again.

    I have checked the connection string and it's fine. I've used SQL Server Management Studio on my dev machine to connect to the server using the database user's credentials, and that works fine. I can select from the tables, which doesn't return any data as I can't get any in there, but connects and shows me an empty results set.

    Any idea what's gone wrong? I'm almost there, but stuck on why it can't load the data, especially when it can load the user data fine. Is it anything to do with the fact that it didn't create the database for me, so the client app doesn't know about the tables I created manually? This seems unlikely, as it wouldn't show the screens if it didn't know about the structure of the underlying data.

    Thanks for any help you can give.


    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, July 28, 2011 2:25 PM
  • Mr Yossu,

    You can deploy to a non-default site, here's what I do:

    Service URL: https://machine-name:8172/msdeploy.axd

    Site: NonDefaultSiteName/MyApplication

    Apparently MSDeploy knows sites by name and not by port (took me a while to figure that one out)

    If that doesn't fix it, try deploying without the prereqs option checked - that might lead to a different error message to help debug more.  If you go this route, you'll have to make sure the application pool is running under 4.0 and the virtual application is using Forms auth (essentially what the prereqs do for you automatically).

     

    ---

    Let me know if this helps.

    Thursday, August 4, 2011 4:13 PM
    Moderator
  • You can deploy to a non-default site, here's what I do:

    Service URL: https://machine-name:8172/msdeploy.axd

    Where did the port 8172 come from? Also, is msdeploy.axd something that's supposed to exist on the disk somewhere, or is there some magic going on here?

    My set up is that I have the server on the same LAN as my development machine, but (obviously) each web site on the server uses its own domain name. I presume from your reply that domain names are irrelevant ehre, and it's only the machine name of the server that counts. Can you confirm I got this right.

    Site: NonDefaultSiteName/MyApplication

    Apparently MSDeploy knows sites by name and not by port (took me a while to figure that one out)

    If that doesn't fix it, try deploying without the prereqs option checked - that might lead to a different error message to help debug more.  If you go this route, you'll have to make sure the application pool is running under 4.0 and the virtual application is using Forms auth (essentially what the prereqs do for you automatically).

    I presume the name is what I called the site when I set it up in IIS admin? In our case, we always name a site after the primary domain name (minus the "www"), so it woudl just be something like "mydomain.com/MyApp"

    All the sites are running under the default app pool, which is set to use 4.0, so that shouldn't be a problem.

    Thanks for the reply. If you could answer the questions I asked above, I will give this a go and see how I get on.


    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, August 4, 2011 10:34 PM
  • The port 8712 & AXD is magical I believe... it's not a site/file you'd see in IIS Mgr.  To find the exact URL being used, you can do the following:

    - go into IIS Mgr

    - select a website (I don't think it matters which)

    - right-click and choose Deploy...

    - Select "Configure Web Deploy Settings..."

    A dialog will open tha thas the URL for the publishing server connection.  That's what you want.

    The site name, in my example above, is what you would see for the name in IIS Admin as you noted.

    ---

    Now in your case, what you're describing with domain names should work as you have it - but I'm not sure all the paths that need to be traveled to get there - so if we can get the intranet version working, that might help narrow some things down.

     

    Friday, August 5, 2011 2:59 PM
    Moderator
  • Thanks for the reply Brian. However, if I right-click a web site in IIS management, and choose Deploy... my only options are:

    • Install application from gallery
    • Export application
    • Import application
    • Delete web site and content
    • Recycle

    I don't have an option to configure the web deploy settings. I'm using IIS7.5 on Windows Web Server 2008 R2 SP1 if it helps.

    Any ideas? Thanks again


    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/
    Sunday, August 7, 2011 11:53 AM
  • By the way, I just tried connecting to https://machine-name:8172/msdeploy.axd in a web browser (using the correct machine name of course!), and it just sat there until it timed out. I tried with http instead of https, but the same thing happened.

    Is there something I'm supposed to have done to get this to work? I installed the Lightswitch server prerequisites, including being forced to install SQL Server Express on a machine that already has the full version (much to my annoyance), so I should have everything set up.

    Thanks again


    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/
    Sunday, August 7, 2011 11:57 AM
  • Has anyone managed to get web deployment working? Anyone able to help me? Am I the only person with this error?
    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, August 10, 2011 4:56 PM
  • Mr Yossu - there's something that doesn't look right with your msdeploy configuration.  Not only are you not seeing the option to export settings, you're not able to connect to the default port for deployment (the AXD file).  I have a machine internally that exhibits the same symptoms and I'm trying to get some help debugging that.

    Can you verify the file version on msdeploy.exe for me?  You may have 2 versions installed, if you do, let me know both versions.

    ---

    Aside from that other options to try to get you up and running:

    • try deployment using a package instead of direct deployment
    • On the same server, uninstall the LS runtime and any version of WebDeploy you have installed, reinstall the LS runtime only (it will install WebDeploy 1.1 as part of it's install)

    Thanks,

    Brian

    Wednesday, August 10, 2011 5:20 PM
    Moderator
  • Hi Brian,

    I do have two versions of msdeploy.exe on my machine, or at least, two files with that name.

    They are both version 7.1.618.0, but the one in"Program File (x86)\IIS\Microsoft Web Deploy" is 141Kb, and the one in"Program Files\IIS\Microsoft Web Deploy" is 137Kb, even though both have the same file version, and the same last created/modified date and time.

    The "Program Files (x86)" folder only has these two files, plus some folders, whereas the other one has a license.rtf, two DLLs, a .config and so on.

    Any idea what this means? Thanks again.


    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, August 10, 2011 6:10 PM
  • OK, sorted that bit out. It seems I had an older version of web deploy, and it wasn't spotted when the LS stuff was installed. I just uninstalled it, and reinstalled it manually, and now I have version 2 (before I had version 1.something), which has the extra context menu option you mentioned.

    I tried deploying with this, and got further than before, but it crashed with the error...

    The "VSMSDeploy" task failed unexpectedly.
    System.ArgumentException: Version string portion was too short or too long.
       at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument)
       at System.Version.TryParseVersion(String version, VersionResult& result)
       at System.Version.Parse(String input)
       at System.Version..ctor(String version)
       at Microsoft.Web.Publishing.Tasks.Common.Utility.CheckMSDeploymentVersion()
       at Microsoft.Web.Publishing.Tasks.Common.Utility.get_IsMSDeployInstalled()
       at Microsoft.Web.Publishing.Tasks.Common.Utility.CheckMSDeploymentVersion(Task task)
       at Microsoft.Web.Publishing.Tasks.VSMSDeploy.Execute()
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
      
       File: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets
       Line: 964
       Column: 10

    The odd thing is, if I open this file, then line 964 looks like this...

    <VSMSDeploy Condition=" '$(_PublishWeb)' == 'true'"

    I don't see anything to do with a version string. Column 10 is the "V" just inside the opening tag (as there are eight spaces before the opening tag). The rest of this tag looks innocent enough as well.

    Any idea what this means and how I fix it? Thanks again.


    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, August 10, 2011 7:39 PM
  • Just to get more information about your config...

    Are you building and deploying to the same machine?  Or is your deployment target a remote machine?

     

    Wednesday, August 10, 2011 9:50 PM
    Moderator
  • I'd love to be able to help, but I only do OOB apps. Sorry.

    Yann

    (plus ça change, plus c'est la même chose!)

    Wednesday, August 10, 2011 10:00 PM
    Moderator
  • Remove msdeploy and LS server prereq.  And reinstall only LS server prereq.  It required 1.1 version that is in LS server prereqs in Web Platform Installer.  Also check my other thread on this in the beta forum.

    http://social.msdn.microsoft.com/Forums/en/lightswitchgeneral/thread/bf03639c-7e89-4e27-b601-998f7d2c5bd1

    Thursday, August 11, 2011 1:55 AM
  • @Yann.  "I'd love to be able to help, but I only do OOB apps"

    Not sure I understand. Even with OOB client, you still deploy to a server unless you are just running all your apps single user on desktop in a 1-tier.  Or am I missing something?  OOB is still a web app, just a seperate browser (a special browser).

    Thursday, August 11, 2011 1:57 AM
  • Sorry, I'm using the wrong terminology there. I tend to use desktop app, & OOB app, to mean the same thing (even though I do know it's not, lol), because that's the combination I always use. I *should* have said "I only do desktop apps". 

    The deployment process is completely different (& a lot less complicated) for *desktop* apps, which are delivered via the Click-Once mechanism, than for *web* apps. There's no "preparing a web server for deployment" etc, as the web server is on the desktop with the client (& it's all set up by LS), as opposed to a separate web server for *web* apps.

    Thanks for pointing that out. I'll have to be more careful, & differentiate more correctly, in the future.


    Yann

    (plus ça change, plus c'est la même chose!)

    Thursday, August 11, 2011 2:14 AM
    Moderator
  • So for upgrades on desktop 2-tier, does that require a walk around with a disk?
    Thursday, August 11, 2011 6:15 AM
  • No, not at all (unless you installed it off a disk, lol).

    The normal thing when inside an organisation is to put the setup files on a network share. Each time the app runs, it checks for updates from that same location.

    Outside an organisation, you can put the setup files on a web server, accessed from a  web page if you like. The app will still check itself for updates.


    Yann

    (plus ça change, plus c'est la même chose!)

    Thursday, August 11, 2011 6:26 AM
    Moderator
  • Just to get more information about your config...

    Are you building and deploying to the same machine?  Or is your deployment target a remote machine?

    Build and deploy machines are two separate machines, but on the same local network. The deploy machine is a web-facing one that holds the public web site containing the LS app.

    Hope that helps you work out what this error is. Thanks


    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, August 11, 2011 9:30 AM
  • Remove msdeploy and LS server prereq.  And reinstall only LS server prereq.  It required 1.1 version that is in LS server prereqs in Web Platform Installer.  Also check my other thread on this in the beta forum.

    As I mentioned above, I uninstalled both and reinstalled, which changed the error I was getting. When I had version 1.x it couldn't even connect to the deploy service. Once I had version 2, it could connect, and showed me the "Configure Web Deploy Settings..." that Brian mentioned, so it looks like I should have version 2. I just need to sort out this error.

    http://social.msdn.microsoft.com/Forums/en/lightswitchgeneral/thread/bf03639c-7e89-4e27-b601-998f7d2c5bd1

    Well, I had the two ASP.NET v4 lines disabled, which puzzles me as I am running several ASP.NET v4 web sites on the server. I tried enabling these two and restarting IIS, but it didn't make any difference.

    Looking at the error I'm getting, I don't think it's to do with connecting to the server, I seem to have got past that hurdle. It looks like there's some problem with the version string when it's checking everything is in place to deploy.

    Thanks for the reply, any more ideas?


    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, August 11, 2011 9:44 AM
  • Just to clarify, I tried uninstalling web deploy and reinstalling (on both dev machine and server) from the MS web site, as suggested in this thread, but it didn't make any difference.

    However, I've now noticed that I get this error when trying to deploy to a zip file as well as trying remote deployment, so I'm not sure what's going on. I could deploy to zip before, now I can't.

    I'm now really stuck! Any ideas? Thanks again.

    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, August 11, 2011 11:32 AM
  • Beth has recently updated her deployment guide, it may be worth checking that (again, no doubt)?

    Deployment Guide: How to Configure a Web Server to Host LightSwitch Applications


    Yann

    (plus ça change, plus c'est la même chose!)

    Thursday, August 11, 2011 11:37 AM
    Moderator
  • Can you email me (bmoore) and we can work on this offline a bit?  The symptoms suggest a problem with the WebDeploy 1.1 install but the resintall should fix that...
    Thursday, August 11, 2011 8:28 PM
    Moderator
  • Can you email me (bmoore) and we can work on this offline a bit?  The symptoms suggest a problem with the WebDeploy 1.1 install but the resintall should fix that...

    Garth Henderson just spent almost two and a half hours on Skype with me, and I think we have finally sorted it out.

    I need to spend some more time checking it carefully, but there are two areas that are definitely things to watch...

    1) You seem to need to have Web Deploy version 1.1 and 2.0 on bot the client and server to be able to deploy. I can't confirm this without uninstalling and reinstalling, and trying all combinations, but we didn't have any success at all until we had both versions on both machines.

    2) I strongly suspect that there is incompatibility with having a Lightswitch project in the same solution as a ASP.NET project. I already had an ASP.NET project (along with several other projects, mostly class libraries supporting the web site), and I added a Lightswitch project to that solution. This gave some odd results, like when you switch to file view and show all files, it doesn't show the Clientgenerated or Servergenerated folders at all. I don't know for definitive, but I tried a standalone LS project, using the same database and so on, and it deployed fine.

    As I said, these are only preliminary findings, and I need to check them a lot more carefully before coming to any firm conclusions, but hopefully they may help someone.

    For the record, when doing a web deploy, we used the following settings in the deploy wizard (only the important ones mentioned)...

    *) We unchecked the "IIS server has the LS deployment requisites installed" option

    *) For the publish output, we used "https://10.0.0.100/" for the service URL, which is the IP address of the server on my local network. I suspect that any IP address or domain name would work, but I didn't check this. We didn't need to add anything else to this URL.

    *) On the same tab, the site/application was "domainname.com/applicationname" where both of those names are what is shown in IIS admin. The user name and password are the Windows log in for the server.

    *) Database connections are fairly obvious. The first one was the sa log in, and the second was the lower permissions one used for general data access.

    *) On the Authentication tab, we said yes to create the app admin the first time, then said no on subsequent deploys.

    *) On Other Connections, we used the seond conn string from the database tab.

    *) We created a test certificate. Garth was adamant that we do this, even though it was a temporary one. I haven't tested what happens if you try deploying without a certificate.

    That was it! It's been a long night (now nearly 11pm), and I can't think straight enough to be sure I got all the details right. I hope to have time to go through this in more detail, but that will have to wait until after the family holiday!

    Hope this helps someone.


    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, August 11, 2011 11:17 PM
    Thursday, August 11, 2011 9:50 PM
  • Just to follow up on this one, I think I have eliminated the ASP.NET connection as a problem. I added a new Lightswitch project to the existing solution, and have been able to deploy remotely without problems.

    Hope this helps.


    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, August 11, 2011 11:17 PM
  • "I strongly suspect that there is incompatibility with having a Lightswitch project in the same solution as a ASP.NET project. I already had an ASP.NET project (along with several other projects, mostly class libraries supporting the web site), and I added a Lightswitch project to that solution"

    I think that was probably a pretty important part of the situation to have left out mentioning. Probably changes things a fair bit. And I don't know that it's "supported" at all.

    "when you switch to file view and show all files, it doesn't show the Clientgenerated or Servergenerated folders at all"

    You might need to "Show All Files" for the LS project, then they should show up.

     


    Yann

    (plus ça change, plus c'est la même chose!)

    Thursday, August 11, 2011 11:37 PM
    Moderator
  • Thanks - this does help.  I think what you're experiencing is a problem with install order and webDeploy versions.  We have a dependency on 1.1 but if 2.0 has ever been on the machine, issues can arise.  I think once you got the 1.1 and 2.0 issues worked out, you were fine there after.

    Glad you go it deployed, if you're not fine... let us know.

     

    Thursday, August 11, 2011 11:58 PM
    Moderator
  • Yeah well, I spoke too soon :-(

    It was working fine, except that when I ran the app for real (e from the shortcut, not from VS), it didn't ask for a user name or password, it just went straight to the data screens.

    Whilst trying to get that to work, it broke, and now when I try to do a web deploy, I get an error...

    Description: The password-answer supplied is invalid.
    File: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets
    Line: 1128
    Col: 10

    It looks like this is to do with creating the admin user when the app is deployed, but I can't see a way around it. All the pages I could find on the web that mentioned this error were to do with people creating membership users manually. They suggested modifying the web.config to turn off question/answer. That's not relevant here, as we don't have control over the web.config file.

    The aspnet* tables in the database are all empty, and I have no idea how to fill them manually.

    I tried deploying via a disk file, but when I tried to run it, I just got a plain white screen, no menus, no data, nothing.

    Anyone any ideas? I'm all out of them. The infuriating thing is that it was working, albeit without authentication. Now I can't deploy at all.


    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/
    Friday, August 12, 2011 1:06 AM
  • I thought I had ruled out the possibility, as deploying was going fine. I'm still not convinced that this is the problem, as I tried copying the LS project out into its own solution, and it had the same deployment issues.

    I didn't mention it before as it never occurred to me that it was relevant. I usually have several projects in one solution, often of mixed type, and I never suspected that LS woudln't be happy with that. Multiple solutions is a very common way to work, so if it's not supported, I would have expected someone to mention it. It's a pretty serious limitation if it's true.

    By the way, I did show all files, and it still didn't show those folders.


    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/
    Friday, August 12, 2011 1:10 AM
  • I'm not saying that it actually was your problem, simply that it *might* have made a difference. It pays to give people, particularly MS team members (who are trying to repro the scenario), as much information as possible, especially when it's something "out of the ordinary". Yes, multiple projects is common in many solutions, but not in LS (apart from RIA Services & Class libraries). Having an ASP.NET project in the same solution as an LS project is quite possibly a scenario that wasn't even *considered* by the team, let alone tested. An LS project is a "special" project that does many things it's *own* way. But I would imagine that two "web" applications, in the same project, may not want to "play nicely" with each other. Of course, not being a web developer, I may be totally wrong & this may be a normal thing to do in web applications.

    I remember Steve Hoag saying in a post not that long ago that ir wasn't supported scenario to have an ASP.NET project in the same solution as an LS project. YMMV


    Yann

    (plus ça change, plus c'est la même chose!)

    Friday, August 12, 2011 2:56 AM
    Moderator
  • Have you tried using the SecurityAdmin tool?

    Yann

    (plus ça change, plus c'est la même chose!)

    Friday, August 12, 2011 3:01 AM
    Moderator
  • Have you tried using the SecurityAdmin tool?

    Yes, I tried that and got the same error "The password-answer supplied is invalid"

    This implies to me that the problme is nothing to do with having the LS project in the same solution as an ASP.NET web site, although I could be wrong. The deployment itself seems to go OK, it's creating the admin user that causes the error. You can see that from the fact that I get the error when I run this tool, which knows nothign about VS or the way a solution is organised.

    Thanks for the reply. I would be grateful for nay other suggestions


    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/
    Friday, August 12, 2011 8:18 AM
  • I'm not saying that it actually was your problem, simply that it *might* have made a difference. It pays to give people, particularly MS team members (who are trying to repro the scenario), as much information as possible, especially when it's something "out of the ordinary".

    Ah, there's the point. It never occurred to me that this was out of the ordinary. To me, having multiple project types in one solution is perfectly normal, and I never assumed there was any reason to mention it. It seems this is a significant point with LS, whereas it's totally irrelevant with other project types.

    Not being facetious, but it never occurred to me to tell you what version of Microsoft Office I have installed, as it's something that I assumed was nothing to do with the issue.

    One of the problems of this sort of forum is that we are all always working in the dark! I tried to give as much info as I could, without clogging up the post with irrelevancies. Seems I was under the wrong impression about this one.

    Yes, multiple projects is common in many solutions, but not in LS (apart from RIA Services & Class libraries). Having an ASP.NET project in the same solution as an LS project is quite possibly a scenario that wasn't even *considered* by the team, let alone tested. An LS project is a "special" project that does many things it's *own* way.

    OK, that's something I'm beginning to understand. What I don't understand is why that's the case.

    More to the point, if this is such an issue, it ought to be made a lot more clear. Multiple project solutions is a very common way to work, so if this is a problem with LS, it should be made known.

    But I would imagine that two "web" applications, in the same project, may not want to "play nicely" with each other. Of course, not being a web developer, I may be totally wrong & this may be a normal thing to do in web applications.

    Perfectly normal, I do it all the time! This is yet another reason why it never occurred to me that it was worth mentioning.

    I remember Steve Hoag saying in a post not that long ago that ir wasn't supported scenario to have an ASP.NET project in the same solution as an LS project. YMMV

    Never saw that post. Do you have a link to it? I would like to read more about this.

    Thanks again Yann. It looks like I am going to have to try rebuilding this Ls in its own solution, although I still have a suspicion that this isn't the issue here. The problem only seems to come when trying to create the admin user, and that is nothing to do with VS or its solution structure. It happens with the SecurityAdmin tool as well.


    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/
    Friday, August 12, 2011 8:29 AM
  • Yes, I can understand why you were thinking that way.

    I don't have a link to the post, sorry, I just remember the comment. Maybe Steve will know where to find it, or comment again here.


    Yann

    (plus ça change, plus c'est la même chose!)

    Friday, August 12, 2011 9:26 AM
    Moderator
  • No problem, I'm going to try deleting everything from the server, then redoing the application in a new stand-alone project and seeing if that works.

    Thanks again Yann. Now go and get on with your book, I don't know about anyone else, but I need it publishing soon!


    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/
    Friday, August 12, 2011 9:35 AM
  • I think that was probably a pretty important part of the situation to have left out mentioning. Probably changes things a fair bit. And I don't know that it's "supported" at all.

    Well, I think I have eliminated this as part of the problem.

    I deleted all the files from the LS application folder on the server, and deleted all the aspnet* tables from the database. This left me with a database as it was before LS touched it, and an empty web application folder.

    I then created a brand new LS project, in a solution of its own, and connected to my database. I added one screen, and checked that it worked in debug.

    I then deployed this as a desktop app. The deploy seemed to go OK, and the aspnet* tables were created, including an entry in the aspnet_Users table for the admin user I specified.

    However, when I tried to install and then run the app, I just got the same blank white window as before. No log-in form, nothing.

    I tried again, this time doing it as a web app, and when the page loaded, it popped up a message box with an error "Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound"

    So, it seems like the problem is nothing to do with the LS project being in the same solution as the ASP.NET project. However, that doesn't answer the question of exactly what the problem is.

    Any ideas? Thanks again.


    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/
    Friday, August 12, 2011 10:00 AM
  • Thanks - this does help.  I think what you're experiencing is a problem with install order and webDeploy versions.  We have a dependency on 1.1 but if 2.0 has ever been on the machine, issues can arise.  I think once you got the 1.1 and 2.0 issues worked out, you were fine there after.

    Glad you go it deployed, if you're not fine... let us know.

     


    I have 3 servers running with both 1.1 and 2.0 installed and absolutely no problems.

    Alan (Mr. Yossu) is in the UK and I'm in Hawaii . . . so it is difficult for us to work together.  Someone on the US east coast or in Europe would be better to assist Alan in tracking this problem down.

    I think that the community has an opportunity to work through Alan's problems in order to better document what is required to successfully deploy an LS app in a REAL WORLD situation.   For LS to work well for non-programmers (the primary MS revenue market for LS), it is going to take the support of networking and IIS specialists.  Just like non-programmers using LS are going to have to rely heavily on DBAs with top biz application level skills.  Of course, we LOB developers really want the non-programmers to be as successful as they can . . . so that they can pay us to migrate their hacked prototypes to a professional level that a business can rely on.

    Friday, August 12, 2011 8:04 PM
  • @Yossu: 

    RE:  The aspnet* tables in the database are all empty, and I have no idea how to fill them manually.

    This is the purpose of:

    "C:\Program Files (x86)\Microsoft Visual Studio 10.0\LightSwitch\1.0\Tools\Microsoft.LightSwitch.SecurityAdmin.exe"

    The question that we have is if SecurityAdmin.exe can run remotely on a server as servers will not have VS installed.

    Friday, August 12, 2011 8:08 PM
  • @Yossu:

    • However, when I tried to install and then run the app, I just got the same blank white window as before. No log-in form, nothing.

    Did you check the web site and application authentication settings in IIS?   Is your web.config setup with the correct connect info?  Are the aspnet tables populated correctly for the application?

    Note for community:  Has anyone had any problems in deploying LS (with MSDeploy) to sites other than "Default Web Site" and/or using other than 80 as the Site Bindings port?

    Also, it should be noted that Yossu is using IIS 7.0 - which should be OK.   I am using 7.5. 

     

    Friday, August 12, 2011 8:30 PM
  • For LS to work well for non-programmers (the primary MS revenue market for LS), it is going to take the support of networking and IIS specialists.

    Whilst I agree with your sentiments, it's worth pointing out that I am a professional programmer with over 30 years' experience. I dread to think what sorts of problems a non-programmer would have.

    I have less problems with a system that allows you more configuration options, but LS was obviously designed t make life as easy as possible, so doesn't give you much in the way of config. That's fine when it all works, but in cases like mine, it means you're stuck, because you can't change any settings.


    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/
    Sunday, August 14, 2011 9:00 AM
  • @Yossu:

    • However, when I tried to install and then run the app, I just got the same blank white window as before. No log-in form, nothing.

    Did you check the web site and application authentication settings in IIS?   Is your web.config setup with the correct connect info?  Are the aspnet tables populated correctly for the application?

    Checked settings in IIS. I fact you went through them with me, and I haven't changed them since.

    web.config has the right info, and as far as I can see, the aspnet* tables have the right info. It's hard to know exactly, as I don't know what's supposed to be in there, but there are entries in all the obvious looking aspnet_* tables, and the info seems to match up.

    Note for community:  Has anyone had any problems in deploying LS (with MSDeploy) to sites other than "Default Web Site" and/or using other than 80 as the Site Bindings port?

    I'm not sure this is the problem Garth. We deployed to a non-default site, and that worked. The problem seems to be authentication, and the way LS sets it up. The basic deployment went OK. The problem I reported earlier ("The password-answer supplied is invalid") was nothing to do with deployment, as I got the same error when trying to use the command-line tool.

    Also, it should be noted that Yossu is using IIS 7.0 - which should be OK.   I am using 7.5. 

    Actually, I'm trying to deploy to windows server 2008 r2, which as far as I know has IIS 7.5, not 7.0

    Thanks again to everyone, and especially Garth for all the help


    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/
    Sunday, August 14, 2011 9:10 AM
  • @Yossu - are you still seeing this?

    Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound

    That can be caused by auth settings on the virtual app (or parent) - if you've enabled forms or windows auth, you also need to disable basic/digest, etc.  IOW have only Anonymous and Forms enabled.  If you're not deploying via the LS prereqs you have to configure it manually.

    Or if you're past that, let me know where you're at...

     

     

    • Marked as answer by Mr Yossu Monday, August 29, 2011 11:22 AM
    Tuesday, August 16, 2011 9:59 PM
    Moderator
  • @Yossu - are you still seeing this?

    Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound

    That can be caused by auth settings on the virtual app (or parent) - if you've enabled forms or windows auth, you also need to disable basic/digest, etc.  IOW have only Anonymous and Forms enabled.  If you're not deploying via the LS prereqs you have to configure it manually.

    Or if you're past that, let me know where you're at...

    Hi Brian,

    Sorry for the delay in replying, I've only just come back from two weeks away!

    Anyway, I am still getting this error if I configure the app to run in a browser and browse to it from a remote machine. If I configure it to run as an OOB app, I just get the window, with nothing inside it. No errors, but no log in screen.

    If I follow the tips on this blog entry, then when I load it, I get an error...

    "Load operation failed for query 'GetAuthenticaionInfo'. [HttpWebRequest_WebException_RemoteServer]

    Arguments: NotFound

    Debugging resource strings are unavialble. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60531.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer"

    Following the link leads to a dead page.

    If I then load the Trace,axd URL as suggested in the blog entry, I get the following (snipping out the number, time and "view details" links)...

    No.    Time of Request    File    Status Code    Verb     
    /Trace.axd    403    GET
    /    200    GET
    /    200    GET
    /    200    GET
    /Silverlight.js    304    GET
    /Web/JBD_WebSite_Admin.Client.xap    200    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    500    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    200    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    200    GET
    /Web/JBD_WebSite_Admin.Client.xap    200    GET
    /    200    GET
    /    200    GET
    /    200    GET
    /Silverlight.js    304    GET
    /Web/JBD_WebSite_Admin.Client.xap    200    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    500    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    200    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    200    GET
    /Trace.axd    403    GET
    /    304    GET
    /    200    GET
    /    200    GET
    /Web/JBD_WebSite_Admin.Client.xap    304    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    500    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    200    GET
    /Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo    200    GET

    Now, as far as I understand, a 403 error means forbidden, which looks odd for the first entry in that list. Clicking on the details link doesn't show anything interesting though.

    The next odd one is the first GetAuthenticationInfo entry, which gives a return code of 500, which is an error. Clicking that details link doesn't give anything that looks out of the ordinary, or very useful for debugging! The request details are as expected, the next six sections are all empty, as are the form and querystring collections. The headers section looks like this...

    Connection    keep-alive
    Keep-Alive    115
    Content-Length    0
    Accept    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Charset    ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Accept-Encoding    gzip,deflate
    Accept-Language    en-gb,en;q=0.5
    Host    localhost
    User-Agent    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15

    The server variables section looks pretty innocent as well, but here it is in case you can see some clue...

    ALL_HTTP    HTTP_CONNECTION:keep-alive HTTP_KEEP_ALIVE:115 HTTP_CONTENT_LENGTH:0 HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_CHARSET:ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP_ACCEPT_ENCODING:gzip,deflate HTTP_ACCEPT_LANGUAGE:en-gb,en;q=0.5 HTTP_HOST:localhost HTTP_USER_AGENT:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
    ALL_RAW    Connection: keep-alive Keep-Alive: 115 Content-Length: 0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Encoding: gzip,deflate Accept-Language: en-gb,en;q=0.5 Host: localhost User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
    APPL_MD_PATH    /LM/W3SVC/16/ROOT/JBDAdmin
    APPL_PHYSICAL_PATH    C:\WebFolders\mydomain.com\JBDAdmin\
    AUTH_TYPE     
    AUTH_USER     
    AUTH_PASSWORD     
    LOGON_USER     
    REMOTE_USER     
    CERT_COOKIE     
    CERT_FLAGS     
    CERT_ISSUER     
    CERT_KEYSIZE     
    CERT_SECRETKEYSIZE     
    CERT_SERIALNUMBER     
    CERT_SERVER_ISSUER     
    CERT_SERVER_SUBJECT     
    CERT_SUBJECT     
    CONTENT_LENGTH    0
    CONTENT_TYPE     
    GATEWAY_INTERFACE    CGI/1.1
    HTTPS    off
    HTTPS_KEYSIZE     
    HTTPS_SECRETKEYSIZE     
    HTTPS_SERVER_ISSUER     
    HTTPS_SERVER_SUBJECT     
    INSTANCE_ID    16
    INSTANCE_META_PATH    /LM/W3SVC/16
    LOCAL_ADDR    ::1
    PATH_INFO    /JBDAdmin/Services/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo
    PATH_TRANSLATED    C:\WebFolders\mydomain.com\JBDAdmin\Services\Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc
    QUERY_STRING     
    REMOTE_ADDR    ::1
    REMOTE_HOST    ::1
    REMOTE_PORT    56611
    REQUEST_METHOD    GET
    SCRIPT_NAME    /JBDAdmin/Services/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc
    SERVER_NAME    localhost
    SERVER_PORT    80
    SERVER_PORT_SECURE    0
    SERVER_PROTOCOL    HTTP/1.1
    SERVER_SOFTWARE    Microsoft-IIS/7.5
    URL    /JBDAdmin/Services/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc
    HTTP_CONNECTION    keep-alive
    HTTP_KEEP_ALIVE    115
    HTTP_CONTENT_LENGTH    0
    HTTP_ACCEPT    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    HTTP_ACCEPT_CHARSET    ISO-8859-1,utf-8;q=0.7,*;q=0.7
    HTTP_ACCEPT_ENCODING    gzip,deflate
    HTTP_ACCEPT_LANGUAGE    en-gb,en;q=0.5
    HTTP_HOST    localhost
    HTTP_USER_AGENT    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15

    So, I can't see any obvious error here. Any ideas? Thanks


    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/
    Monday, August 29, 2011 10:23 AM
  • Should have added on that the main web site has anonymous authentication enabled, and the other three disabled, and the application (which is a folder off the root of the main web site) has anonymous, forms and Windows enabled, and ASP.NET impersonation disabled.

    Don't know if this is relevant, but thought I better mention it in case.


    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/
    Monday, August 29, 2011 10:48 AM
  • IOW have only Anonymous and Forms enabled.

    Duh, slaps self on head with wet fish!

    Just re-read this, and realised that you already answered my point about authentication. I turned off Windows auth and it works fine now!

    Thanks very much. I'm still not confident that this is all going to work, but I'm going to rebuild what I had before, and see if I can deploy successfully at each stage. I'll let you know how I get on.

    Thanks again.


    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/
    Monday, August 29, 2011 11:22 AM
  • Duh, slaps self on head with wet fish!


    Thanks for the update (and the wet fish visualizaiton).  Do let us know where you land.
    Monday, August 29, 2011 2:40 PM
    Moderator
  • Well, so far so good. I have been at it all afternoon, and have deployed several times, and all seems to be working fine.

    Been a nightmare ride, but it looks like I might finally be sorted - at least for this project! I dread to think what might happen next time!

    Thanks to everyone for all the great help.


    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/
    Monday, August 29, 2011 3:24 PM
  • FWIW - we're finding that the initial setup (of the target server) is the hardest - esp if you've used IIS on the box for a while.  Once you have it configured correctly it's pretty consistent.

     

    Again, thanks for closing the loop with us.

    Monday, August 29, 2011 3:35 PM
    Moderator