Tutorial :Extract embedded resource without 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.


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");  


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.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »