ASP.net does not execute

  • Thread starter john_smith_nebraska
  • Start date
J

john_smith_nebraska

I am using VISTA . I have IIS enabled .

I installed VS 2005 successfully.

Under old ASPX you knwo you go to inetpub wwwroot and run a test
default.aspx file to see if it executes properly.

I pulled a starter program from Microsoft site and pasted it into VS
2005 at the default.aspx page of a new wesite called website1. I made
sure website1 was added into IIS and was running.

The bulid in VS 2005 went thru with no errors, but when a I run it ,
it does not execute the ASP.net code, just returns the HTML printout
of the ASP.net code in the default.aspx page indicating that asp.net
is not being executed by the IIS for one reason or other.
What I did was something like http://localhost/website1/
The page default.aspx is returned as a text page of the asp.net code
This was abig page but to explain it in simple terms, let us say you
said response.write"Hello",
the internet explorer returns "response.write"Hello"" not just
Hello (You get the idea)

I tried this on 2 PCs with Vista. Same problem.

I tried the old trick of sticking the ASP.net page into wwwroot folder
with same results.
The default htm page with the IIS 7 symbol surrounded by languages
comes up . I f I disable that page (by changing its name and goto
default.aspx page , it just shows in HTML whatever is in ASPX page
indicating that aspx engine is not processing anything or is off
whatever.

I am sure this was discussed but my search for cannot execute asp.net
returns nothing. I tried few other search phrases no luck.

Thanks for your understanding
 
N

Norman Yuan

Have you convert virtual directory "http:/localhost/website1" to an
application? You need to go to IIS Manager to configure your web application
correctly, so that IIS knows to use ASP.NET to server that page.
 
D

David Wang

Default IIS7 installation only serves static files. It cannot run ASP,
CGI, ISAPI, ASP.Net, PHP, Perl, etc.

You will have to enable ASP.Net support in the same Windows Feature
dialog underneath IIS Application Development. Only then will .aspx
page run.

You can also figure this out by noticing that there are no .aspx
handlers defined in your current IIS installation, meaning .aspx pages
will not be processed/executed and hence only the file content will
return.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
 
J

john_smith_nebraska

Default IIS7 installation only serves static files. It cannot run ASP,
CGI, ISAPI, ASP.Net, PHP, Perl, etc.

You will have to enable ASP.Net support in the same Windows Feature
dialog underneath IIS Application Development. Only then will .aspx
page run.

You can also figure this out by noticing that there are no .aspx
handlers defined in your current IIS installation, meaning .aspx pages
will not be processed/executed and hence only the file content will
return.

//Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David.Wang
//











- Show quoted text -

Anyway I have the Asp.net working but I am still not sure about few
things.
I added a default.aspx page under

Default Website > aspnet_client> System_web > 2_0_50727

( I have no idea where "aspnet_client> System_web > 2_0_50727" came
from. It was there by default
And it is under inetpub>wwwroot in windows explorer

Then I clicked the Browse under properties of 2_0_50727

The default.aspx page executed ok (As it was the only aspx page in
there. I added a second aspx page and it also ran fine when I called
for it in explorer address bar)

But then when I added other virtual directories or applications under
this default web site or an entirely new website, it just keeps
giving server 500 errors.

But then I went to VS2005 and created an empty website added a
default.aspx and clicked run button. And it executed fine launching
the internet explorer and displaying default.aspx. This is crazy
because I did not add this
Website into iis4 and it is not there either (IF added automatically I
thought by VS2005) .
In fact I stopped the default website from running (to see I fmy
website got added inside this by VS2005)
It did not stop the VS website from running
So it is as if Visual Studio has its own built-in independent
webserver like the older WebMAtrix did (Which I thought was way cool
as I did not have to fight with the ever crazy Microsoft-IIS) .

Am I totally smoking crack here or is IIS still required to run aspx
files from VS2005 like old days or are they independent now ?
 
D

David Wang

Anyway I have the Asp.net working but I am still not sure about few
things.
I added a default.aspx page under

Default Website > aspnet_client> System_web > 2_0_50727

( I have no idea where "aspnet_client> System_web > 2_0_50727" came
from. It was there by default
And it is under inetpub>wwwroot in windows explorer

Then I clicked the Browse under properties of 2_0_50727

The default.aspx page executed ok (As it was the only aspx page in
there. I added a second aspx page and it also ran fine when I called
for it in explorer address bar)

But then when I added other virtual directories or applications under
this default web site or an entirely new website, it just keeps
giving server 500 errors.

But then I went to VS2005 and created an empty website added a
default.aspx and clicked run button. And it executed fine launching
the internet explorer and displaying default.aspx. This is crazy
because I did not add this
Website into iis4 and it is not there either (IF added automatically I
thought by VS2005) .
In fact I stopped the default website from running (to see I fmy
website got added inside this by VS2005)
It did not stop the VS website from running
So it is as if Visual Studio has its own built-in independent
webserver like the older WebMAtrix did (Which I thought was way cool
as I did not have to fight with the ever crazy Microsoft-IIS) .

Am I totally smoking crack here or is IIS still required to run aspx
files from VS2005 like old days or are they independent now ?- Hide quoted text -

- Show quoted text -




VS2005 comes with its own toy web server to allow ASP.Net application
development. It is very nice for self-contained development.

The deployment of ASP.Net applications will eventually happen on an
IIS server, so it's your choice as to when to figure it out.

Enabling ASP.Net support on IIS7 is just a couple of checkboxes under
Windows Features. Then, I copy my .aspx / .asmx pages and appropriate
DLLs into bin, etc, and they run fine.

If you have questions about how to properly configure deploy your
application, that is way beyond the scope of this newsgroup. You want
to figure out those details *before* attempting to do anything on IIS.
Otherwise, it will feel frustrating.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top