Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 May 23rd, 2006, 12:04 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Then you should diable "Directory browsing". It's that feature that displays the sub folders and files, instead of serving up the default document.

Once you disabled that feature, make sure that Default.aspx is listed on the Documents tab as a default document.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 23rd, 2006, 04:00 PM
Registered User
 
Join Date: May 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to stoneygossard
Default

Imar,

I really appreciate this help. I have made progress again but am getting another kind of error.

OK I have disabled "directory browsing" and also added "Default.aspx" to the document folder and when I run it in IIS i get the following:(bye the way, i get a coloured background!)


XML Parsing Error: not well-formed
Location: http://localhost/WroxUnited/
Line Number 1, Column 2:<%@ Page Language="VB" Trace="false" MasterPageFile="~/site.master" AutoEventWireup="false" codefile="Default.aspx.vb" Inherits="_Default" %>
-^


Any ideas?

Stone

Stoney
 
Old May 23rd, 2006, 04:30 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Are you sure IIS is set up for .NET 2 correctly? What version number os listed on the colored error page?

Try this if you think ASP.NET is not configured correctly (for example, you installed IIS after .NET 2):

1. Run aspnet_regiis -i from the framework folder (under the Windows folder; make sure you run it for the .NET version not for an earlier one. Something like this should work:

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet _regiis -i

Use -? (or /?, can't remember) for more details about this tool.

2. Next, open the IIS Manager again for your site and switch to the ASP.NET tab. Make sure that ASP.NET 2.0 is selected. If necessary, apply your changes.

Things should work now, hopefully.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 23rd, 2006, 05:17 PM
Registered User
 
Join Date: May 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to stoneygossard
Default

Imar,

Thanks once again for your prompt and very useful replies.I understand about checking the asp.net tab to ensure that .NET 2 is the version I am using and that's ok. I cannot really understand the last bit of your advice though about:

 "Run aspnet_regiis -i from the framework folder (under the Windows folder;
make sure you run it for the .NET version not for an earlier one. "

Could you explain how to do this as I dont really understand what you mean.

Also, I installed the .NET framework first and then IIS, is this wrong? As it says to do it this way in the Wrox book?

Stone

Stoney
 
Old May 24th, 2006, 12:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, that's the wrong order. If you install IIS after you install the .NET Framework, IIS is not aware of it, and needs to be reconfigured. That's what the aspnet_regiis tool is all about.

With this:
Quote:
quote:make sure you run it for the .NET version not for an earlier one
I meant that you choose the right version. If you have both .NET 1.1 and 2.0 installed, there's also a .NET 1.1 folder under the Framework folder.

However, my instructions may have been a bit confusing. I told you to run this:

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet _regiis -i

which already runs the command from the correct .NET folder. So, there's no need to worry about any of this.

Just run the command which registers ASP.NET 2 with IIS. You can simply copy and paste that command in Windows' Run box (Start | Run), or you can open a command prompt, browse to the right Framework folder (v2.0.50727) and then execute the program with the -i option.

HtH,

Imar
 
Old May 24th, 2006, 12:45 PM
Registered User
 
Join Date: May 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to stoneygossard
Default

Ok, I've uninstalled and intalled the .NET framework and all related software AFTER the IIS installation but am still getting the same page when I run it. Is there anything left I can try?

I can run all the pages in Cassini (the inbuilt server in VWD) but the IIS thing is still not working out.

Stoney

Stoney
 
Old May 24th, 2006, 12:49 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you post the rest of the error page? What framework version does it list?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old July 25th, 2006, 07:36 AM
Registered User
 
Join Date: Jul 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aftab
Default

I am getting the same error and I have installed the latest MS SQL Server Express and .NET Framework 2.0 Beta included with pack but I am also getting the following error:
XML Parsing Error: not well-formed
Location: http://dev/Sample/index.aspx
Line Number 1, Column 2:

 
Old July 25th, 2006, 07:40 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Is there a reason why you're running a beta version of the .NET framework?

A lot of stuff has changed between the latest beta and RTM, so make sure you get the latest version of the framework.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 25th, 2006, 07:55 AM
Registered User
 
Join Date: Jul 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aftab
Default

I am running .NET Framework Beta because its included with SQL Server Pack it gives me the error even if I write a single line code in page

Code:
     <%
        Response.Write("HelloWorld");
     %>







Similar Threads
Thread Thread Starter Forum Replies Last Post
iis.msc equivalent in IIS for Win XP Pro? RealDHelix Classic ASP Basics 14 March 18th, 2007 08:28 PM
Can't get errors to display with <html:errors> michaeldill JSP Basics 0 August 2nd, 2004 01:47 PM
CreateObject error on IIS 4 but not IIS 5 timtom Classic ASP XML 1 December 5th, 2003 01:26 PM
errors and fixing errors Droopy XML 0 August 26th, 2003 12:47 AM
Errors Errors DB Errors Ljhopkins VS.NET 2002/2003 0 July 15th, 2003 12:42 PM





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