提取嵌入资源而不使用 WebResource.axd
有没有什么方法可以以编程方式提取嵌入资源,而不是通过 WebResource.axd 处理程序? 我有两个参数 (d & t) 传递给 WebResource.axd 处理程序。 我希望有一种方法可以使用这些参数自己提取资源。 任何提示表示赞赏,谢谢。
Are there any ways to programmatically extract an embedded resource instead of going through the WebResource.axd handler? I have the two parameters (d & t) that are passed to the WebResource.axd handler. I'm hoping there's a way I can use those parameters to extract the resource myself. Any tips are appreciated, thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 Assembly 类。 下面的代码从当前程序集返回一个嵌入资源作为流:
You can use the Assembly class. The code below returns an embedded resource as a stream from the current assembly:
我找到了一篇关于解密这些“d”和“t”参数的好文章, 调试 ASP.NET 2.0 Web 资源:解密 URL 并获取资源名称。 请注意,t 参数是时间戳,d 参数包含请求的资源名称。
I found a good article about decrypting those "d" and "t" parameters, Debugging ASP.NET 2.0 Web Resources: Decrypting the URL and Getting the Resource Name. Note that the t parameter is a timestamp, the d parameter contains the resource name that is requested.