3

I am using IIS 8.5 on a 2012 Server, with Visual Studio and SQL Server on the same machine.

I have built and published one Lightswitch HTML Client, and it is working fine from web browsers. It is an internal application and is accessible/working on domain computers at http://servername/htmlclient. This is the default location where Lightswitch publishes the HTML content.

I have also built a second LS HTML project. It is completely separate but uses the same SQL data source. I cannot seem to successfully publish this project to the web, at all. I am honestly not sure if it is a Visual Studio/Lightswitch issue, an IIS issue... I am kind of lost as to why it doesn't 'just work', like the first application I published. Even given the error I am seeing when I try to publish, I am not sure how to fix the issue.

It appears to be a problem with generating a web.config file for the new project, or maybe something to do with both projects using the same data source. This is the error I get when trying to view the content of the second project in a web browser...

Error page

CreedC
  • 69
  • 6
  • Are you using Web Deploy? Are you publishing to the same WebServer? Are you publishing it in a different folder/application/apppool etc? What was the error you received? – Kris Dec 16 '15 at 03:28
  • From the error message, it seems you have duplicate 'add' elements with the same 'name' attribute in web.config file. Can you check that? – AbdiasM Dec 16 '15 at 04:13
  • Screen-shots of the publish settings you're using for both projects may help diagnose the issue. Also, are you able to successfully publish separate projects using different data sources? – Chris Cook Jan 02 '16 at 01:47
  • Everyone: I sincerely apologize for not seeing these replies and responding. I appreciate all of your efforts, sincerely. I was away from the project for a while, and now I am back on it, but I rebuilt the project so that I only need one web location. Thank you all. – CreedC Jan 08 '16 at 20:31

2 Answers2

1

Hopefully this will help, if not let me know:

during the publish window check these details:

Publish Settings - the website name is different to the original

Security Settings - HTTPS - make sure this is set as no HTTPS unless you have a valid digital signature

Data Connections - Data Connections - check this is set to "Update to Existing Database" and NOT "Generate a new database called". This is most likely going to be the cause as by default it is set to the latter.

Data Connections - Attached Data Sources - check this isnt blank

if all these details are correct let me know and ill try to create this issue myself again

Crezzer7
  • 2,265
  • 6
  • 32
  • 63
0

What I did to get around this was put the new site on port 8080. Simple oversight as I learn, but apparently the error was to do with that.

CreedC
  • 69
  • 6