Hi, Im trying to deploy the new webapi to my local IIS.
If i go to a normal MVC route it works (Home/Index etc)
But if i try the Webapi route i get the error 500(api/category etc)
Do i have to do somthing special to get the new Webapi to work with IIS 7.5?
Module
ManagedPipelineHandler
Notification
ExecuteRequestHandler
Handler
System.Web.Http.WebHost.HttpControllerHandler
Error Code
0x00000000
<div id="details-right">
Requested URL
http://json.zandparts.se:80/api/category
Physical Path
C:\Temp\Zandparts\WebshopAPI\api\category
Logon Method
Anonymous
Logon User
Anonymous
</div>
IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
IIS was not able to process configuration for the Web site or application.
The authenticated user does not have permission to use this DLL.
The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
The bold parts i have fixed already, And im not sure about the rest.
The file system security is preventing the web server (IIS) from accessing those files. Sounds like the files for the app are maybe on your desktop or in your "my documents" folder? If so, move these files out and somewhere else under C:\ or change the filesystem
security for thae app directory to allow the IIS process to access (IIS_IUSRS group).
Hmm, that's not working for me. I'm using the same connection string when I'm running in Visual Studio's Development Server as when I'm hosting on IIS (on local machine). I get a 500 even when trying to perform a post on a controller that doesn't access/require
database access. Any other thoughts?
Fisshy
Member
2 Points
3 Posts
Hosting new Webapi cause few errors (Error 500, IIS7.5)
Mar 26, 2012 02:18 PM|LINK
Hi, Im trying to deploy the new webapi to my local IIS.
If i go to a normal MVC route it works (Home/Index etc)
But if i try the Webapi route i get the error 500(api/category etc)
Do i have to do somthing special to get the new Webapi to work with IIS 7.5?
The bold parts i have fixed already, And im not sure about the rest.
Regards
Joachim
mvc
BrockAllen
All-Star
27554 Points
4912 Posts
MVP
Re: Hosting new Webapi cause few errors (Error 500, IIS7.5)
Mar 26, 2012 02:25 PM|LINK
The file system security is preventing the web server (IIS) from accessing those files. Sounds like the files for the app are maybe on your desktop or in your "my documents" folder? If so, move these files out and somewhere else under C:\ or change the filesystem security for thae app directory to allow the IIS process to access (IIS_IUSRS group).
mvc
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/
Fisshy
Member
2 Points
3 Posts
Re: Hosting new Webapi cause few errors (Error 500, IIS7.5)
Mar 26, 2012 02:44 PM|LINK
Im hosting the app under
C:\Temp\Map\WebshopAPI
I've set all the Permissions already.
The app works when im using normal MVC Urls
routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } );routes.MapHttpRoute( name: "ActionApi", routeTemplate: "api/{controller}/{action}/{id}", defaults: new { id = RouteParameter.Optional } ); routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } );RightNow_joh...
Member
7 Points
6 Posts
Re: Hosting new Webapi cause few errors (Error 500, IIS7.5)
Mar 28, 2012 11:27 PM|LINK
Bump.
This is happening to me as well, GET works fine, but POST fails with all my controllers in the WebApi. Here is my trace detail:
Fisshy
Member
2 Points
3 Posts
Re: Hosting new Webapi cause few errors (Error 500, IIS7.5)
Mar 29, 2012 06:19 AM|LINK
I managed to solve my problem, Had wrong connectionstring to the DB.
RightNow_joh...
Member
7 Points
6 Posts
Re: Hosting new Webapi cause few errors (Error 500, IIS7.5)
Mar 29, 2012 01:59 PM|LINK
Hmm, that's not working for me. I'm using the same connection string when I'm running in Visual Studio's Development Server as when I'm hosting on IIS (on local machine). I get a 500 even when trying to perform a post on a controller that doesn't access/require database access. Any other thoughts?
RightNow_joh...
Member
7 Points
6 Posts
Re: Hosting new Webapi cause few errors (Error 500, IIS7.5)
Mar 29, 2012 09:50 PM|LINK
Scratch that. This issue is because of my db connection string as well. I had a typo. I wish the error messages were more helpful.