我们如何隐藏.aspx扩展名 [英] how can we hide .aspx extension
问题描述
实际上,我正在开发一个Custom Server控件,在其中渲染IFRAME,并且希望将IFRAME的Src
属性的内容作为aspx文件提供,并且希望从嵌入式资源中提供该文件.如果我使用虚拟文件系统,它可以工作,但是正如我所说,虚拟文件系统不能在中等信任托管中使用,因此我正在考虑使用嵌入式资源.
我不想在控件dll旁边附带任何其他aspx文件,因为这会使我的用户感到困惑.此外,我也想隐藏aspx文件的代码.
Actually I am developing a Custom Server control where I render an IFRAME and I want to provide the content of the Src
attribute of the IFRAME as an aspx file and I want to provide the file from embedded resource. If I use Virtual File system, It works, but as I said, Virtual File system does not usable in Medium trust hosting so I was thinking about using Embedded Resourse.
I don''t want to ship any other aspx file beside my control dll as it will arise confusion to my user. Moreover, I want to hide the code of the aspx file too.
推荐答案
您可以使用URL重写并显示您选择的名称.
请参阅这些线程以获取帮助
URL重写 [ ^ ]
ASP.NET中的URL重写 [隐藏URL扩展名 [
You can use URL rewriting and display name of your choice.
Refer these threads for help
URL rewriting[^]
URL Rewriting in ASP.NET[^]
This will help you some more:
Hide the URL extension[^]
查看此
使用ASP.NET进行URL重写 [
see this
URL Rewriting with ASP.NET[^]
这篇关于我们如何隐藏.aspx扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!