简体   繁体   中英

asp.net mvc3 application host in IIS 7

I have two web application 1st one is : ApplicationA develop by asp.net 2nd one is : ApplicationB develop by asp.net mvc3

My first application "ApplicationA" host as a default website & it is run good //www.appliocationa.com

Now i want to host my second application "applicationB" as child application

like //www.appliocationa.com/applicationb

is it possible?

From your comments

face following error: 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied.

This error that you are getting has nothing to do with hosting two web application.

Make sure the account your website runs under has access to local file system. II would also recommend to check if your IIS site is pointing to wrong Application Pool.

Straight from msdn .....

The Network Service account has Read and Execute permissions on the IIS server root folder by default. The IIS server root folder is named Wwwroot. This means that an ASP.NET application deployed inside the root folder already has Read and Execute permissions to its application folders. However, if your ASP.NET application needs to use files or folders in other locations, you must specifically enable access.

To grant read, write, and modify permissions to a specific file

  • In Windows Explorer, locate and select the required file.
  • Right-click the file, and then click Properties.
  • In the Properties dialog box, click the Security tab.
  • On the Security tab, examine the list of users. If the Network Service
  • account is not listed, add it.
  • In the Properties dialog box, click the Network Service user name, and in the Permissions for NETWORK SERVICE section, select the Read, Write, and Modify permissions.
  • Click Apply, and then click OK.
  1. create a new application pool using .NET4.0 for your MVC3 site. eg AppB

  2. right click your applicationA in IIS

  3. add application, choose the application to AppB

It should be fine, no web.config changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM