Reatict User查看asp.net中的外部css代码 [英] Reatict User to view the external css code in asp.net

查看:89
本文介绍了Reatict User查看asp.net中的外部css代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为asp.net c#中的一个项目工作。我在那里使用aspx

和css。虽然我将外部css文件与我的

asp.x页面链接,然后在浏览器上运行页面。

当在视图代码模式上时

浏览器用户可以通过点击head部分的链接

标签来查看css代码。我想限制用户在浏览器上查看源代码模式中点击

css文件的链接标签时查看我的css代码。

谢谢...

I am working for a project in asp.net c#. I use aspx
and css there. While i link external css file with my
asp.x page and after run the page on browser.
When on the view sourse code mode on the
browser user can view the css code by click the link
tag on the head section. I want to restrict the user to view my css code when click on the link tag of
css file in the view source code mode on browser.
Thanks...

推荐答案

您需要向IIS添加自定义处理程序,以便通过那里将调用路由到.css页面,然后在代码中添加限制。但我不得不问你为什么要这么麻烦?它只是CSS,你没有在那里存储敏感数据,只要你可以访问它就可以帮助其他人学习。
You would need to add a custom handler to IIS to route calls to .css pages through there, and then add a restriction in code. But I have to ask why you would want to go to all that trouble? It's only CSS, you're not storing sensitive data in there, and by leaving it accessible you may be helping others to learn.


这篇关于Reatict User查看asp.net中的外部css代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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