在subdomain.domainname
,我这是为了从domainname
的“http://www.domain.con/Image.jpg”是不是有效的虚拟路径
Dim Path As String = "http://www.domainname/"
context.Response.ContentType = "image/jpg"
context.Response.WriteFile(Path & ImgName & ".jpg")
问题加载图像的通用处理器我无法添加物理路径,因为Responce.WriteFile接受物理路径。我得到有效的虚拟路径错误。
那么我怎样才能加载图像domainname
和我的通用处理程序在subdomain.domainname
存在图像?
有什么窍门,我可以使用?
我不想处理程序移动到domainname
您可以始终把路径domainame图像直接在配置,做你的WriteFile的。这是一个更好的解决方案,可以根据每个请求重定向网站上的每个图片资源。 – TheCodeKing