提取嵌入资源而不使用 WebResource.axd

发布于 2024-07-17 00:37:00 字数 140 浏览 6 评论 0原文

有没有什么方法可以以编程方式提取嵌入资源,而不是通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

魔法唧唧 2024-07-24 00:37:00

您可以使用 Assembly 类。 下面的代码从当前程序集返回一个嵌入资源作为流:

using System.Reflection;

Assembly assembly = Assembly.GetExecutingAssembly();
Stream stream = assembly.GetManifestResourceStream("YourEmbeddedResource");

You can use the Assembly class. The code below returns an embedded resource as a stream from the current assembly:

using System.Reflection;

Assembly assembly = Assembly.GetExecutingAssembly();
Stream stream = assembly.GetManifestResourceStream("YourEmbeddedResource");
记忆之渊 2024-07-24 00:37:00

我找到了一篇关于解密这些“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文