Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 5th, 2012, 12:16 AM
Authorized User
Points: 400, Level: 6
Points: 400, Level: 6 Points: 400, Level: 6 Points: 400, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default Deployment

Hi Imar,

After deploying my website correctly, everthing was working fine except that when I get the site from the localhost (production one) and filling the contact form, the "send" button became disabled and when I click nothing happens. I then went back to VWD and made some changes and decided to repeat the process of deployment. When I clicked Connect and get the File System, I found many names of my website with different versions such as (.sln (2) & .sln (3)). When I finished, I discovered that the web.config file has changed to an old version. Don't understand or know what happened!

I know I stuffed it up but I wish to start from scratch by removing all these versions .sln(x), and start as it is the first time.

Please explain how to do this and how to make the "Send" button works?

Thanks
Khalil
Reply With Quote
  #2 (permalink)  
Old February 5th, 2012, 05:10 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

SLN files are not critical to web site projects. You can simply delete all of them. Then in Visual Studio, choose File | Open Web Site and browse to the main folder that contains your site.

To find out what the problem is with the Contact Form, temporarily remove the UpdatePanel and its ContentTemplate. This should give you an error page describing the real problem (if there's a server side error, that is).

Why you have multiple, or old web.config files, I don't know. Maybe you mixed up various versions of the site in various folder? Or working of a backup copy? Can't really tell.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old February 6th, 2012, 05:11 AM
Authorized User
Points: 400, Level: 6
Points: 400, Level: 6 Points: 400, Level: 6 Points: 400, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default Deployment

Imar,

I made some changes but unable to test the result. When I open the website from localhost I get this error:
Parser Error message: "The file '/MasterPages/Elegant.master' does not exist."

I repeated everything including security but nothing is working.

Regards
Khalil
Reply With Quote
  #4 (permalink)  
Old February 6th, 2012, 05:19 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Sounds like a misconfiguration in IIS. Can you provide the following info:

1. The full address you see in the browser's address bar.

2. The markup for the page that causes this error.

3. How you configured IIS (e.g. a new site, or a new sub application / sub folder to an existing site such as the Default Web Site)

4. The physical structure on disk for your site. E.g. where the main folder is located that you mapped to IIS, and where relative to that folder the MasterPages folder is located.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #5 (permalink)  
Old February 6th, 2012, 07:27 AM
Authorized User
Points: 400, Level: 6
Points: 400, Level: 6 Points: 400, Level: 6 Points: 400, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default Deployment

Imar,

Here is the information, which I hope is what you want:

1. Address: http://localhost/

Parser Error Message: The file '/MasterPages/Elegant.master' does not exist.

Source Error:


Line 1: <%@ Page Title="Welcome to Elegance Accounting" Language="VB" MasterPageFile="~/MasterPages/Elegant.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Line 2:
Line 3: <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
Source File: /default.aspx Line: 1
2. the markup code is:
Code:
<%@ Page Title="Welcome to Elegance Accounting" Language="VB" MasterPageFile="~/MasterPages/Elegant.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  <style type="text/css">
    .style1
    {
      width: 100%;
    }
    .style2
    {
      width: 216px;
    }
    .style3
    {
      width: 560px;
    }
    .style4
    {
      width: 216px;
      height: 25px;
    }
    .style5
    {
      width: 560px;
      height: 25px;
    }
    
  </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
  <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/RelaxedMan.jpg"
  style="Width: 9cm; height:9cm; float: right; position: relative; clear: right;"/>

</asp:Content>


<asp:Content ID="Content3" runat="server" 
  contentplaceholderid="ContentPlaceHolder1">
  <table cellpadding="0" cellspacing="0" class="style1" 
    style="font-family: Garamond; font-size: 14px; ">
    <tr style="font-family: Garamond; font-size: 16px; font-weight: bold; text-decoration: underline; color: #FFFF00">
      <td class="style4">
        Useful Links</td>
      <td class="style5">
        Services</td>
    </tr>
    <tr>
      <td class="style2">
        <a href="Excel/TaxFacts.htm" style="color: #000000">Tax Facts</a></td>
      <td class="style3">
        Bookkeeping</td>
    </tr>
    <tr>
      <td class="style2">
        <a href="Excel/Loan%20Calculator.xls" style="color: #000000">Loan Calculator</a></td>
      <td class="style3">
        Payroll</td>
    </tr>
    <tr>
      <td class="style2">
        <a href="http://www.ato.gov.au/" style="color: #000000">Australian Taxation Office</a></td>
      <td class="style3">
        Financial Reporting</td>
    </tr>
    <tr>
      <td class="style2">
        <a href="http://www.sro.vic.gov.au/sro/SROnav.nsf/alltitle/PTX%20Express?open" style="color: #000000">State Revenue Office</a></td>
      <td class="style3">
        Excel Automation</td>
    </tr>
    <tr>
      <td class="style2">
        &nbsp;</td>
      <td class="style3">
        BAS</td>
    </tr>
    <tr>
      <td class="style2">
        &nbsp;</td>
      <td class="style3">
        Income Tax Returns (all types)</td>
    </tr>
    <tr>
      <td class="style2">
        &nbsp;</td>
      <td class="style3">
        Company Set-up</td>
    </tr>
  </table>

  <div id="Sidebar"><a href="About/Contact.aspx" style="color: #FFFF00">Contact Us</a></div>

  <div id="Sidebar3">Testimonials</div>
  
  <div id='Testimonials' style="text-align: justify">Elegance Accounting provided my company fast, reliable and trustworthy services for many years.
  It fits seamlessly into our team and has delivered significant business benefits to PharmOut.
  As PharmOut has grown into the Asia Pacific region and established companies and offices in South Africa, Singapore, Hong Kong, Elegance Accounting
  has advised on country specific accounting practices, tax arrangements and advised on best business models. It was the solid performance in supporting the Australian operations which has yielded the biggest benefit.
  <br /><br />
  <strong style="color: #FFFF00">Trevor Schoerie, Director<br />
  PharmOut Pty Ltd</strong></div>
  
  <div id ='Testimonials2' style="text-align: justify">Elegance Accounting is a great asset to my business. It keeps the company's financial affairs in order and chases me for the 
  information it needs to deliver great results (let's face it, I'd rather be doing something else!). It is the ideal accounting
  firm for a small business like mine.
  <br /><br />
  <strong style="color: #FFFF00">Michelle Archard, Director<br />
  CommOut Pty Ltd</strong></div>
  
  <div id='Testimonials3' style="text-align: justify">Elegance Accounting has helped me established my franchise business. It set up my company formation, and maintained all the company 
  records since its inception. It also processes the payroll every week, and does the BAS and income tax return. The tax advice and 
  compliance was great benefit for someone like me who has limited knowledge about those issues.
  <br /><br />
  <strong style="color: #FFFF00">Rania El Khoury, Director<br />
  Aequitas Retail Pty Ltd</strong></div>
  
  <script type="text/javascript">
    $('#Sidebar3').mouseover(function ()
    {
      $('#Testimonials').show().delay(15000).fadeOut(5000, function()
      {
        $('#Testimonials2').show().delay(15000).fadeOut(5000, function()
        {
          $('#Testimonials3').show().delay(15000).fadeOut(5000)
        });
      });
    });
   
  </script>

  </asp:Content>
3. I just followed the instructions exactly as it is in the book. I guess it is the same site that I did the first time.
4. Structure
C:\BusinessASPNET\EleganceAcctng\Release. I am not sure about the location of the masterpage.


Thanks
Khalil
Reply With Quote
  #6 (permalink)  
Old February 6th, 2012, 04:26 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

1) Looks good

