469,935 Members | 1,983 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,935 developers. It's quick & easy.

New Web Sites - Not Serving Up ASPX Pages (but .htm is okay)

I'm writing a small C# utility application that creates new Web Sites via
ADSI. It seems to work just fine for the most part -- meaning that IIS
Metabase entries look either identical or "different where expected" - when
comparing Web Sites created with my utility against Web Sites created
"manually" with IIS Manager. I'm comparing the sites visually (eye balling
it) with Metabase Explorer.

The problem I have with Web Sites created with my utility is that they can
serve up index.htm just fine, but not even the simplest version of
default.aspx.

The error message I get when attempting to view the page in IE6 is "The Page
cannot be displayed" and "Cannot find server or DNS Error". I have
eliminated DNS as the problem because I can PING the Web site by its domain
name (over the Internet) - and it serves up index.htm just fine.

The Default.aspx page has only <%@ Page %> at the top followed by the
usual/minimal HTML elements to define a page. When viewing the Web site
through IIS Manager - the Documents tab does in fact have a check in the
checkbox for "enable default content page" and default.aspx is listed there
as the only document (unless I swap that out for index.htm for testing
purposes).

Any suggestions for helping me determine what is causing the site to not
serve up aspx pages are greatly appreciated.

FWIW: IIS 6.0, I have stopped and restarted the Web site via IIS Manager,
and I have also recycled the application pool to which it belongs.

Thanks!
Nov 19 '05 #1
4 2796
I came up with a work-around; but I'd still appreciate any suggestions so
that I don't have to do this work-around:

The way I have found to get these sites to serve up aspx pages is to open
IIS Manager, view the properties for the site in question, go to the [Home
Directory] tab, and click [Remove] next to the Application Name textbox in
the Application Settings area. Then I immediately click on [Add] to add the
application back in. That fixed it (the site then served up aspx pages just
fine). I also recycled the Application pool - but that may have been
unnecessary.

Any ideas?

Thanks!
"Frankie" <A@B.COM> wrote in message
news:uW****************@TK2MSFTNGP10.phx.gbl...
I'm writing a small C# utility application that creates new Web Sites via
ADSI. It seems to work just fine for the most part -- meaning that IIS
Metabase entries look either identical or "different where expected" -
when comparing Web Sites created with my utility against Web Sites created
"manually" with IIS Manager. I'm comparing the sites visually (eye balling
it) with Metabase Explorer.

The problem I have with Web Sites created with my utility is that they can
serve up index.htm just fine, but not even the simplest version of
default.aspx.

The error message I get when attempting to view the page in IE6 is "The
Page cannot be displayed" and "Cannot find server or DNS Error". I have
eliminated DNS as the problem because I can PING the Web site by its
domain name (over the Internet) - and it serves up index.htm just fine.

The Default.aspx page has only <%@ Page %> at the top followed by the
usual/minimal HTML elements to define a page. When viewing the Web site
through IIS Manager - the Documents tab does in fact have a check in the
checkbox for "enable default content page" and default.aspx is listed
there as the only document (unless I swap that out for index.htm for
testing purposes).

Any suggestions for helping me determine what is causing the site to not
serve up aspx pages are greatly appreciated.

FWIW: IIS 6.0, I have stopped and restarted the Web site via IIS Manager,
and I have also recycled the application pool to which it belongs.

Thanks!

Nov 19 '05 #2
What you're missing is

1. mapping the application to aspnet_isapi.dll.

drive:\WINDOWS\MICROSOFT.NET\FRAMEWORK\Vx.x.xxxxx\ aspnet_isapi.dll

There's several extensions which you should map to aspnet_isapi.dll.

See a list at :
http://www.microsoft.com/mspress/boo...pchap/6667.asp

You probably should look at running aspnet_regiis.exe for the virtual
root you created, with the parameters you desire, typically -i .

and

2. setting the default document to "default.aspx".

You'd have to use ADSI for that :

'Only setting two properties
vDir.DefaultDoc = vDir.DefaultDoc & ",default.aspx"

'Write information back to Metabase
vDir.SetInfo

See http://www.15seconds.com/issue/980304.htm for an example.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Frankie" <A@B.COM> wrote in message news:en**************@TK2MSFTNGP10.phx.gbl...
I came up with a work-around; but I'd still appreciate any suggestions so that I don't
have to do this work-around:

