简体   繁体   中英

IIS path issue when using virtual directory

My Internal website is hosted on IIS server. I have added a virtual directory

/Resources

with physical path \\\\svr-dc\\Images\\Technical\\Done\\Resources I have given the right path credentials.

When i type http://intraweb/internaldb/Resources//blue%20shaft.png in the browser I can see the image. But when my application loads it tries to access the following URL http://intraweb/Resources//blue%20shaft.png I am clearly missing something very simple here.

I extract the image by doing query from my SQL database and calling @Html.Raw(ViewBag.Body) in my View to display the content. Everything is displayed as it should be with the exception of the image.

You should convert your virtual directory into application. Right click on the virtual directory and select 'Convert to application'. Then IIS will serve webrequests related to that application.

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