2) Looks good too

3) The book deals with various OS's and setups. Which one did you choose? Which version of Windows did you use? Did you *change* the main web site? (Looks like it, since you browse to it as local host)

4) >> I am not sure about the location of the masterpage.
That would be easy to check. Is there a folder called MasterPages with a file called Elegant.Master in the folder C:\BusinessASPNET\EleganceAcctng\Release

Finally, make sure you set the root correctly. Locate the site in IIS, right-click it and choose Manage Site | Advanced settings (assuming you're using Windows 7). Is the root folder pointing to C:\BusinessASPNET\EleganceAcctng\Release?

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #7 (permalink)  
Old February 7th, 2012, 07:03 AM
Authorized User
Points: 400, Level: 6
Points: 400, Level: 6 Points: 400, Level: 6 Points: 400, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default Deployment

Hi Imar,

In relation to point 3, I am using Window7 Home Premium, and I have not changed the main website at all.

Point 4. I discovered something very strange thanks to you. All the sub-folders in the Release folder are empty and not only the masterpage. This is a puzzle since I have copied the website several times. The last time I copied the website from the Source to the Remote, I had several prompts asking whether to use the source or remote, delete the source or the remote. Also, the prompt was in great details. For example, within each sub-folder such the default.aspx the prompt asks whether I want to copy Ajax, CSS, script, etc. After all this all the folders are empty, and of course I had the same issue/problem. Is it possible to copy and paste manually to the remote without using VWD? Please advise.

Obviously developing a website is not an easy task.This is not a surprise but I did not expect it to be so complicated.

Thank you

Last edited by Khalil; February 7th, 2012 at 07:06 AM..
Reply With Quote
  #8 (permalink)  
Old February 7th, 2012, 07:26 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Yes, you can simply copy all files from the Site folder and paste them in the Release folder. Then, if needed, manually update the web.config file and you should be good to go.

You can use the Copy Web Site Option as described on page 707 to do this from within Visual Studio.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #9 (permalink)  
Old February 8th, 2012, 05:49 AM
Authorized User
Points: 400, Level: 6
Points: 400, Level: 6 Points: 400, Level: 6 Points: 400, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default Deployment

Hi Imar,

I copied and pasted all the folder manually and it is working perfectly, but could not understand why copying from within Visual Studio did not work.

Thank you very much for all your help. Reading and learning from your book was good experience I enjoyed very much.

Regards
Khalil
Reply With Quote
  #10 (permalink)  
Old February 8th, 2012, 06:06 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
I copied and pasted all the folder manually and it is working perfectly
Good to hear.

Quote:
but could not understand why copying from within Visual Studio did not work.
Neither can I. Could be a bug in Visual Studio or maybe you switch the left and right sides of the sync operation?

Quote:
Thank you very much for all your help. Reading and learning from your book was good experience I enjoyed very much
You're welcome. Good to hear you like the book so much.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
deployment Bhavin Crystal Reports 1 February 5th, 2009 08:07 AM
deployment p2pMember ASP.NET 2.0 Basics 0 June 7th, 2007 01:12 AM
Deployment sen22 .NET Framework 2.0 1 April 17th, 2007 02:38 PM
Deployment regbnvl BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 May 7th, 2006 04:44 PM
Deployment Bhavin Crystal Reports 2 October 25th, 2004 08:28 AM



All times are GMT -4. The time now is 05:18 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.