The way I have found to get these sites to serve up aspx pages is to open IIS Manager,
view the properties for the site in question, go to the [Home Directory] tab, and click
[Remove] next to the Application Name textbox in the Application Settings area. Then I
immediately click on [Add] to add the application back in. That fixed it (the site then
served up aspx pages just fine). I also recycled the Application pool - but that may
have been unnecessary.

Any ideas?

Thanks!
"Frankie" <A@B.COM> wrote in message news:uW****************@TK2MSFTNGP10.phx.gbl...
I'm writing a small C# utility application that creates new Web Sites via ADSI. It
seems to work just fine for the most part -- meaning that IIS Metabase entries look
either identical or "different where expected" - when comparing Web Sites created with
my utility against Web Sites created "manually" with IIS Manager. I'm comparing the
sites visually (eye balling it) with Metabase Explorer.

The problem I have with Web Sites created with my utility is that they can serve up
index.htm just fine, but not even the simplest version of default.aspx.

The error message I get when attempting to view the page in IE6 is "The Page cannot be
displayed" and "Cannot find server or DNS Error". I have eliminated DNS as the problem
because I can PING the Web site by its domain name (over the Internet) - and it serves
up index.htm just fine.

The Default.aspx page has only <%@ Page %> at the top followed by the usual/minimal
HTML elements to define a page. When viewing the Web site through IIS Manager - the
Documents tab does in fact have a check in the checkbox for "enable default content
page" and default.aspx is listed there as the only document (unless I swap that out for
index.htm for testing purposes).

Any suggestions for helping me determine what is causing the site to not serve up aspx
pages are greatly appreciated.

FWIW: IIS 6.0, I have stopped and restarted the Web site via IIS Manager, and I have
also recycled the application pool to which it belongs.

Thanks!


Nov 19 '05 #3
Thanks Juan,
What my utility was missing was a call to AppCreate2.

Basically the application wasn't being created correctly in IIS even though
I was explicitly setting all of the metabase properties (or at least those
properties that I could see through Metabase Explorer).

And, just in case others are interested in this thread, I tried
aspnet_regiis as suggested, but it didn't solve the problem. I'm not sure
what all AppCreate2 does behind the scenes, but whatever it does is
apparently necessary; and not all of its changes are apparent in Metabase
Explorer.

Thanks again!

-F
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
What you're missing is

1. mapping the application to aspnet_isapi.dll.

drive:\WINDOWS\MICROSOFT.NET\FRAMEWORK\Vx.x.xxxxx\ aspnet_isapi.dll

There's several extensions which you should map to aspnet_isapi.dll.

See a list at :
http://www.microsoft.com/mspress/boo...pchap/6667.asp

You probably should look at running aspnet_regiis.exe for the virtual
root you created, with the parameters you desire, typically -i .

and

2. setting the default document to "default.aspx".

You'd have to use ADSI for that :

'Only setting two properties
vDir.DefaultDoc = vDir.DefaultDoc & ",default.aspx"

'Write information back to Metabase
vDir.SetInfo

See http://www.15seconds.com/issue/980304.htm for an example.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Frankie" <A@B.COM> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
I came up with a work-around; but I'd still appreciate any suggestions so
that I don't have to do this work-around:

The way I have found to get these sites to serve up aspx pages is to open
IIS Manager, view the properties for the site in question, go to the
[Home Directory] tab, and click [Remove] next to the Application Name
textbox in the Application Settings area. Then I immediately click on
[Add] to add the application back in. That fixed it (the site then served
up aspx pages just fine). I also recycled the Application pool - but that
may have been unnecessary.

Any ideas?

Thanks!
"Frankie" <A@B.COM> wrote in message
news:uW****************@TK2MSFTNGP10.phx.gbl...
I'm writing a small C# utility application that creates new Web Sites
via ADSI. It seems to work just fine for the most part -- meaning that
IIS Metabase entries look either identical or "different where
expected" - when comparing Web Sites created with my utility against Web
Sites created "manually" with IIS Manager. I'm comparing the sites
visually (eye balling it) with Metabase Explorer.

The problem I have with Web Sites created with my utility is that they
can serve up index.htm just fine, but not even the simplest version of
default.aspx.

