ASP.Net 在没有表单身份验证的情况下保护我的页面
我有一个具有表单身份验证的 Web 应用程序,但是其中一个页面必须通过第三方应用程序访问。 该第 3 方应用程序发送带有查询字符串参数的请求并返回数据。 此页面已设置,因此表单身份验证不适用于它。
如果有人找到第 3 方应用程序正在使用的 URL(并且发生这种情况的可能性很高)并将其放入浏览器中,我不希望此数据可用。
这怎么可能?
I have a web application which has Forms Authentication however one of the pages has to be accessed via a 3rd party application. This 3rd party app sends its request with querystring parameters and data is returned. This page has been setup so Forms Authentication does not apply to it.
I do not want this data available if someone finds the URL that the 3rd party app is using (and their is a high chance of this happening) and they put it in the browser.
How is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,这取决于你在那里做什么。
添加详细信息
根据您的请求,这里有一个有关如何设置基本身份验证的链接。 基本 IIS 身份验证。
这对于你的情况应该很有效。
Well, depending on what you are doing there a few things.
Added Detail
Per your request, here is a link on how to setup basic authentication. Basic IIS Authentication.
This should work out well in your case.
我不知道这是否适用于您所描述的情况,但您可以尝试
在相关页面的 Page_Load 方法中调用并检查是否返回了有效用户。 但这可能不是一个完美的解决方案,因为它只会阻止经过身份验证的用户。
在什么情况下用户可以找到此页面的链接? 另外,您是否可以控制第 3 方应用程序发送请求的方式?
I don't know if this will work for the situation you are describing, but you might try calling
In your Page_Load method for the page in question and checking to see if a valid user was returned. This is probably not a perfect solution though, as it would only block authenticated users.
What are the circumstances that would allow a user to find the link to this page? Also, do you have any sort of control over how the 3rd party app is sending its request?