Asp.net 5托管在asphostportal.com上 [英] Asp.net 5 hosted on asphostportal.com

查看:89
本文介绍了Asp.net 5托管在asphostportal.com上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将asphostportal.com上的ASP.NET托管在iis7中配置为应用程序的子目录中。即http://blog.domain.com用户还可以通过http://www.domain.com/blog导航到博客。这有点奇怪,因为上传的文件总是通过http://www.domain.com/blog/images/file.jpg引用,而不是http://blog.domain.com/images/file.jpg



我如何配置以便所有引用都通过http://blog.domain.com/完成(我不想将asp.net放在我的网站的根)谢谢



我尝试过:



在iis7中配置为应用程序。

解决方案

您需要添加一个虚拟目录以指向源目录。



制作目录博客 - >主站点中的图像。然后将 images 文件夹设为虚拟,并将其指向 blog.domain的 images 文件夹。

I am hosting ASP.NET on asphostportal.com in a sub-directory configured in iis7 as an application. i.e. http://blog.domain.com The user can also navigate to the blog via http://www.domain.com/blog. This is making things a bit odd as files uploaded get referenced always through http://www.domain.com/blog/images/file.jpg as opposed to http://blog.domain.com/images/file.jpg

How can I configure so that all references are done via http://blog.domain.com/ (I do not want to have to put asp.net at the root of my site) thanks

What I have tried:

configured in iis7 as an application.

解决方案

You need to add a Virtual Directory to point to the source directory.

Make a directory blog -> images in the main site. Then make that images folder virtual and point that to the blog.domain's images folder.


这篇关于Asp.net 5托管在asphostportal.com上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