Simple Web Site results in error when copied to DiscountASP site

Discussion in 'General troubleshooting' started by KeithWaters, Oct 7, 2015.

  1. Hi,

    I am using Visual Studio Express 2013. I created a *very* simple web site with 1 web form (with master) in the root (default.aspx) and one masterpage in a sub folder (MasterPages). I did not add anything to this code and the Default page renders without incident on my computer when I start it with "View in Browser" within VS 2013.

    I downloaded the Web Deploy Publish Settings file from my Control Page to my computer as per Knowledge Base article a1286. I fed the profile file into the Publish Web Site option in VS 2013 using the FTP option. The files seemed to copy okay but I got this when I ran the page on the DiscountASP site:

    Cannot find ContentPlaceHolder 'ContentPlaceHolder1' in the master page '/Masterpages/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.

    As I mentioned above the web site / page does nothing. Any ideas?

    Thanks
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    It means the markup is missing in your master page, or your code is not referencing it properly. Did you upload the assemblies as well?
     
    mjp likes this.
  3. Ray, not sure what you mean when you say the markup is missing. This is VS 2013 generated code... I didn't add or remove anything. Also I'm not sure what you mean by assemblies. I've got 2 other sites working on DiscountASP and have never had to upload assemblies. I usually use FTP to copy my sites to the server but this error kept popping up so I created this simple example and tried the Publish Web (with FTP) method to upload it.

    The code (default.aspx) is referencing the content name correctly. I've uploaded the code for both the Form and the Masterpage for review if required.
     

    Attached Files:

  4. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    I meant this is missing:

    which I see is not. And for most sites, you should have uploaded a /bin folder which contains the assemblies your site needs to run. You might want to try recompiling your application and re-uploading it.
     
    mjp likes this.
  5. Problem solved!

    Ray, thanks for making me exercise my brain. I forgot to install the "Application" with the "Web Application Tool" page from the "Control Page" which of course adds all the /bin assemblies to the folder where the site is running.
     
    mjp and RayH like this.

Share This Page