I am completely new to asp.net. I just started to learn. I created a .html file which I then changed to .aspx. After I changed it to .aspx I can't open it through my internet explorer, what can be the problem.

Recommended Answers

All 10 Replies

The problem is you haven't researched ASP.NET properly.

Why do you say that? I've been reading about it for about 15 hours, I don't know what I'm doing wrong. I'll check the link you posted, but if you know where the problem is, could you please tell me?

Why do you say that? I've been reading about it for about 15 hours

Wow! well how you can read 15 hours of ASP.NET getting started and surmise that merely changing the file extension of an HTML page is all that's required seems improbable.

But what the hey. Ok you can't just point IE at an aspx page in your file system, an aspx file needs to be processed by a web-server typically IIS and the .NET CLR (The framework). Visual Studio Express Edition has one built-in. Do you have Visual Studio ? installed? and the .NET Framework? that's definately step 1. They're free and you can get it from http://asp.net

The latest framework is version 3.5 and the latest VSEE is 2008

OPen VS and select New -> Website from the File menu, you should get a file in Solution Explorer ( a window with all the project files listed to the right hand side) named Default.aspx, paste your HTML in there (be sure to the leave the <@ page stuff and the DOCTYPE stuff and the opening <Form id="From1" runat="server"> and the closing </form>
tags intact .

Right click the Default.aspx file and choose 'Set as start page' in the context menu that appears.

Save everything (CTRL + SHIFT + S)
Press F5 key (start the debugger and launch your page in your default browser)
The first time you do this VS will moan about a debug directive missing in web.config, just say yes and it will do what it needs to do.

Wow! well how you can read 15 hours of ASP.NET getting started and surmise that merely changing the file extension of an HTML page is all that's required seems improbable.

But what the hey. Ok you can't just point IE at an aspx page in your file system, an aspx file needs to be processed by a web-server typically IIS and the .NET CLR (The framework). Visual Studio Express Edition has one built-in. Do you have Visual Studio ? installed? and the .NET Framework? that's definately step 1. They're free and you can get it from http://asp.net

The latest framework is version 3.5 and the latest VSEE is 2008

OPen VS and select New -> Website from the File menu, you should get a file in Solution Explorer ( a window with all the project files listed to the right hand side) named Default.aspx, paste your HTML in there (be sure to the leave the <@ page stuff and the DOCTYPE stuff and the opening <Form id="From1" runat="server"> and the closing </form>
tags intact .

Right click the Default.aspx file and choose 'Set as start page' in the context menu that appears.

Save everything (CTRL + SHIFT + S)
Press F5 key (start the debugger and launch your page in your default browser)
The first time you do this VS will moan about a debug directive missing in web.config, just say yes and it will do what it needs to do.

i think that after 15 hours of reading (assuming that you are also new to web programming) its a very short time.

to start ASP.NET developing you need VS.NET (as hollystyles said).
after that ... there are a lot of sites where can find useful information. so ... in order to get develop a simple web site using ASP.NET you have to start digging...

Good luck.

check out w3schools.com to learn the basics of asp.net. After that, jump into tutorials and look at code. To be quite honest, 15 hours isn't anything. Most people don't understand how to search for a problem in programming within the first month. It takes time, and plenty of it.

You need a windows server with ASP.NET installed along with the .NET framework. As hollystyles said, they are all free, and if you wish, and are included in visual studio. You can download a trial version or beta of Visual Studio 2008. When installing this, it will install a server on your computer so when you start visual studio, the "server" will start as well, THEN you can view it in your web page.

Until then, your computer is not a server and you cannot view an asp.net page within it.

thank you all for your input, I might not have given enough info about my problem.
I have installed the .net frame work, I have included IIS.
I checked out the website hollystyle mentioned, there it says to check
http://localhost
and see what it gives me.
Well it asks for username and password and then tells me I am not allowed to see that.

use visual studio 2005 or 2008, you wont have to mess with those configurations

Well it asks for username and password and then tells me I am not allowed to see that.

This is due to windows integrated authentication (NTLM), although you are logged into Windows those credentials are not necessarily automatically passed on when required it certain circumstances. Here are the solutions:

For IE (thanks to Ron Symonds - Microsoft MVP (FrontPage)):

Have you installed IE7?
If so, (and this may work anyway)
In Internet Explorer
Tools->Internet Options
Security Tag
Click "Local Intranet"
Click "Custom Level"
Scroll down to the bottom to the User Authorisation section
Select "Automatic Logon with current User Name and password"
Click OK, Click Yes

You may need to add Localhost to the Intranet zone - if so click the
Sites button and Advanced link.

Click OK
--

For FireFox (Thanks to Peter Orologas):

Firefox - Enter username and password for "" at http://localhost - Solution

IIS uses Integrated Authentication and by default IE has the ability to use your windows user account...but don't worry, so does Firefox but you'll have to make a quick configuration change.

1) Open up Firefox and type in about:config as the url

2) In the Filter Type in ntlm

3) Double click "network.automatic-ntlm-auth.trusted-uris" and type in localhost and hit enter

4) Write Thank You To Blogger

As Always, Hope this helped you out.

Pete Orologas

ok, everybody, thanks for your help
I got visual studio installed, and that took care of my problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.