IIS7 and Javascript

IIS7 and Javascript

am 30.06.2007 00:05:42 von Greg

Hi,

I am running IIS7 on a VISTA machine and I have done the following;

- created an application under my main website
- in this website I have 2 files, an html page and a javascript file
(included in the html page)

On my HTML page I have a link that I click (which executes a
Javascript function), on the link I have return false; in the onClick
event so that the page does not reload. The function being called in
the onClick event makes an XMLHTTP call to a remote Web service.

Before I had used this same code on IIS6 and it all worked fine,
however when I try and run it under IIS7 I get the following error.

Description: The Web server is configured to not list the contents of
this directory.

Error Code: 0x00000000

Notification: ExecuteRequestHandler

Module: DirectoryListingModule

Requested URL: http://localhost:80/

Physical Path: C:\inetpub\wwwroot

Logon User: Anonymous

Logon Method: Anonymous

Handler: StaticFile

Most likely causes:

A default document is not configured for the requested URL, and
directory browsing is not enabled on the server.
What you can try:

If you do not want to enable directory browsing, ensure that a default
document is configured and that the file exists.
Enable directory browsing using IIS Manager.
Open IIS Manager.
In the Features view, double-click Directory Browsing.
On the Directory Browsing page, in the Actions pane, click Enable.
Verify that the configuration/system.webServer/directoryBrowse@enabled
attribute is set to true in the site or application configuration
file.
More Information... This error occurs when a document is not specified
in the URL, no default document is specified for the Web site or
application, and directory listing is not enabled for the Web site or
application. This setting may be disabled on purpose to secure the
contents of the server.

Also... where does one go to configure Read/Write/Execute permissions
in IIS7... this is not as intuitive as IIS6 was.

Thanks

Greg

Re: IIS7 and Javascript

am 01.07.2007 00:12:36 von David Wang

If by returning false the page does not reload, then your browser
would not show the error page which indicates that a request was made
to IIS7, but you did not configure it to do what you want.

Thus, I do not think your HTML and Javascript function works the way
that you describe. You must have forgotten something else if it worked
on IIS6 -- either:
1. a default document
2. reconfigure the default document name
3. enabled directory browsing
4. some module that rewrites the URL


> Also... where does one go to configure Read/Write/Execute permissions
> in IIS7... this is not as intuitive as IIS6 was.

Different does not mean it is less intuitive -- maybe you are just
used to something else, so any intuitive change *appears* less
intuitive. Prior to IIS7, users have to memorize where all the useful
properties existed and then go tweak them. IIS7 actually logically
group all the properties together so that there is less memorization
and right-click property page flipping and more task-based actions.

Of course, some of the properties have changed locations from IIS6,
and if you simply memorized where things were, IIS7 UI seems less
"intuitive" because you can't navigate relative to some of those
constructs and find things again. But it really means that you never
understood the logical grouping/concepts of your configuration --
which really isn't your fault since it is the product's responsibility
to make that clear to you, and pre-IIS7 UI certainly didn't do that --
it just gave you a hierarchy of nodes and properties for you to tweak.

Read/Write/Execute permissions should have nothing to do with your
current issue. Neither your HTML nor your client-side javascript have
any relation to server-side Read/Write/Execute permissions, and by
default when you install products that add handlers, those settings
would be tweaked -- so user attempts to change them are most likely
mistaken or there's a bug in the installed product -- neither of them
are user's responsibility.


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





On Jun 29, 3:05 pm, Greg wrote:
> Hi,
>
> I am running IIS7 on a VISTA machine and I have done the following;
>
> - created an application under my main website
> - in this website I have 2 files, an html page and a javascript file
> (included in the html page)
>
> On my HTML page I have a link that I click (which executes a
> Javascript function), on the link I have return false; in the onClick
> event so that the page does not reload. The function being called in
> the onClick event makes an XMLHTTP call to a remote Web service.
>
> Before I had used this same code on IIS6 and it all worked fine,
> however when I try and run it under IIS7 I get the following error.
>
> Description: The Web server is configured to not list the contents of
> this directory.
>
> Error Code: 0x00000000
>
> Notification: ExecuteRequestHandler
>
> Module: DirectoryListingModule
>
> Requested URL:http://localhost:80/
>
> Physical Path: C:\inetpub\wwwroot
>
> Logon User: Anonymous
>
> Logon Method: Anonymous
>
> Handler: StaticFile
>
> Most likely causes:
>
> A default document is not configured for the requested URL, and
> directory browsing is not enabled on the server.
> What you can try:
>
> If you do not want to enable directory browsing, ensure that a default
> document is configured and that the file exists.
> Enable directory browsing using IIS Manager.
> Open IIS Manager.
> In the Features view, double-click Directory Browsing.
> On the Directory Browsing page, in the Actions pane, click Enable.
> Verify that the configuration/system.webServer/directoryBrowse@enabled
> attribute is set to true in the site or application configuration
> file.
> More Information... This error occurs when a document is not specified
> in the URL, no default document is specified for the Web site or
> application, and directory listing is not enabled for the Web site or
> application. This setting may be disabled on purpose to secure the
> contents of the server.
>
> Also... where does one go to configure Read/Write/Execute permissions
> in IIS7... this is not as intuitive as IIS6 was.
>
> Thanks
>
> Greg