Solved. 

While gathering information about my setup I found the solution. 

Setting "Default web site > Authentication > Anonymous Authentication (keep 
enabled) " to "Application Pool Identity" solved my issue. 



Here's a few tags and keywords for future reference when someone else bumps 
into this: 

In IIS i have one site, which is the default web site. Below It's stored at 
c:/inetpub/wwwroot. This is where the web2py zip file contents went, so 
there is an applications folder, examples, gluon, jada jada. URL rewrite is 
used like in the example given in the web2py book. 
When the static rewrite rule is enabled and setting "error pages > Edit 
feature settings> Detailed errors" I  get the following error when 
requesting http://wvwebt01/welcome/static/css/calendar.css:


HTTP Error 401.3 - Unauthorized
You do not have permission to view this directory or page because of the 
access control list (ACL) configuration or encryption settings for this 
resource on the Web server.

Detailed Error Information:
Module   IIS Web Core
Notification   AuthenticateRequest
Handler   StaticFile
Error Code   0x80070005
Requested URL   
http://wvwebt01:80/applications/welcome/static/css/calendar.css
Physical Path   
C:\inetpub\wwwroot\applications\welcome\static\css\calendar.css
Logon Method   Anonymous
Logon User   Anonymous

Looking at http://stackoverflow.com/a/10457630 i changed "iis manager> 
default web site > authentication > Anonymous Authentication > Edit... > 
Application pool identity" instead of specific user IUSR (default), which 
is not given any direct access on the files, but according to the book the 
application pool group is. 

Thanks Niphlod!

Op donderdag 13 augustus 2015 15:03:34 UTC+2 schreef Niphlod:
>
> 401 means not authorized. What happens without rewrite (or incorrect ones) 
> is usually 404 (not found) . 
> Can you post more details about the structure of the iis site which the 
> app belongs ?
>
> On Wednesday, August 12, 2015 at 6:01:45 PM UTC+2, Remco Boerma wrote:
>>
>> Hi, 
>>
>> I'm migrating from ubuntu to windows 2012R2 + IIS 8.5. 
>>
>> Following a slightly altered recipe from the book to install web2py under 
>> IIS (but mostly the same) i've come across a strange error. Since i'm not 
>> accustomed to IIS, it can well be my issue is standard IIS-knowledge-gap 
>> related. I have installed the rules module, have web2py up and running. Now 
>> i installed another app inside web2py that worked before on a 2.11.2 on my 
>> local windows machine as well as on a 2.9.5 server behind apache and all of 
>> a sudden my static files are 401'd 
>>
>> I don't use any special static versioning. When i disabled the static 
>> rewrite rule everything works like a charm. My setup is as simple as 
>> possible (only web2py in the root) running 2.12.2 stable on ii 8.5 python 
>> 2.7.9. 
>>
>> the static rule in web.config (comes from the sample) is: 
>>
>> <rule name="static" enabled="false" stopProcessing="true"> <match 
>> url="^(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$" /> <conditions 
>> logicalGrouping="MatchAll" trackAllCaptures="false" /> <action 
>> type="Rewrite" url="applications/{R:1}/static/{R:2}" 
>> logRewrittenUrl="false" /> </rule>
>>
>> Does anyone have any clue why i have those 401s? 
>>
>>
>> With kind regards, 
>> Remco Boerma
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to