Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running a ServiceStack application on IIS. My regular services work fine and have not had any problems with permissions.

My new project involves providing generated pdfs. I gave IIS_IUSRS read/write permissions to the Temp directory under my app directory. I also allow non SSL connections to this directory. When I browse to the file which ServiceStack is supposed to automatically serve up (eg. http://ryublalblah.com/Temp/201310171723337631.pdf ) I get this:

Forbidden


Request.HttpMethod: GET
Request.PathInfo: 
Request.QueryString: 
Request.RawUrl: /ryublalblah/Temp/201310171723337631.pdf
App.IsIntegratedPipeline: True
App.WebHostPhysicalPath: C:\inetpub\ryublalblah
App.WebHostRootFileNames: [global.asax,global.asax.cs,web.config,bin,temp]

Now this doesn't look like a ServiceStack error message, more like IIS, but I'm not certain as to how to get to the bottom of this. Authorization settings are Allow All.

share|improve this question
    
Doesn't look like IIS either, what does the entry is the IIS http log says for such a request, what is the sub status, right next to the 403? –  Peter Hahndorf Oct 18 '13 at 17:39
    
@PeterHahndorf I get this "2013-10-18 17:54:56 233.155.28.12 GET /ryublahblah/Temp/201310171723337631.pdf - 80 - 233.155.28.12 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 403 0 0 202", are further diagnostics I can perform? –  Alex Pineda Oct 18 '13 at 19:45
    
hmm, the sub-status is 0, which is not helpful. I would run Process Monitor (sysinternals.com) to see whether there are any Access Denied problems on the file itself. –  Peter Hahndorf Oct 18 '13 at 20:29

1 Answer 1

up vote 0 down vote accepted

I had the same problem with ServiceStack 3.9.70. I created a new project hosted at the root of an IIS application. Turns out the problem was caused by the following line in the AppHost configuration

config.ServiceStackHandlerFactoryPath = "";  // Results in forbidden

I had copied it from another project where ServiceStack was hosted in a subfolder:

config.ServiceStackHandlerFactoryPath = "api";  // subfolder: WORKS
config.ServiceStackHandlerFactoryPath = null;   // root: WORKS
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.