The error message I get when attempting to view the page in IE6 is "The
Page cannot be displayed" and "Cannot find server or DNS Error". I have
eliminated DNS as the problem because I can PING the Web site by its
domain name (over the Internet) - and it serves up index.htm just fine.

The Default.aspx page has only <%@ Page %> at the top followed by the
usual/minimal HTML elements to define a page. When viewing the Web site
through IIS Manager - the Documents tab does in fact have a check in the
checkbox for "enable default content page" and default.aspx is listed
there as the only document (unless I swap that out for index.htm for
testing purposes).

Any suggestions for helping me determine what is causing the site to not
serve up aspx pages are greatly appreciated.

FWIW: IIS 6.0, I have stopped and restarted the Web site via IIS
Manager, and I have also recycled the application pool to which it
belongs.

Thanks!



Nov 19 '05 #4
Thanks Juan,
What my utility was missing was a call to AppCreate2.

Basically the application wasn't being created correctly in IIS even though
I was explicitly setting all of the metabase properties (or at least those
properties that I could see through Metabase Explorer).

And, just in case others are interested in this thread, I tried
aspnet_regiis as suggested, but it didn't solve the problem. I'm not sure
what all AppCreate2 does behind the scenes, but whatever it does is
apparently necessary; and not all of its changes are apparent in Metabase
Explorer.

Thanks again!

-F
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
What you're missing is

1. mapping the application to aspnet_isapi.dll.

drive:\WINDOWS\MICROSOFT.NET\FRAMEWORK\Vx.x.xxxxx\ aspnet_isapi.dll

There's several extensions which you should map to aspnet_isapi.dll.

See a list at :
http://www.microsoft.com/mspress/boo...pchap/6667.asp

You probably should look at running aspnet_regiis.exe for the virtual
root you created, with the parameters you desire, typically -i .

and

2. setting the default document to "default.aspx".

You'd have to use ADSI for that :

'Only setting two properties
vDir.DefaultDoc = vDir.DefaultDoc & ",default.aspx"

'Write information back to Metabase
vDir.SetInfo

See http://www.15seconds.com/issue/980304.htm for an example.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Frankie" <A@B.COM> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
I came up with a work-around; but I'd still appreciate any suggestions so
that I don't have to do this work-around:

The way I have found to get these sites to serve up aspx pages is to open
IIS Manager, view the properties for the site in question, go to the
[Home Directory] tab, and click [Remove] next to the Application Name
textbox in the Application Settings area. Then I immediately click on
[Add] to add the application back in. That fixed it (the site then served
up aspx pages just fine). I also recycled the Application pool - but that
may have been unnecessary.

Any ideas?

Thanks!
"Frankie" <A@B.COM> wrote in message
news:uW****************@TK2MSFTNGP10.phx.gbl...
I'm writing a small C# utility application that creates new Web Sites
via ADSI. It seems to work just fine for the most part -- meaning that
IIS Metabase entries look either identical or "different where
expected" - when comparing Web Sites created with my utility against Web
Sites created "manually" with IIS Manager. I'm comparing the sites
visually (eye balling it) with Metabase Explorer.

The problem I have with Web Sites created with my utility is that they
can serve up index.htm just fine, but not even the simplest version of
default.aspx.

The error message I get when attempting to view the page in IE6 is "The
Page cannot be displayed" and "Cannot find server or DNS Error". I have
eliminated DNS as the problem because I can PING the Web site by its
domain name (over the Internet) - and it serves up index.htm just fine.

The Default.aspx page has only <%@ Page %> at the top followed by the
usual/minimal HTML elements to define a page. When viewing the Web site
through IIS Manager - the Documents tab does in fact have a check in the
checkbox for "enable default content page" and default.aspx is listed
there as the only document (unless I swap that out for index.htm for
testing purposes).

Any suggestions for helping me determine what is causing the site to not
serve up aspx pages are greatly appreciated.

FWIW: IIS 6.0, I have stopped and restarted the Web site via IIS
Manager, and I have also recycled the application pool to which it
belongs.

Thanks!



Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by -[ CaMeL ]- a55m0nk | last post: by
3 posts views Thread by Adam Pedder | last post: by
2 posts views Thread by Nils Hedström | last post: by
27 posts views Thread by Raymond | last post: by
24 posts views Thread by John Rivers | last post: by
3 posts views Thread by anthonykallay | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.