IIS7 Virtual Directory gives 403 Forbidden Access Denied - iis-7

I have some issues with IIS7 setup that I hope someone can help me with.
I am developing an ASP.NET MVC5 application which consist of 1 web application and 1 web api application for handling REST calls. They are on the same solution in Visual Studio. While developing, they run on the localhost with two different ports as usual.
Now that I am deploying to a web server, I planned to have them running like this:
Web app: http://mydomain.com
Web api: http://mydomain.com/api
So I created a site on IIS for the web app and virtual directory under that site with an alias of "api".
The web application runs without issue and I can put a static test HTML file under api folder and it runs fine. But when I put all my published file in api folder, I got 403 Forbidden Access Denied.
My questions: can I run an ASP.NET application on a Virtual Folder? If so, what I might have done wrong? The folder permissions are the same between ./mydomain.com and ./mydomain.com/api folders.

Related

Routing issues after publish asp.net mvc app

I recently developed an asp.net mvc application that want to publish online. I used the Publish option on Visual Studio to do that.
Apparently this is a common task and there are several tutorials about that. However my case has a different detail that I believe is not allowing me to run the app successfully.
So the thing is:
I have a Wordpress site successfully running at www.somedomain.com
I want my asp.net application to run at www.somedomain.com/myapp
This is what I have done so far:
Uploaded all my app files to httpdocs/myapp folder on the server;
Configured a virtual directory on httpdocs/myapp folder on the server;
Imported the database from my local computer to the remote server;
Changed the connection strings on web.config to point to the database on the remote server;
After this, when I try to access on the browser to www.somedomain.com/myapp I can see that it redirects me to www.somedomain.com/myapp/Account/Login?ReturnUrl=%2Fmyapp%2F but shows the 404 error (Page not found) with the layout of my Wordpress site. So it looks like it is running the Wordpress site, instead of the asp.net app on that folder.
are you using IIS?
you need to create an application instead of a virtual directory
otherwise it will not treat the sub folder as an application and will follow parent folder’s web.config and other settings

ASP.NET Core RC2 403.14 Forbidden error

I am trying to set up an ASP.NET Core test website on my Windows 10 machine. I followed the steps found in the ASP.NET Core documentation (https://docs.asp.net/en/latest/publishing/iis.html), but when I browse to the site, I get a 403.14 Forbidden error. I can Run the app through Visual Studio, fine and everything is rendered as expected, but when I Publish the site, the error appears. A few other items:
The root of the site is pointing to the wwwroot folder of the published output as it should be.
I can place a static file in the wwwroot folder and access it through the browser fine. Problem only seems to happen when browsing to MVC code. When enabled, directory browsing works fine as well.
Routing, controllers, and views are set up correctly. I can Run and Debug the site in VS fine with an instance of Kestrel running.
I am trying to access the site via port 80 on a test URL specified in my hosts file (I am hosting a number of other sites fine on the same machine already with this common config).
The app pool is configured correctly using No Managed Code.
The IIS instance has full file permissions to the folder.
I am thinking I have something messed up in my installation (I had a previous install of HttpPlatformHandler installed previous to the RC2 where it was replaced by AspNetCoreModule). Any thoughts?

ASP.NET Web application cannot identify UNC folder

Having a bit of trouble after migrated my app to IIS 7. Everything was working perfectly when it runs under IIS6.
The main problem is I have a UNC mapped folder (Folder A) under the root folder of the my web application. This folder is located in same network but in different server.
So when I try to access this from my ASP.NET site, instead of reading the contents from the remote UNC path, my application looking for FolderA in Web Server which it clearly fails.
The application runs as a custom user which has pretty much all permissions it needs
I'm running out of ideas here and can anyone shed some lights please?

IIS 7.0 HTTP Error 403.14 & 404.3 while uploading with WebMatrix?

I am having an issue i get 2 IIS errors when accesing
domain.com and another when accessing domain.com/default.cshtml
I am trying to upload with WebMatrix.
I have no configuration in Webmatrix but making "starter site" from the page template.
When i upload it to my server and access.
Do i need to change something in server configurations or?
To enable uploading files to your server, you need to make sure the permissions are set up properly. The user account under which your app pool is running needs to have write permission to the directory where you're trying to upload files. This is no different from configuring a normal ASP.NET application to have upload rights to IIS, so here's a good question to look at:
Windows Server 2008 - Give my ASP.NET website write permission to a folder
Good luck!

Visual Studio tells me that an operational local IIS URL has not been configured

I am trying to get a web application project working, after we moved from a StarTeam repository to a TFS repository. I have a web site on my local IIS for the project; this web site is up and serving static content when I test it, but when I copy and past the URL to that site into the Local IIS Web server's Project Url in VS 2010, I get a message that the local IIS URL has not been configured. The popup that displays this message offers me the chance to create a new virtual directory, but this fails. Anyway, this is not what I wish to do.
I usually find myself setting things up in IIS and then copying the URL into VS, but I ensure:
IIS has IIS6 management compatibility components installed.
The folder in IIS is the root of a web application.
The app pool for the web app is configured with the correct .NET version.
And to add to Richard's answer:
Ensure the site's binding in IIS is set to "All Unassigned"

Resources