有没有办法以编程方式提取嵌入式资源而不是通过 WebResource.axd 处理程序?我有两个传递给 WebResource.axd 处理程序的参数 (d & t)。我希望有一种方法可以让我自己使用这些参数来提取资源。任何提示表示赞赏,谢谢。
问问题
1111 次
2 回答
1
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");
于 2009-04-20T06:18:35.503 回答
0
我找到了一篇关于解密那些“d”和“t”参数的好文章,调试 ASP.NET 2.0 Web 资源:解密 URL 和获取资源名称。请注意,t 参数是时间戳,d 参数包含请求的资源名称。
于 2011-04-27T09:25:49.457 回答