Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get started: ASP.NET page not working

Status
Not open for further replies.

Dor100

Technical User
Apr 9, 2001
279
US
I've just started trying to learn ASP.NET with an online tutorial. I'm on a Novell client for Win 2k. The following simple code has been saved in Notepad as "firstdotnetpage.aspx":

<html>
<body bgcolor="yellow">
<center>
<h2>Hello!</h2>
<p><%Response.Write(now())%></p>
</center>
</body>
</html>

When I open the page with IE 6, it only opens like a static html page and the ASP output does not appear. If you view source, however, the <p><%Response.Write(now())%></p> does appear.

What have I missed in order to activate ASP.NET?
 
Do you have IIS installed? Do you have the .NET framework installed?

Jim
 
Thanks. Much to my surprise, IIS needed installing, which I did after searching Google and finding this material about how to check:
.NET was already installed and the SDK. I tried to open the .aspx file from Win Explorer but got the same result again. Something tells me there's more to it than that...
 
Still trying. I found this in the FAQ's: it was helpful. I've placed the .aspx page in C:\Inetpub\ The "Default Web Site" is running. When I right click the page in the Internet Services Manager window and choose Open, it opens in IE as C:\Inetpub\ but the ASP.NET code still does not run. When I right click and choose Browse, it opens as with the same result.

When I try to open from IE as localhost.firstdotnetpage.aspx, I get a "Your requested host 'localhost.firstdotnetpage.aspx' could not be resolved by DNS" network error page.

Now, .NET was installed before IIS on this pc, and not the other way around in keeping with the FAQ here. I'm sure hoping I will not have to uninstall and reinstall one or both to get the code to run.

I've posted at another forum, but have to wait for a moderator to approve the post. In the meantime, anything more I should do? Any way to avoid having to reinstall .NET and/or IIS?
 
All I've been doing is saving .aspx files from Notepad. Perhaps this guy is right:
I've looked at security settings for C:\Inetpub\ and added Network and Service as users with full permissions, but it didn't make any difference so I removed them. There do not appear to be any other eligible users available such as "ASP.NET.
 
Well, I started from scratch and uninstalled .NET and IIS. Then I reinstalled IIS and downloaded Visual Studio Express from the ASP.NET site. There was a problem with installing it, however - can't get the BITS and System Event Notification services to run. After doing much research, installing the latest version of BITS, trying different service properties, downloading SC.exe and trying to modify BITS with it, etc., I determined that it would be unlikely that I would get the two services to run.

Next I discovered the material found here: So, I installed IsoBuster, and just now as I was typing its name I received a Mozilla notice that the Visual Web Developer img file finished downloading, all 400-plus MB of it. Next I will see what can be done from here.
 
Success. After using ISOBlaster to extract the contents of the img file, setup.exe worked as well to install Windows Installer 3.1, .NET 2.0, Visual Web Developer 2005 Express, MSDN 2005 Express, and SQL Server 2005 Expression Edition x86. It had been looking like these free Microsoft resources would remain beyond reach. Now, I need to see about making .aspx pages again.
 
Success again. I clicked on the link to create a new website and made "WebSite1." Next I pasted in the h2 and ASP.NET code in my first post. Then I clicked the View in Browser icon and Default.aspx opened in IE as The code works, and when you view source you only see it as html output instead of seeing the ASP.NET code.
 
Ok, so you need those nice big ASP.NET Development Server icons to appear to show something is running, then you can call the page with the url from a browser. Works fine with IE, but still the same with Mozilla; IE is fine for now, however.
 
Well, I'm continuing along with the ASP.NET tutorial I'm using, and I've noticed that attribute values work without the quotes. So far I'm not aware of encountering any that do not work without them, although I haven't exactly gone far into ASP.NET yet, but it's sure looking like they are not absolutely necessary except perhaps in rare instances where they are explicitly called for. So, what's the point of them, then, since it only seems to be a waste time and effort to include them? Even an error message page that says, "runat = server" is neeeded doesn't indicate it as 'runat="server".' Is this ok, or is there some truly compelling best practice related reason why they should be included even though things seem to work so far without them?
 
Ok, I definitely haven't gone very far yet. I did think that if any attribute might soon require the quotes, it would be Text, and so it does:

<asp:RangeValidator
runat=server
ControlToValidate=itsid
minimumvalue=1
maximumvalue=100
type=integer
enableclientscript=false
Text="The number must range from 1 to 100."
/>

Everything else works fine without them.
 
Have you thought about starting a blog? Or maybe waiting until you've finally got success, and compiling a "how-to" guiude for other beginners?

I'm not sure you need to constantly update the thread as you go along.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Though not always in the form of a question or request, each post is an opportunity, invitation and call for someone to come along and help out, while also providing useful information to other potential newbies out there who may come to this forum for help getting started. That's thinking outside the box while remaining relevant and making a contribution.

You're also five days late in case you haven't noticed, so your comment is rather stale. Perhaps in part you wanted to plug your site, and I'm nonetheless glad you did since it does look interesting and I've also just started with PHP.

Anyway, life is better outside the box, and questions come in many forms. This thread may prove very helpful to other newbies in the future, and it would have been great to get more help as I kept on persevering this time.
 
Though not always in the form of a question or request, each post is an opportunity, invitation and call for someone to come along and help out, while also providing useful information to other potential newbies out there who may come to this excellent forum for help getting started. That's thinking outside the box while remaining relevant and making a contribution.

You're also five days late in case you haven't noticed, so your comment is rather stale. Perhaps in part you wanted to plug your site, and I'm nonetheless glad you did since it does look interesting and I've also just started with PHP.

Anyway, life is better outside the box, and questions come in many forms. This thread may prove very helpful to other newbies in the future, and it would have been great to get more help as I kept on persevering this time.
 
(Technical glitch resulted in double post above - only the last one is necessary.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top