开发者

URL Rewrite, Web Farm, and ASP.NET MVC 3: The virtual path 'null' maps to another application, which is not allowed

开发者 https://www.devze.com 2023-02-18 01:59 出处:网络
For reference: Scott Guthrie\'s Microsoft Web Farm entry. Using Microsoft Web Farm, you put a "URL Rewrite" to direct inbound traffic to the web farm.Using ASP.NET MVC 3, I get the following

For reference: Scott Guthrie's Microsoft Web Farm entry.

Using Microsoft Web Farm, you put a "URL Rewrite" to direct inbound traffic to the web farm. Using ASP.NET MVC 3, I get the following error:

The virtual path 'null' maps to another application, which is not allowed.

Take out the URL Rewrite, and the site fires up without issues. In this case, I have the Controller and the Primary on the same server, which Scott Guthrie says in his post will work.

I cannot move the URL Rewrite to the site level because it doesn't work that way for a web farm. May开发者_StackOverflow中文版be I should move the sites to a different tcp port like 8080?

EDIT:

I got part of this to work. I NATTED the outside traffic to come in to port 591 on the server, then had the URL Rewrite go to the server farm, which is on port 80. I needed to separate the Controller traffic from the Primary traffic. Will keep you posted.

The only bad part is that each day I check it, I get a 502 error. I reboot the Controller / Primary server and it works like a charm, until the next day.


add a web on 80 port

add real web on 81 port

create farm

edit arr

add a condition {SERVER_PORT} = 80

so,80 rewrite to farm and 81 not

about 502,may edit the proxy timeout(default:30) larger than web timeout(default:120)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号