Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frankie - 14 Jul 2005 18:51 GMT
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!
Frankie - 14 Jul 2005 20:26 GMT
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!

> 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
[quoted text clipped - 26 lines]
>
> Thanks!
Juan T. Llibre - 14 Jul 2005 20:52 GMT
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/books/sampchap/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...
======================

>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:
[quoted text clipped - 37 lines]
>>
>> Thanks!
Frankie - 15 Jul 2005 22:39 GMT
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

> What you're missing is
>
[quoted text clipped - 77 lines]
>>>
>>> Thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.