Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 23rd, 2013, 03:30 PM
Registered User
 
Join Date: Nov 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Cool Works in IIS but wont work at host

I used the ASP.NET book as a guide to redo my website using VS 2010 Express. I originally built my website with Visual Studio 2005 but when I upgraded to WIN 8 I couldn't install that software. Building my site using the book was easy and after several hiccups I got it to run in IIS with the webpages all in the "Release" folder in inetpub/wwwroot. I moved the Release folder to my hosting service's (Brinkster) wwwroot folder. When I put my website's url in internet explorer I get errors (first security, then log in required). I then just put all the files from the Release folder directly in the wwwroot folder and got the same result. My start page is default.aspx. It is a very simple website, the default page just gives hyperlinks to go to one or the other of two pages. The only files I have are the default.aspx, the xyz.aspx for the other two pages, the xxx.aspx.vb codebehind files and the webconfig file. Since it runs in IIS, why wont it run at my host? Is it the webconfig file? Or is something missing from my site?
 
Old November 23rd, 2013, 03:31 PM
Registered User
 
Join Date: Nov 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No code included in post
 
Old November 24th, 2013, 03:21 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

HI there,

Has your host been set up to run the correct version of ASP.NET in IIS? Maybe it's still on 2.0? Which errors are you getting exactly?

>> No code included in post

Not sure what that means.

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!
 
Old November 24th, 2013, 08:38 AM
Registered User
 
Join Date: Nov 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default The error I get is a Parser Error

Parser Error Message: Could not load type '_Default'.

Line 1 is the highlighted line in the error message:
....
Line 1: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: C:\Sites\Single10\bfboyce\webroot\default.aspx Line: 1
________________________________________
Version Information: Microsoft .NET Framework Version:1.1.4322.2502; ASP.NET Version:1.1.4322.2494
....

My site only includes three pages - default.aspx, and two other xxx.aspx pages that are hyperlinked to from default and a webconfig file.
 
Old November 26th, 2013, 03:36 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look at the error message: it looks like the server is configured to run ASP.NET 1.1, while you need at least ASP.NET 2 or maybe even ASP.NET 4. You can configure this at the IIS level. Chapter 19 has more details.

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!
 
Old November 26th, 2013, 06:12 PM
Registered User
 
Join Date: Nov 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy

Imar: Thanks for your help. I could be out in left field on this project. First of all I'm using VWD 2010 Express and I have Windows 8 so some of the steps in your book for WIN 7 don't quite match up. I've also got an "inetpub" folder which I assume is the IIS system. I put my "Release" folder in the webroot folder at inetpub and the site runs fine but I cant be sure I've done all the right setup steps. My webconfig has very little in it:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
</system.web>
</configuration>
That's it. Shouldn't there be more? I would think that any issues with moving the site to my host could be resolved by changing the webconfig file.
 
Old November 26th, 2013, 10:21 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

>> Shouldn't there be more?

There should be more. You also need to tell IIS which version of the .NET Framework to use. Yours seems to be using ASP.NET 1.1 so you may need to install a later version on the server and tell IIS to use that version. Google should bring up some useful information on how to do that on your particular version of IIS.

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!
 
Old December 7th, 2013, 07:27 PM
Registered User
 
Join Date: Nov 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Problem Solved

Imar:
All I had to do was get a host that used .net 4.0. I ended up switching hosts for my website since the one I had already required me to upgrade my account and it was more economical to switch. Now I simply upload my build files to the host's "root" and it runs just as nice as can be.
Thanks for your book and your help.
Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Adodc connections variable wont work, need help honam00000 VB How-To 1 December 10th, 2006 11:21 AM
aspx site works local, but not on FTP host(?) zuz29 ASP.NET 1.0 and 1.1 Basics 1 June 2nd, 2006 08:27 AM
JetComp Wont Work .....HELP!! timmaher Access VBA 3 August 25th, 2005 01:38 AM
Query wont work unless I copy and past into new on Mitch Access 1 March 4th, 2005 02:22 AM





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